Commit 6a3fbe81 authored by James Morris's avatar James Morris

selinux: sparse fix: fix warnings in netlink code

Fix sparse warnings in SELinux Netlink code.
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent ad3fa08c
...@@ -92,7 +92,6 @@ ...@@ -92,7 +92,6 @@
#define NUM_SEL_MNT_OPTS 5 #define NUM_SEL_MNT_OPTS 5
extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm);
extern struct security_operations *security_ops; extern struct security_operations *security_ops;
/* SECMARK reference count */ /* SECMARK reference count */
......
...@@ -221,6 +221,9 @@ extern int selinux_disable(void); ...@@ -221,6 +221,9 @@ extern int selinux_disable(void);
extern void exit_sel_fs(void); extern void exit_sel_fs(void);
extern struct dentry *selinux_null; extern struct dentry *selinux_null;
extern struct vfsmount *selinuxfs_mount; extern struct vfsmount *selinuxfs_mount;
extern void selnl_notify_setenforce(int val);
extern void selnl_notify_policyload(u32 seqno);
extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm);
#endif /* _SELINUX_SECURITY_H_ */ #endif /* _SELINUX_SECURITY_H_ */
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <linux/selinux_netlink.h> #include <linux/selinux_netlink.h>
#include <net/net_namespace.h> #include <net/net_namespace.h>
#include "security.h"
static struct sock *selnl; static struct sock *selnl;
static int selnl_msglen(int msgtype) static int selnl_msglen(int msgtype)
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "flask.h" #include "flask.h"
#include "av_permissions.h" #include "av_permissions.h"
#include "security.h"
struct nlmsg_perm { struct nlmsg_perm {
u16 nlmsg_type; u16 nlmsg_type;
......
...@@ -75,8 +75,6 @@ static char policy_opened; ...@@ -75,8 +75,6 @@ static char policy_opened;
/* global data for policy capabilities */ /* global data for policy capabilities */
static struct dentry *policycap_dir; static struct dentry *policycap_dir;
extern void selnl_notify_setenforce(int val);
/* Check whether a task is allowed to use a security operation. */ /* Check whether a task is allowed to use a security operation. */
static int task_has_security(struct task_struct *tsk, static int task_has_security(struct task_struct *tsk,
u32 perms) u32 perms)
......
...@@ -70,8 +70,6 @@ ...@@ -70,8 +70,6 @@
#include "ebitmap.h" #include "ebitmap.h"
#include "audit.h" #include "audit.h"
extern void selnl_notify_policyload(u32 seqno);
int selinux_policycap_netpeer; int selinux_policycap_netpeer;
int selinux_policycap_openperm; int selinux_policycap_openperm;
......
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