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/netatm | |
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/netatm')
-rw-r--r-- | sys/netatm/atm_usrreq.c | 12 |
1 files changed, 6 insertions, 6 deletions
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 <netatm/kern_include.h> #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) { |