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/netatm/atm_usrreq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/netatm/atm_usrreq.c') diff --git a/sys/netatm/atm_usrreq.c b/sys/netatm/atm_usrreq.c index 00a4e38..2dd968e 100644 --- a/sys/netatm/atm_usrreq.c +++ b/sys/netatm/atm_usrreq.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: atm_usrreq.c,v 1.3 1999/01/19 23:16:10 mks Exp $ + * @(#) $Id: atm_usrreq.c,v 1.4 1999/01/27 22:42:20 dillon Exp $ * */ @@ -38,7 +38,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: atm_usrreq.c,v 1.3 1999/01/19 23:16:10 mks Exp $"); +__RCSID("@(#) $Id: atm_usrreq.c,v 1.4 1999/01/27 22:42:20 dillon Exp $"); #endif @@ -175,7 +175,7 @@ atm_dgram_control(so, cmd, data, ifp, p) struct atmcfgreq *acp = (struct atmcfgreq *)data; struct atm_pif *pip; - if (p && (suser(p->p_ucred, &p->p_acflag) != 0)) + if (p && (suser(p) != 0)) ATM_RETERR(EPERM); switch (acp->acr_opcode) { @@ -208,7 +208,7 @@ atm_dgram_control(so, cmd, data, ifp, p) struct atmaddreq *aap = (struct atmaddreq *)data; Atm_endpoint *epp; - if (p && (suser(p->p_ucred, &p->p_acflag) != 0)) + if (p && (suser(p) != 0)) ATM_RETERR(EPERM); switch (aap->aar_opcode) { @@ -258,7 +258,7 @@ atm_dgram_control(so, cmd, data, ifp, p) struct sigmgr *smp; Atm_endpoint *epp; - if (p && (suser(p->p_ucred, &p->p_acflag) != 0)) + if (p && (suser(p) != 0)) ATM_RETERR(EPERM); switch (adp->adr_opcode) { @@ -311,7 +311,7 @@ atm_dgram_control(so, cmd, data, ifp, p) struct sigmgr *smp; struct ifnet *ifp2; - if (p && (suser(p->p_ucred, &p->p_acflag) != 0)) + if (p && (suser(p) != 0)) ATM_RETERR(EPERM); switch (asp->asr_opcode) { -- cgit v1.1