diff options
author | Maciej Żenczykowski <maze@google.com> | 2011-10-20 18:21:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-20 18:21:36 -0400 |
commit | 6cc7a765c2987f03ba278dac03c7cc759ee198e7 (patch) | |
tree | 1afd1f5b4da65279b84aa5b74f9c69e8ad3f3b36 /include/linux/capability.h | |
parent | 05bdd2f14351176d368e8ddc67993690a2d1bfb6 (diff) |
net: allow CAP_NET_RAW to set socket options IP{,V6}_TRANSPARENT
Up till now the IP{,V6}_TRANSPARENT socket options (which actually set
the same bit in the socket struct) have required CAP_NET_ADMIN
privileges to set or clear the option.
- we make clearing the bit not require any privileges.
- we allow CAP_NET_ADMIN to set the bit (as before this change)
- we allow CAP_NET_RAW to set this bit, because raw
sockets already pretty much effectively allow you
to emulate socket transparency.
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/capability.h')
-rw-r--r-- | include/linux/capability.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index c42112350003..a63d13d84ad8 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -198,7 +198,7 @@ struct cpu_vfs_cap_data { | |||
198 | /* Allow modification of routing tables */ | 198 | /* Allow modification of routing tables */ |
199 | /* Allow setting arbitrary process / process group ownership on | 199 | /* Allow setting arbitrary process / process group ownership on |
200 | sockets */ | 200 | sockets */ |
201 | /* Allow binding to any address for transparent proxying */ | 201 | /* Allow binding to any address for transparent proxying (also via NET_RAW) */ |
202 | /* Allow setting TOS (type of service) */ | 202 | /* Allow setting TOS (type of service) */ |
203 | /* Allow setting promiscuous mode */ | 203 | /* Allow setting promiscuous mode */ |
204 | /* Allow clearing driver statistics */ | 204 | /* Allow clearing driver statistics */ |
@@ -210,6 +210,7 @@ struct cpu_vfs_cap_data { | |||
210 | 210 | ||
211 | /* Allow use of RAW sockets */ | 211 | /* Allow use of RAW sockets */ |
212 | /* Allow use of PACKET sockets */ | 212 | /* Allow use of PACKET sockets */ |
213 | /* Allow binding to any address for transparent proxying (also via NET_ADMIN) */ | ||
213 | 214 | ||
214 | #define CAP_NET_RAW 13 | 215 | #define CAP_NET_RAW 13 |
215 | 216 | ||