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:
Robert Watson 2001-11-01 20:16:03 +00:00
parent 2273086d55
commit 309b8fb98a

View File

@ -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);