Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1117 → Rev 1118

/FreeBSD/mac_settime/trunk/src/mac_settime.c
252,7 → 252,7
if (strlen(token) == 0)
continue;
 
switch(state) {
switch (state) {
case STATE_BEFORE_ACTION:
not = 0;
if (strcmp(token, ALLOW_STRING) == 0) {
305,7 → 305,7
r->jail_type = RULE_NOJAIL;
r->jail_not = not;
state = STATE_END;
} else if(strcmp(token, JAIL_STRING) == 0) {
} else if (strcmp(token, JAIL_STRING) == 0) {
r->jail_type = RULE_JAIL;
r->jail_not = not;
state = STATE_AFTER_JAIL;
459,7 → 459,7
match_id = 0;
}
 
switch(r->jail_type) {
switch (r->jail_type) {
case RULE_NONE:
match_jail = 1;
break;
/FreeBSD/mac_settime/trunk/patched/kern/kern_ntptime.c
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;