diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-07 22:53:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-08 18:45:27 -0400 |
commit | 9785e10aedfa0fad5c1aac709dce5ada1b123783 (patch) | |
tree | ca523e084318b6e908b18c6f3e9e53ea7e9a1c49 /security/selinux/netlink.c | |
parent | 16fa9e1d104e6f2c18005a4ac7ea60e4c7fc1286 (diff) |
netlink: kill netlink_set_nonroot
Replace netlink_set_nonroot by one new field `flags' in
struct netlink_kernel_cfg that is passed to netlink_kernel_create.
This patch also renames NL_NONROOT_* to NL_CFG_F_NONROOT_* since
now the flags field in nl_table is generic (so we can add more
flags if needed in the future).
Also adjust all callers in the net-next tree to use these flags
instead of netlink_set_nonroot.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/selinux/netlink.c')
-rw-r--r-- | security/selinux/netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c index 8a77725423e0..0d2cd11f3c22 100644 --- a/security/selinux/netlink.c +++ b/security/selinux/netlink.c | |||
@@ -113,13 +113,13 @@ static int __init selnl_init(void) | |||
113 | { | 113 | { |
114 | struct netlink_kernel_cfg cfg = { | 114 | struct netlink_kernel_cfg cfg = { |
115 | .groups = SELNLGRP_MAX, | 115 | .groups = SELNLGRP_MAX, |
116 | .flags = NL_CFG_F_NONROOT_RECV, | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | selnl = netlink_kernel_create(&init_net, NETLINK_SELINUX, | 119 | selnl = netlink_kernel_create(&init_net, NETLINK_SELINUX, |
119 | THIS_MODULE, &cfg); | 120 | THIS_MODULE, &cfg); |
120 | if (selnl == NULL) | 121 | if (selnl == NULL) |
121 | panic("SELinux: Cannot create netlink socket."); | 122 | panic("SELinux: Cannot create netlink socket."); |
122 | netlink_set_nonroot(NETLINK_SELINUX, NL_NONROOT_RECV); | ||
123 | return 0; | 123 | return 0; |
124 | } | 124 | } |
125 | 125 | ||