Allow !suser() R/O access to ntp_adjtime()

Noticed by: Reg Clemens <reg@dwf.com>
This commit is contained in:
phk 1999-03-15 08:35:40 +00:00
parent d70ee45d7f
commit 494908a571

View File

@ -276,7 +276,8 @@ ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap)
* the assumption the superuser should know what it is doing.
*/
modes = ntv.modes;
error = suser(p->p_cred->pc_ucred, &p->p_acflag);
if (modes)
error = suser(p->p_cred->pc_ucred, &p->p_acflag);
if (error)
return (error);
s = splclock();