o Add missing PRISON_ROOT allowing a privileged process in a jail() to not
remove the setuid/setgid bits by virtue of a change to a file with those bits set, even if the process doesn't own the file, or isn't a group member of the file's gid. Obtained from: TrustedBSD Project
This commit is contained in:
parent
cd595ef506
commit
ea57890740
@ -638,7 +638,7 @@ good:
|
||||
panic("ufs_chown: lost quota");
|
||||
#endif /* QUOTA */
|
||||
ip->i_flag |= IN_CHANGE;
|
||||
if (suser_xxx(cred, NULL, 0) && (ouid != uid || ogid != gid))
|
||||
if (suser_xxx(cred, NULL, PRISON_ROOT) && (ouid != uid || ogid != gid))
|
||||
ip->i_mode &= ~(ISUID | ISGID);
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user