diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-07-18 16:10:36 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-07-18 16:10:36 +0000 |
commit | 76aeef07833fc7a8a91100a218900d2a3ccab5bd (patch) | |
tree | 35efcbe0ca5e53b32984a3e63ecbb64b4f8a083d /sys/netinet | |
parent | de9698a4f74f4eda820744c0fbf7f6b1d2856ded (diff) | |
download | FreeBSD-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/netinet')
-rw-r--r-- | sys/netinet/raw_ip.c | 10 |
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) |