diff options
| author | Luis Ressel <[email protected]> | 2017-07-25 19:13:41 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2017-07-25 19:13:41 +0000 |
| commit | 2a764b529ae57bed61da2c90ff132b9fec97f80b (patch) | |
| tree | 7b9b406884054bee958a81addab19bccc6d4fe03 /security/selinux/hooks.c | |
| parent | tomoyo: Update URLs in Documentation/admin-guide/LSM/tomoyo.rst (diff) | |
| download | kernel-2a764b529ae57bed61da2c90ff132b9fec97f80b.tar.gz kernel-2a764b529ae57bed61da2c90ff132b9fec97f80b.zip | |
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 <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
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 case SOCK_SEQPACKET: return SECCLASS_UNIX_STREAM_SOCKET; case SOCK_DGRAM: + case SOCK_RAW: return SECCLASS_UNIX_DGRAM_SOCKET; } break; |
