From 16e3fbd2c114d665755299002f1c50dd11ba7245 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 27 Apr 1999 11:18:52 +0000 Subject: Suser() simplification: 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in . 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 , but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code. --- sys/netipx/ipx.c | 4 ++-- sys/netipx/ipx_pcb.c | 4 ++-- sys/netipx/ipx_usrreq.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/netipx') 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 @@ -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 @@ -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); -- cgit v1.1