Skip to content

Commit

Permalink
[SELINUX]: Update for tcp_diag rename to inet_diag.
Browse files Browse the repository at this point in the history
Also, support dccp sockets.

Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
James Morris authored and David S. Miller committed Aug 29, 2005
1 parent 0662860 commit 216efaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
return SECCLASS_NETLINK_ROUTE_SOCKET;
case NETLINK_FIREWALL:
return SECCLASS_NETLINK_FIREWALL_SOCKET;
case NETLINK_TCPDIAG:
case NETLINK_INET_DIAG:
return SECCLASS_NETLINK_TCPDIAG_SOCKET;
case NETLINK_NFLOG:
return SECCLASS_NETLINK_NFLOG_SOCKET;
Expand Down
3 changes: 2 additions & 1 deletion security/selinux/nlmsgtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/rtnetlink.h>
#include <linux/if.h>
#include <linux/netfilter_ipv4/ip_queue.h>
#include <linux/tcp_diag.h>
#include <linux/inet_diag.h>
#include <linux/xfrm.h>
#include <linux/audit.h>

Expand Down Expand Up @@ -76,6 +76,7 @@ static struct nlmsg_perm nlmsg_firewall_perms[] =
static struct nlmsg_perm nlmsg_tcpdiag_perms[] =
{
{ TCPDIAG_GETSOCK, NETLINK_TCPDIAG_SOCKET__NLMSG_READ },
{ DCCPDIAG_GETSOCK, NETLINK_TCPDIAG_SOCKET__NLMSG_READ },
};

static struct nlmsg_perm nlmsg_xfrm_perms[] =
Expand Down

0 comments on commit 216efaa

Please sign in to comment.