Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbfee345 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

security/ cleanups



This patch contains the following cleanups that are now possible:
- remove the unused security_operations->inode_xattr_getsuffix
- remove the no longer used security_operations->unregister_security
- remove some no longer required exit code
- remove a bunch of no longer used exports

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Acked-by: default avatarJames Morris <jmorris@namei.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b5376771
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -982,7 +982,6 @@ EXPORT_SYMBOL(usb_altnum_to_altsetting);

EXPORT_SYMBOL(__usb_get_extra_descriptor);

EXPORT_SYMBOL(usb_find_device);
EXPORT_SYMBOL(usb_get_current_frame_number);

EXPORT_SYMBOL(usb_buffer_alloc);
+0 −2
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ int core_uses_pid;
char core_pattern[CORENAME_MAX_SIZE] = "core";
int suid_dumpable = 0;

EXPORT_SYMBOL(suid_dumpable);
/* The maximal length of core_pattern is also specified in sysctl.c */

static LIST_HEAD(formats);
@@ -1662,7 +1661,6 @@ void set_dumpable(struct mm_struct *mm, int value)
		break;
	}
}
EXPORT_SYMBOL_GPL(set_dumpable);

int get_dumpable(struct mm_struct *mm)
{
+0 −15
Original line number Diff line number Diff line
@@ -1158,10 +1158,6 @@ struct request_sock;
 * 	allow module stacking.
 * 	@name contains the name of the security module being stacked.
 * 	@ops contains a pointer to the struct security_operations of the module to stack.
 * @unregister_security:
 *	remove a stacked module.
 *	@name contains the name of the security module being unstacked.
 *	@ops contains a pointer to the struct security_operations of the module to unstack.
 * 
 * @secid_to_secctx:
 *	Convert secid to security context.
@@ -1259,7 +1255,6 @@ struct security_operations {
	int (*inode_removexattr) (struct dentry *dentry, char *name);
	int (*inode_need_killpriv) (struct dentry *dentry);
	int (*inode_killpriv) (struct dentry *dentry);
	const char *(*inode_xattr_getsuffix) (void);
  	int (*inode_getsecurity)(const struct inode *inode, const char *name, void *buffer, size_t size, int err);
  	int (*inode_setsecurity)(struct inode *inode, const char *name, const void *value, size_t size, int flags);
  	int (*inode_listsecurity)(struct inode *inode, char *buffer, size_t buffer_size);
@@ -1350,8 +1345,6 @@ struct security_operations {
	/* allow module stacking */
	int (*register_security) (const char *name,
	                          struct security_operations *ops);
	int (*unregister_security) (const char *name,
	                            struct security_operations *ops);

	void (*d_instantiate) (struct dentry *dentry, struct inode *inode);

@@ -1432,9 +1425,7 @@ struct security_operations {
/* prototypes */
extern int security_init	(void);
extern int register_security	(struct security_operations *ops);
extern int unregister_security	(struct security_operations *ops);
extern int mod_reg_security	(const char *name, struct security_operations *ops);
extern int mod_unreg_security	(const char *name, struct security_operations *ops);
extern struct dentry *securityfs_create_file(const char *name, mode_t mode,
					     struct dentry *parent, void *data,
					     const struct file_operations *fops);
@@ -1518,7 +1509,6 @@ int security_inode_listxattr(struct dentry *dentry);
int security_inode_removexattr(struct dentry *dentry, char *name);
int security_inode_need_killpriv(struct dentry *dentry);
int security_inode_killpriv(struct dentry *dentry);
const char *security_inode_xattr_getsuffix(void);
int security_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err);
int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags);
int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size);
@@ -1923,11 +1913,6 @@ static inline int security_inode_killpriv(struct dentry *dentry)
	return cap_inode_killpriv(dentry);
}

static inline const char *security_inode_xattr_getsuffix (void)
{
	return NULL ;
}

static inline int security_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err)
{
	return -EOPNOTSUPP;
+0 −4
Original line number Diff line number Diff line
@@ -17,9 +17,6 @@
unsigned securebits = SECUREBITS_DEFAULT; /* systemwide security settings */
kernel_cap_t cap_bset = CAP_INIT_EFF_SET;

EXPORT_SYMBOL(securebits);
EXPORT_SYMBOL(cap_bset);

/*
 * This lock protects task->cap_* for all tasks including current.
 * Locking rule: acquire this prior to tasklist_lock.
@@ -244,7 +241,6 @@ int __capable(struct task_struct *t, int cap)
	}
	return 0;
}
EXPORT_SYMBOL(__capable);

int capable(int cap)
{
+0 −2
Original line number Diff line number Diff line
@@ -181,8 +181,6 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
	return -ENOMEM;
}

EXPORT_SYMBOL(__vm_enough_memory);

/*
 * Requires inode->i_mapping->i_mmap_lock
 */
Loading