mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8075773: jps running as root fails after the fix of JDK-8050807
Reviewed-by: sla, dsamersoff, gthornbr
This commit is contained in:
parent
47dd02d847
commit
95fb9da9de
2 changed files with 6 additions and 6 deletions
|
@ -219,9 +219,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