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/netatalk | |
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/netatalk')
-rw-r--r-- | sys/netatalk/at_control.c | 2 | ||||
-rw-r--r-- | sys/netatalk/ddp_pcb.c | 2 | ||||
-rw-r--r-- | sys/netatalk/ddp_usrreq.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index 7900fe5..9f54cb7 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -98,7 +98,7 @@ at_control(struct socket *so, u_long cmd, caddr_t data, /* * If we are not superuser, then we don't get to do these ops. */ - if ( suser(p->p_ucred, &p->p_acflag) ) { + if ( suser(p) ) { return( EPERM ); } diff --git a/sys/netatalk/ddp_pcb.c b/sys/netatalk/ddp_pcb.c index 6253821..d35fcdf 100644 --- a/sys/netatalk/ddp_pcb.c +++ b/sys/netatalk/ddp_pcb.c @@ -252,7 +252,7 @@ at_pcbsetaddr(struct ddpcb *ddp, struct sockaddr *addr, struct proc *p) return( EINVAL ); } if ( sat->sat_port < ATPORT_RESERVED && - suser( p->p_ucred, &p->p_acflag ) ) { + suser_xxx( p->p_ucred, &p->p_acflag ) ) { return( EACCES ); } } diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c index 6253821..d35fcdf 100644 --- a/sys/netatalk/ddp_usrreq.c +++ b/sys/netatalk/ddp_usrreq.c @@ -252,7 +252,7 @@ at_pcbsetaddr(struct ddpcb *ddp, struct sockaddr *addr, struct proc *p) return( EINVAL ); } if ( sat->sat_port < ATPORT_RESERVED && - suser( p->p_ucred, &p->p_acflag ) ) { + suser_xxx( p->p_ucred, &p->p_acflag ) ) { return( EACCES ); } } |