diff options
| author | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-06-20 09:44:00 -0400 |
|---|---|---|
| committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-06-20 09:44:00 -0400 |
| commit | d039ba24f135147f60a13bcaa768189a5b773b6e (patch) | |
| tree | 444b7596ab8312b5954d15c3135052a7c09c6fbe /security/selinux/nlmsgtab.c | |
| parent | 72e3148a6e987974e3e949c5668e5ca812d7c818 (diff) | |
| parent | 8b22c249e7de453961e4d253b19fc2a0bdd65d53 (diff) | |
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'security/selinux/nlmsgtab.c')
| -rw-r--r-- | security/selinux/nlmsgtab.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c index b3adb481bc25..92b057becb4b 100644 --- a/security/selinux/nlmsgtab.c +++ b/security/selinux/nlmsgtab.c | |||
| @@ -63,6 +63,8 @@ static struct nlmsg_perm nlmsg_route_perms[] = | |||
| 63 | { RTM_GETPREFIX, NETLINK_ROUTE_SOCKET__NLMSG_READ }, | 63 | { RTM_GETPREFIX, NETLINK_ROUTE_SOCKET__NLMSG_READ }, |
| 64 | { RTM_GETMULTICAST, NETLINK_ROUTE_SOCKET__NLMSG_READ }, | 64 | { RTM_GETMULTICAST, NETLINK_ROUTE_SOCKET__NLMSG_READ }, |
| 65 | { RTM_GETANYCAST, NETLINK_ROUTE_SOCKET__NLMSG_READ }, | 65 | { RTM_GETANYCAST, NETLINK_ROUTE_SOCKET__NLMSG_READ }, |
| 66 | { RTM_GETNEIGHTBL, NETLINK_ROUTE_SOCKET__NLMSG_READ }, | ||
| 67 | { RTM_SETNEIGHTBL, NETLINK_ROUTE_SOCKET__NLMSG_WRITE }, | ||
| 66 | }; | 68 | }; |
| 67 | 69 | ||
| 68 | static struct nlmsg_perm nlmsg_firewall_perms[] = | 70 | static struct nlmsg_perm nlmsg_firewall_perms[] = |
| @@ -97,6 +99,7 @@ static struct nlmsg_perm nlmsg_audit_perms[] = | |||
| 97 | { AUDIT_ADD, NETLINK_AUDIT_SOCKET__NLMSG_WRITE }, | 99 | { AUDIT_ADD, NETLINK_AUDIT_SOCKET__NLMSG_WRITE }, |
| 98 | { AUDIT_DEL, NETLINK_AUDIT_SOCKET__NLMSG_WRITE }, | 100 | { AUDIT_DEL, NETLINK_AUDIT_SOCKET__NLMSG_WRITE }, |
| 99 | { AUDIT_USER, NETLINK_AUDIT_SOCKET__NLMSG_RELAY }, | 101 | { AUDIT_USER, NETLINK_AUDIT_SOCKET__NLMSG_RELAY }, |
| 102 | { AUDIT_SIGNAL_INFO, NETLINK_AUDIT_SOCKET__NLMSG_READ }, | ||
| 100 | }; | 103 | }; |
| 101 | 104 | ||
| 102 | 105 | ||
| @@ -141,8 +144,13 @@ int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm) | |||
| 141 | break; | 144 | break; |
| 142 | 145 | ||
| 143 | case SECCLASS_NETLINK_AUDIT_SOCKET: | 146 | case SECCLASS_NETLINK_AUDIT_SOCKET: |
| 144 | err = nlmsg_perm(nlmsg_type, perm, nlmsg_audit_perms, | 147 | if (nlmsg_type >= AUDIT_FIRST_USER_MSG && |
| 145 | sizeof(nlmsg_audit_perms)); | 148 | nlmsg_type <= AUDIT_LAST_USER_MSG) { |
| 149 | *perm = NETLINK_AUDIT_SOCKET__NLMSG_RELAY; | ||
| 150 | } else { | ||
| 151 | err = nlmsg_perm(nlmsg_type, perm, nlmsg_audit_perms, | ||
| 152 | sizeof(nlmsg_audit_perms)); | ||
| 153 | } | ||
| 146 | break; | 154 | break; |
| 147 | 155 | ||
| 148 | /* No messaging from userspace, or class unknown/unhandled */ | 156 | /* No messaging from userspace, or class unknown/unhandled */ |
