Commit b4ba35c7 authored by Stephen Smalley's avatar Stephen Smalley Committed by Paul Moore

selinux: drop unused socket security classes

Several of the extended socket classes introduced by
commit da69a530 ("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: default avatarStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 900fde06
...@@ -1353,8 +1353,6 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc ...@@ -1353,8 +1353,6 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
return SECCLASS_IPX_SOCKET; return SECCLASS_IPX_SOCKET;
case PF_NETROM: case PF_NETROM:
return SECCLASS_NETROM_SOCKET; return SECCLASS_NETROM_SOCKET;
case PF_BRIDGE:
return SECCLASS_BRIDGE_SOCKET;
case PF_ATMPVC: case PF_ATMPVC:
return SECCLASS_ATMPVC_SOCKET; return SECCLASS_ATMPVC_SOCKET;
case PF_X25: case PF_X25:
...@@ -1373,10 +1371,6 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc ...@@ -1373,10 +1371,6 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
return SECCLASS_PPPOX_SOCKET; return SECCLASS_PPPOX_SOCKET;
case PF_LLC: case PF_LLC:
return SECCLASS_LLC_SOCKET; return SECCLASS_LLC_SOCKET;
case PF_IB:
return SECCLASS_IB_SOCKET;
case PF_MPLS:
return SECCLASS_MPLS_SOCKET;
case PF_CAN: case PF_CAN:
return SECCLASS_CAN_SOCKET; return SECCLASS_CAN_SOCKET;
case PF_TIPC: case PF_TIPC:
......
...@@ -183,8 +183,6 @@ struct security_class_mapping secclass_map[] = { ...@@ -183,8 +183,6 @@ struct security_class_mapping secclass_map[] = {
{ COMMON_SOCK_PERMS, NULL } }, { COMMON_SOCK_PERMS, NULL } },
{ "netrom_socket", { "netrom_socket",
{ COMMON_SOCK_PERMS, NULL } }, { COMMON_SOCK_PERMS, NULL } },
{ "bridge_socket",
{ COMMON_SOCK_PERMS, NULL } },
{ "atmpvc_socket", { "atmpvc_socket",
{ COMMON_SOCK_PERMS, NULL } }, { COMMON_SOCK_PERMS, NULL } },
{ "x25_socket", { "x25_socket",
...@@ -203,10 +201,6 @@ struct security_class_mapping secclass_map[] = { ...@@ -203,10 +201,6 @@ struct security_class_mapping secclass_map[] = {
{ COMMON_SOCK_PERMS, NULL } }, { COMMON_SOCK_PERMS, NULL } },
{ "llc_socket", { "llc_socket",
{ COMMON_SOCK_PERMS, NULL } }, { COMMON_SOCK_PERMS, NULL } },
{ "ib_socket",
{ COMMON_SOCK_PERMS, NULL } },
{ "mpls_socket",
{ COMMON_SOCK_PERMS, NULL } },
{ "can_socket", { "can_socket",
{ COMMON_SOCK_PERMS, NULL } }, { COMMON_SOCK_PERMS, NULL } },
{ "tipc_socket", { "tipc_socket",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment