changeset 5904:da5d72b33658

8140244: Port fix of JDK-8075773 to MacOSX Reviewed-by: stuefe, dcubed
author clanger
date Thu, 14 Jan 2016 20:17:31 +0000
parents 822414177d3b
children b3c5ff648bca
files src/os/bsd/vm/perfMemory_bsd.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/bsd/vm/perfMemory_bsd.cpp	Thu Aug 06 00:08:57 2015 -0700
+++ b/src/os/bsd/vm/perfMemory_bsd.cpp	Thu Jan 14 20:17:31 2016 +0000
@@ -217,9 +217,9 @@
     //
     return false;
   }
-  // See if the uid of the directory matches the effective uid of the process.
-  //
-  if (statp->st_uid != geteuid()) {
+  // If user is not root then see if the uid of the directory matches the effective uid of the process.
+  uid_t euid = geteuid();
+  if ((euid != 0) && (statp->st_uid != euid)) {
     // The directory was not created by this user, declare it insecure.
     //
     return false;