comparison src/os/bsd/vm/perfMemory_bsd.cpp @ 24608:068ddd707f15

[GR-9490] make jvmci build work on windows. PullRequest: graal-jvmci-8/47
author Bob Vandette <bob.vandette@oracle.com>
date Tue, 24 Apr 2018 10:58:37 -0700
parents 9f8038f83a6e
children
comparison
equal deleted inserted replaced
17:fb007dd7f354 18:e1a6b17c51e2
215 // The directory is open for writing and could be subjected 215 // The directory is open for writing and could be subjected
216 // to a symlink or a hard link attack. Declare it insecure. 216 // to a symlink or a hard link attack. Declare it insecure.
217 // 217 //
218 return false; 218 return false;
219 } 219 }
220 // See if the uid of the directory matches the effective uid of the process. 220 // If user is not root then see if the uid of the directory matches the effective uid of the process.
221 // 221 uid_t euid = geteuid();
222 if (statp->st_uid != geteuid()) { 222 if ((euid != 0) && (statp->st_uid != euid)) {
223 // The directory was not created by this user, declare it insecure. 223 // The directory was not created by this user, declare it insecure.
224 // 224 //
225 return false; 225 return false;
226 } 226 }
227 return true; 227 return true;