338,22 → 338,20 |
* the STA_PLL bit in the status word is cleared, the state and |
* status words are reset to the initial values at boot. |
*/ |
mtx_lock(&Giant); |
modes = ntv.modes; |
if (modes) { /* XXX really check suser sometimes only? */ |
if (modes) { |
#ifdef MAC |
error = mac_check_system_settime(td->td_ucred); |
if (error) |
goto done2; |
return (error); |
#endif |
if (!cf_jailadjtime && jailed(td->td_ucred)) { |
error = EPERM; |
goto done2; |
} |
if (!cf_jailadjtime && jailed(td->td_ucred)) |
return (EPERM); |
if (!cf_useradjtime && |
(error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL)) != 0) |
goto done2; /* jail is already checked at this point */ |
return (error); /* jail is already checked at this point */ |
} |
mtx_lock(&Giant); |
s = splclock(); |
if (modes & MOD_MAXERROR) |
time_maxerror = ntv.maxerror; |