]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
selinux: drop unused socket security classes
authorStephen Smalley <sds@tycho.nsa.gov>
Wed, 11 Jan 2017 21:33:54 +0000 (16:33 -0500)
committerPaul Moore <paul@paul-moore.com>
Thu, 12 Jan 2017 16:10:24 +0000 (11:10 -0500)
Several of the extended socket classes introduced by
commit da69a5306ab92e07 ("selinux: support distinctions
among all network address families") are never used because
sockets can never be created with the associated address family.
Remove these unused socket security classes.  The removed classes
are bridge_socket for PF_BRIDGE, ib_socket for PF_IB, and mpls_socket
for PF_MPLS.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c
security/selinux/include/classmap.h

index bada3cd42b9c551ebf25cf7ff4aa4853fc41b873..55ad878f1146e78ca0a10f3187d9a7c767f26669 100644 (file)
@@ -1353,8 +1353,6 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
                        return SECCLASS_IPX_SOCKET;
                case PF_NETROM:
                        return SECCLASS_NETROM_SOCKET;
-               case PF_BRIDGE:
-                       return SECCLASS_BRIDGE_SOCKET;
                case PF_ATMPVC:
                        return SECCLASS_ATMPVC_SOCKET;
                case PF_X25:
@@ -1373,10 +1371,6 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
                        return SECCLASS_PPPOX_SOCKET;
                case PF_LLC:
                        return SECCLASS_LLC_SOCKET;
-               case PF_IB:
-                       return SECCLASS_IB_SOCKET;
-               case PF_MPLS:
-                       return SECCLASS_MPLS_SOCKET;
                case PF_CAN:
                        return SECCLASS_CAN_SOCKET;
                case PF_TIPC:
index 0dfd26d0b8d842ddf5c9b77c879cfaa045c52a70..7898ffa6d3e61a7aa8cf020f2312e8c7207ec139 100644 (file)
@@ -183,8 +183,6 @@ struct security_class_mapping secclass_map[] = {
          { COMMON_SOCK_PERMS, NULL } },
        { "netrom_socket",
          { COMMON_SOCK_PERMS, NULL } },
-       { "bridge_socket",
-         { COMMON_SOCK_PERMS, NULL } },
        { "atmpvc_socket",
          { COMMON_SOCK_PERMS, NULL } },
        { "x25_socket",
@@ -203,10 +201,6 @@ struct security_class_mapping secclass_map[] = {
          { COMMON_SOCK_PERMS, NULL } },
        { "llc_socket",
          { COMMON_SOCK_PERMS, NULL } },
-       { "ib_socket",
-         { COMMON_SOCK_PERMS, NULL } },
-       { "mpls_socket",
-         { COMMON_SOCK_PERMS, NULL } },
        { "can_socket",
          { COMMON_SOCK_PERMS, NULL } },
        { "tipc_socket",