projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fb9a5e
)
'root' as a special case in UTIL_IsExecuteBitsSet (#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)
src/pal/src/misc/utils.cpp
patch
|
blob
|
history
diff --git
a/src/pal/src/misc/utils.cpp
b/src/pal/src/misc/utils.cpp
index f0ff63439f717ef684b3fd06d887c7cdecff55ef..4eefd749ed269eaa0a49195de8548d4e06ad9a42 100644
(file)
--- a/
src/pal/src/misc/utils.cpp
+++ b/
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 ) )