Mercurial > hg > graal-jvmci-8
comparison src/os/solaris/vm/perfMemory_solaris.cpp @ 23513:9bf9a733246b jdk8u60-b32
8075773: jps running as root fails after the fix of JDK-8050807
Reviewed-by: sla, dsamersoff, gthornbr
Contributed-by: cheleswer.sahu@oracle.com
author | kevinw |
---|---|
date | Thu, 06 Aug 2015 00:08:57 -0700 |
parents | f3ffb37f88a6 |
children | 9f8038f83a6e |
comparison
equal
deleted
inserted
replaced
23512:227efd9e4646 | 23513:9bf9a733246b |
---|---|
217 // The directory is open for writing and could be subjected | 217 // The directory is open for writing and could be subjected |
218 // to a symlink or a hard link attack. Declare it insecure. | 218 // to a symlink or a hard link attack. Declare it insecure. |
219 // | 219 // |
220 return false; | 220 return false; |
221 } | 221 } |
222 // See if the uid of the directory matches the effective uid of the process. | 222 // If user is not root then see if the uid of the directory matches the effective uid of the process. |
223 // | 223 uid_t euid = geteuid(); |
224 if (statp->st_uid != geteuid()) { | 224 if ((euid != 0) && (statp->st_uid != euid)) { |
225 // The directory was not created by this user, declare it insecure. | 225 // The directory was not created by this user, declare it insecure. |
226 // | 226 // |
227 return false; | 227 return false; |
228 } | 228 } |
229 return true; | 229 return true; |