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/netipx | |
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/netipx')
-rw-r--r-- | sys/netipx/ipx.c | 4 | ||||
-rw-r--r-- | sys/netipx/ipx_pcb.c | 4 | ||||
-rw-r--r-- | sys/netipx/ipx_usrreq.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index 59ccffe..f23759c 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -33,7 +33,7 @@ * * @(#)ipx.c * - * $Id: ipx.c,v 1.13 1998/12/04 22:54:54 archie Exp $ + * $Id: ipx.c,v 1.15 1998/12/09 13:48:08 eivind Exp $ */ #include <sys/param.h> @@ -109,7 +109,7 @@ ipx_control(so, cmd, data, ifp, p) return (0); } - if (p && (error = suser(p->p_ucred, &p->p_acflag)) != 0) + if (p && (error = suser(p)) != 0) return (error); switch (cmd) { diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c index fa2d357..7a55c87 100644 --- a/sys/netipx/ipx_pcb.c +++ b/sys/netipx/ipx_pcb.c @@ -33,7 +33,7 @@ * * @(#)ipx_pcb.c * - * $Id: ipx_pcb.c,v 1.14 1998/02/09 06:10:23 eivind Exp $ + * $Id: ipx_pcb.c,v 1.15 1999/02/06 10:48:10 jhay Exp $ */ #include <sys/param.h> @@ -99,7 +99,7 @@ ipx_pcbbind(ipxp, nam, p) int error; if (aport < IPXPORT_RESERVED && - p != NULL && (error = suser(p->p_ucred, &p->p_acflag)) != 0) + p != NULL && (error = suser(p)) != 0) return (error); if (ipx_pcblookup(&zeroipx_addr, lport, 0)) return (EADDRINUSE); diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c index 25806aa..8106ecc 100644 --- a/sys/netipx/ipx_usrreq.c +++ b/sys/netipx/ipx_usrreq.c @@ -33,7 +33,7 @@ * * @(#)ipx_usrreq.c * - * $Id: ipx_usrreq.c,v 1.21 1998/12/07 21:58:42 archie Exp $ + * $Id: ipx_usrreq.c,v 1.22 1999/02/06 10:48:11 jhay Exp $ */ #include "opt_ipx.h" @@ -598,7 +598,7 @@ ripx_attach(so, proto, p) int s; struct ipxpcb *ipxp = sotoipxpcb(so); - if (p != NULL && (error = suser(p->p_ucred, &p->p_acflag)) != 0) + if (p != NULL && (error = suser(p)) != 0) return (error); s = splnet(); error = ipx_pcballoc(so, &ipxrawpcb, p); |