mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8140244: Port fix of JDK-8075773 to AIX and possibly MacOSX
Reviewed-by: stuefe, dcubed
This commit is contained in:
parent
63f370152d
commit
b6230a727d
2 changed files with 11 additions and 6 deletions
|
@ -217,9 +217,9 @@ static bool is_statbuf_secure(struct stat *statp) {
|
|||
//
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue