diff options
author | Luis Ressel <aranea@aixah.de> | 2017-07-25 15:13:41 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-07-25 15:13:41 -0400 |
commit | 2a764b529ae57bed61da2c90ff132b9fec97f80b (patch) | |
tree | 7b9b406884054bee958a81addab19bccc6d4fe03 /security/selinux/hooks.c | |
parent | 31368ce83c59a5422ee621a38aeea98142d0ecf7 (diff) |
selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets
For PF_UNIX, SOCK_RAW is synonymous with SOCK_DGRAM (cf.
net/unix/af_unix.c). This is a tad obscure, but libpcap uses it.
Signed-off-by: Luis Ressel <aranea@aixah.de>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 33fd061305c4..00ad46e166f6 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -1303,6 +1303,7 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc | |||
1303 | case SOCK_SEQPACKET: | 1303 | case SOCK_SEQPACKET: |
1304 | return SECCLASS_UNIX_STREAM_SOCKET; | 1304 | return SECCLASS_UNIX_STREAM_SOCKET; |
1305 | case SOCK_DGRAM: | 1305 | case SOCK_DGRAM: |
1306 | case SOCK_RAW: | ||
1306 | return SECCLASS_UNIX_DGRAM_SOCKET; | 1307 | return SECCLASS_UNIX_DGRAM_SOCKET; |
1307 | } | 1308 | } |
1308 | break; | 1309 | break; |