changeset 32184:2997b317d990

Merge
author kevinw
date Thu, 06 Aug 2015 16:00:55 +0200
parents ff0bfcc8aa92 cd7ad76fe118
children 539974a71d06 5264b560ab1b
files
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp	Thu Aug 06 01:48:27 2015 -0700
+++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp	Thu Aug 06 16:00:55 2015 +0200
@@ -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;
--- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp	Thu Aug 06 01:48:27 2015 -0700
+++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp	Thu Aug 06 16:00:55 2015 +0200
@@ -219,9 +219,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;