summaryrefslogtreecommitdiffstats
path: root/sys/netatalk
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-04-01 21:31:13 +0000
committerjhb <jhb@FreeBSD.org>2002-04-01 21:31:13 +0000
commitdc2e474f79c1287592679cd5e0c4c2307feccd60 (patch)
tree79021f0d43a5858be317d5cd33eac8cd4962b336 /sys/netatalk
parent34c7d606c9818987384d404948ecdc98521462bd (diff)
downloadFreeBSD-src-dc2e474f79c1287592679cd5e0c4c2307feccd60.zip
FreeBSD-src-dc2e474f79c1287592679cd5e0c4c2307feccd60.tar.gz
Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
Diffstat (limited to 'sys/netatalk')
-rw-r--r--sys/netatalk/at_control.c2
-rw-r--r--sys/netatalk/ddp_pcb.c2
-rw-r--r--sys/netatalk/ddp_usrreq.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c
index 5144115..c0e6727 100644
--- a/sys/netatalk/at_control.c
+++ b/sys/netatalk/at_control.c
@@ -99,7 +99,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_td(td) ) {
+ if ( suser(td) ) {
return( EPERM );
}
diff --git a/sys/netatalk/ddp_pcb.c b/sys/netatalk/ddp_pcb.c
index a4b8404..48e17d4 100644
--- a/sys/netatalk/ddp_pcb.c
+++ b/sys/netatalk/ddp_pcb.c
@@ -254,7 +254,7 @@ at_pcbsetaddr(struct ddpcb *ddp, struct sockaddr *addr, struct thread *td)
return( EINVAL );
}
if ( sat->sat_port < ATPORT_RESERVED &&
- suser_td(td) ) {
+ suser(td) ) {
return( EACCES );
}
}
diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c
index a4b8404..48e17d4 100644
--- a/sys/netatalk/ddp_usrreq.c
+++ b/sys/netatalk/ddp_usrreq.c
@@ -254,7 +254,7 @@ at_pcbsetaddr(struct ddpcb *ddp, struct sockaddr *addr, struct thread *td)
return( EINVAL );
}
if ( sat->sat_port < ATPORT_RESERVED &&
- suser_td(td) ) {
+ suser(td) ) {
return( EACCES );
}
}
OpenPOWER on IntegriCloud