projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6afccae
)
'root' as a special case in UTIL_IsExecuteBitsSet (dotnet/coreclr#10246)
author
Jonghyun Park
<parjong@gmail.com>
Tue, 21 Mar 2017 00:14:02 +0000
(09:14 +0900)
committer
Jan Kotas
<jkotas@microsoft.com>
Tue, 21 Mar 2017 00:14:02 +0000
(17:14 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/
cd9b5e782f6e9b1f392e028c819ed538546311eb
src/coreclr/src/pal/src/misc/utils.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/src/pal/src/misc/utils.cpp
b/src/coreclr/src/pal/src/misc/utils.cpp
index
f0ff634
..
4eefd74
100644
(file)
--- a/
src/coreclr/src/pal/src/misc/utils.cpp
+++ b/
src/coreclr/src/pal/src/misc/utils.cpp
@@
-124,7
+124,12
@@
BOOL UTIL_IsExecuteBitsSet( struct stat * stat_data )
}
/* Check for read permissions. */
- if ( stat_data->st_uid == geteuid() )
+ if ( 0 == geteuid() )
+ {
+ /* The process owner is root */
+ bRetVal = TRUE;
+ }
+ else if ( stat_data->st_uid == geteuid() )
{
/* The process owner is the file owner as well. */
if ( ( stat_data->st_mode & S_IXUSR ) )