diff options
| author | James Morris <jmorris@namei.org> | 2011-08-30 00:18:06 -0400 |
|---|---|---|
| committer | Eric Paris <eparis@redhat.com> | 2012-01-05 18:52:51 -0500 |
| commit | 02f5daa563456c1ff3c3422aa3ec00e67460f762 (patch) | |
| tree | b2394602c587815aae9f1b07ac272302800d9288 /security | |
| parent | e8a65a3f67f8a85802c0a0250e48c4c4652d0da0 (diff) | |
selinux: sparse fix: fix warnings in netlink code
Fix sparse warnings in SELinux Netlink code.
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security')
| -rw-r--r-- | security/selinux/hooks.c | 1 | ||||
| -rw-r--r-- | security/selinux/include/security.h | 3 | ||||
| -rw-r--r-- | security/selinux/netlink.c | 2 | ||||
| -rw-r--r-- | security/selinux/nlmsgtab.c | 1 | ||||
| -rw-r--r-- | security/selinux/selinuxfs.c | 2 | ||||
| -rw-r--r-- | security/selinux/ss/services.c | 2 |
6 files changed, 6 insertions, 5 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4a176b468719..1206cee31c79 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
| @@ -92,7 +92,6 @@ | |||
| 92 | 92 | ||
| 93 | #define NUM_SEL_MNT_OPTS 5 | 93 | #define NUM_SEL_MNT_OPTS 5 |
| 94 | 94 | ||
| 95 | extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm); | ||
| 96 | extern struct security_operations *security_ops; | 95 | extern struct security_operations *security_ops; |
| 97 | 96 | ||
| 98 | /* SECMARK reference count */ | 97 | /* SECMARK reference count */ |
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index 13b626352f0b..d871e8ad2103 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
| @@ -221,6 +221,9 @@ extern int selinux_disable(void); | |||
| 221 | extern void exit_sel_fs(void); | 221 | extern void exit_sel_fs(void); |
| 222 | extern struct dentry *selinux_null; | 222 | extern struct dentry *selinux_null; |
| 223 | extern struct vfsmount *selinuxfs_mount; | 223 | extern struct vfsmount *selinuxfs_mount; |
| 224 | extern void selnl_notify_setenforce(int val); | ||
| 225 | extern void selnl_notify_policyload(u32 seqno); | ||
| 226 | extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm); | ||
| 224 | 227 | ||
| 225 | #endif /* _SELINUX_SECURITY_H_ */ | 228 | #endif /* _SELINUX_SECURITY_H_ */ |
| 226 | 229 | ||
diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c index 36ac257cec9a..ce3f481558d8 100644 --- a/security/selinux/netlink.c +++ b/security/selinux/netlink.c | |||
| @@ -19,6 +19,8 @@ | |||
| 19 | #include <linux/selinux_netlink.h> | 19 | #include <linux/selinux_netlink.h> |
| 20 | #include <net/net_namespace.h> | 20 | #include <net/net_namespace.h> |
| 21 | 21 | ||
| 22 | #include "security.h" | ||
| 23 | |||
| 22 | static struct sock *selnl; | 24 | static struct sock *selnl; |
| 23 | 25 | ||
| 24 | static int selnl_msglen(int msgtype) | 26 | static int selnl_msglen(int msgtype) |
diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c index 8b02b2137da2..0920ea3bf599 100644 --- a/security/selinux/nlmsgtab.c +++ b/security/selinux/nlmsgtab.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #include "flask.h" | 22 | #include "flask.h" |
| 23 | #include "av_permissions.h" | 23 | #include "av_permissions.h" |
| 24 | #include "security.h" | ||
| 24 | 25 | ||
| 25 | struct nlmsg_perm { | 26 | struct nlmsg_perm { |
| 26 | u16 nlmsg_type; | 27 | u16 nlmsg_type; |
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index ba2ada5f16a9..f46658722c78 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
| @@ -75,8 +75,6 @@ static char policy_opened; | |||
| 75 | /* global data for policy capabilities */ | 75 | /* global data for policy capabilities */ |
| 76 | static struct dentry *policycap_dir; | 76 | static struct dentry *policycap_dir; |
| 77 | 77 | ||
| 78 | extern void selnl_notify_setenforce(int val); | ||
| 79 | |||
| 80 | /* Check whether a task is allowed to use a security operation. */ | 78 | /* Check whether a task is allowed to use a security operation. */ |
| 81 | static int task_has_security(struct task_struct *tsk, | 79 | static int task_has_security(struct task_struct *tsk, |
| 82 | u32 perms) | 80 | u32 perms) |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 37c50c602f17..185f849a26f6 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
| @@ -70,8 +70,6 @@ | |||
| 70 | #include "ebitmap.h" | 70 | #include "ebitmap.h" |
| 71 | #include "audit.h" | 71 | #include "audit.h" |
| 72 | 72 | ||
| 73 | extern void selnl_notify_policyload(u32 seqno); | ||
| 74 | |||
| 75 | int selinux_policycap_netpeer; | 73 | int selinux_policycap_netpeer; |
| 76 | int selinux_policycap_openperm; | 74 | int selinux_policycap_openperm; |
| 77 | 75 | ||
