summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-07-18 16:10:36 +0000
committerrwatson <rwatson@FreeBSD.org>2003-07-18 16:10:36 +0000
commit76aeef07833fc7a8a91100a218900d2a3ccab5bd (patch)
tree35efcbe0ca5e53b32984a3e63ecbb64b4f8a083d /sys
parentde9698a4f74f4eda820744c0fbf7f6b1d2856ded (diff)
downloadFreeBSD-src-76aeef07833fc7a8a91100a218900d2a3ccab5bd.zip
FreeBSD-src-76aeef07833fc7a8a91100a218900d2a3ccab5bd.tar.gz
Add a comment above rip_ctloutput() documenting that the privilege
check for raw IP system management operations is often (although not always) implicit due to the namespacing of raw IP sockets. I.e., you have to have privilege to get a raw IP socket, so much of the management code sitting on raw IP sockets assumes that any requests on the socket should be granted privilege. Obtained from: TrustedBSD Project Product of: France
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/raw_ip.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index e4e4eb2..dd40eb0 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -328,6 +328,16 @@ rip_output(m, so, dst)
/*
* Raw IP socket option processing.
+ *
+ * Note that access to all of the IP administrative functions here is
+ * implicitly protected by suser() as gaining access to a raw socket
+ * requires either that the thread pass a suser() check, or that it be
+ * passed a raw socket by another thread that has passed a suser() check.
+ * If FreeBSD moves to a more fine-grained access control mechanism,
+ * additional checks will need to be placed here if the raw IP attachment
+ * check is not equivilent the the check required for these
+ * administrative operations; in some cases, these checks are already
+ * present.
*/
int
rip_ctloutput(so, sopt)
OpenPOWER on IntegriCloud