From cae912fcc88d9e1bb37d740400f075aa5e4022ef Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Sun, 21 Nov 1999 23:06:30 +0000 Subject: It's time to only allow root to manipulate netgraph nodes. (I meant to do this before checking in to FreeBSD and forgot) --- sys/netgraph/ng_socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/netgraph/ng_socket.c') diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 6365c8732fc5..7948a6f12667 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -160,6 +160,8 @@ ngc_attach(struct socket *so, int proto, struct proc *p) { struct ngpcb *const pcbp = sotongpcb(so); + if ((error = suser(p))) + return (EPERM); if (pcbp != NULL) return (EISCONN); return (ng_attach_cntl(so)); -- cgit v1.3