summaryrefslogtreecommitdiffstats
path: root/sys/netinet
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/netinet
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/netinet')
-rw-r--r--sys/netinet/in.c6
-rw-r--r--sys/netinet/in_pcb.c6
-rw-r--r--sys/netinet/ip_divert.c4
-rw-r--r--sys/netinet/raw_ip.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 0d0dbe9..0c78b99 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.c 8.4 (Berkeley) 1/9/95
- * $Id: in.c,v 1.39 1998/12/07 05:41:10 eivind Exp $
+ * $Id: in.c,v 1.40 1999/04/24 12:28:51 luigi Exp $
*/
#include <sys/param.h>
@@ -201,7 +201,7 @@ in_control(so, cmd, data, ifp, p)
case SIOCSIFADDR:
case SIOCSIFNETMASK:
case SIOCSIFDSTADDR:
- if (p && (error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if (p && (error = suser(p)) != 0)
return error;
if (ifp == 0)
@@ -238,7 +238,7 @@ in_control(so, cmd, data, ifp, p)
break;
case SIOCSIFBRDADDR:
- if (p && (error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if (p && (error = suser(p)) != 0)
return error;
/* FALLTHROUGH */
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index cdd5a60..7788c9b 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $Id: in_pcb.c,v 1.46 1998/12/07 21:58:37 archie Exp $
+ * $Id: in_pcb.c,v 1.47 1999/01/27 22:42:24 dillon Exp $
*/
#include <sys/param.h>
@@ -195,7 +195,7 @@ in_pcbbind(inp, nam, p)
/* GROSS */
if (ntohs(lport) < IPPORT_RESERVED && p &&
- suser(p->p_ucred, &p->p_acflag))
+ suser(p))
return (EACCES);
if (so->so_uid &&
!IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) {
@@ -227,7 +227,7 @@ in_pcbbind(inp, nam, p)
last = ipport_hilastauto;
lastport = &pcbinfo->lasthi;
} else if (inp->inp_flags & INP_LOWPORT) {
- if (p && (error = suser(p->p_ucred, &p->p_acflag)))
+ if (p && (error = suser(p)))
return error;
first = ipport_lowfirstauto; /* 1023 */
last = ipport_lowlastauto; /* 600 */
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 5cf0ecb..e4b82b9 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ip_divert.c,v 1.36 1999/02/08 05:48:46 julian Exp $
+ * $Id: ip_divert.c,v 1.37 1999/02/08 05:53:39 julian Exp $
*/
#include "opt_inet.h"
@@ -352,7 +352,7 @@ div_attach(struct socket *so, int proto, struct proc *p)
inp = sotoinpcb(so);
if (inp)
panic("div_attach");
- if (p && (error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if (p && (error = suser(p)) != 0)
return error;
s = splnet();
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 57da1d3..571491d 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
- * $Id: raw_ip.c,v 1.56 1998/12/14 18:09:13 luigi Exp $
+ * $Id: raw_ip.c,v 1.57 1999/04/20 13:32:06 peter Exp $
*/
#include <sys/param.h>
@@ -427,7 +427,7 @@ rip_attach(struct socket *so, int proto, struct proc *p)
inp = sotoinpcb(so);
if (inp)
panic("rip_attach");
- if (p && (error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if (p && (error = suser(p)) != 0)
return error;
s = splnet();
OpenPOWER on IntegriCloud