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

Noticed by: Reg Clemens <reg@dwf.com>
This commit is contained in:
Poul-Henning Kamp 1999-03-15 08:35:40 +00:00
parent 2bffe0d58e
commit fafbe352c0

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