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/net/ppp_tty.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/net/ppp_tty.c')
-rw-r--r-- | sys/net/ppp_tty.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index 74e7172..7f91fda 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -70,7 +70,7 @@ * Paul Mackerras (paulus@cs.anu.edu.au). */ -/* $Id: ppp_tty.c,v 1.37 1998/06/20 16:39:35 peter Exp $ */ +/* $Id: ppp_tty.c,v 1.38 1999/01/17 20:53:47 peter Exp $ */ #include "ppp.h" #if NPPP > 0 @@ -203,7 +203,7 @@ pppopen(dev, tp) register struct ppp_softc *sc; int error, s; - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p)) != 0) return (error); s = spltty(); @@ -472,7 +472,7 @@ ppptioctl(tp, cmd, data, flag, p) error = 0; switch (cmd) { case PPPIOCSASYNCMAP: - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p)) != 0) break; sc->sc_asyncmap[0] = *(u_int *)data; break; @@ -482,7 +482,7 @@ ppptioctl(tp, cmd, data, flag, p) break; case PPPIOCSRASYNCMAP: - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p)) != 0) break; sc->sc_rasyncmap = *(u_int *)data; break; @@ -492,7 +492,7 @@ ppptioctl(tp, cmd, data, flag, p) break; case PPPIOCSXASYNCMAP: - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p)) != 0) break; s = spltty(); bcopy(data, sc->sc_asyncmap, sizeof(sc->sc_asyncmap)); |