summaryrefslogtreecommitdiffstats
path: root/sys/netatm/atm_usrreq.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
committerphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
commit16e3fbd2c114d665755299002f1c50dd11ba7245 (patch)
treed7f6bebfe177ae90b67d27603da4d211433088e5 /sys/netatm/atm_usrreq.c
parentaba5e776bb95610ea3e3355cbf47aadb844773eb (diff)
downloadFreeBSD-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/atm_usrreq.c')
-rw-r--r--sys/netatm/atm_usrreq.c12
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) {
OpenPOWER on IntegriCloud