o Permit osf1-emulated programs to modify uid/gid under jail by
switching suser() to suser_xxx() and adding PRISON_ROOT flag.
This commit is contained in:
parent
2273086d55
commit
309b8fb98a
@ -1065,7 +1065,7 @@ osf1_setuid(td, uap)
|
||||
uid = SCARG(uap, uid);
|
||||
oldcred = p->p_ucred;
|
||||
|
||||
if ((error = suser(p)) != 0 &&
|
||||
if ((error = suser_xxx(p->p_ucred, NULL, PRISON_ROOT)) != 0 &&
|
||||
uid != oldcred->cr_ruid && uid != oldcred->cr_svuid)
|
||||
return (error);
|
||||
|
||||
@ -1111,7 +1111,7 @@ osf1_setgid(td, uap)
|
||||
gid = SCARG(uap, gid);
|
||||
oldcred = p->p_ucred;
|
||||
|
||||
if (((error = suser(p)) != 0 ) &&
|
||||
if (((error = suser(p->p_ucred, NULL, PRISON_ROOT)) != 0 ) &&
|
||||
gid != oldcred->cr_rgid && gid != oldcred->cr_svgid)
|
||||
return (error);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user