diff options
author | phk <phk@FreeBSD.org> | 1999-04-27 11:18:52 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-04-27 11:18:52 +0000 |
commit | 16e3fbd2c114d665755299002f1c50dd11ba7245 (patch) | |
tree | d7f6bebfe177ae90b67d27603da4d211433088e5 /sys/kern/kern_time.c | |
parent | aba5e776bb95610ea3e3355cbf47aadb844773eb (diff) | |
download | FreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.zip FreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.tar.gz |
Suser() simplification:
1:
s/suser/suser_xxx/
2:
Add new function: suser(struct proc *), prototyped in <sys/proc.h>.
3:
s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/
The remaining suser_xxx() calls will be scrutinized and dealt with
later.
There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.
More changes to the suser() API will come along with the "jail" code.
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index e6921ea..56084aa 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 - * $Id: kern_time.c,v 1.63 1999/04/07 17:32:21 mjacob Exp $ + * $Id: kern_time.c,v 1.64 1999/04/07 19:48:09 nsayer Exp $ */ #include <sys/param.h> @@ -173,7 +173,7 @@ clock_settime(p, uap) struct timespec ats; int error; - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p)) != 0) return (error); if (SCARG(uap, clock_id) != CLOCK_REALTIME) return (EINVAL); @@ -329,7 +329,7 @@ settimeofday(p, uap) struct timezone atz; int error; - if ((error = suser(p->p_ucred, &p->p_acflag))) + if ((error = suser(p))) return (error); /* Verify all parameters before changing time. */ if (uap->tv) { @@ -369,7 +369,7 @@ adjtime(p, uap) register long ndelta, ntickdelta, odelta; int s, error; - if ((error = suser(p->p_ucred, &p->p_acflag))) + if ((error = suser(p))) return (error); if ((error = copyin((caddr_t)uap->delta, (caddr_t)&atv, sizeof(struct timeval)))) |