Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wright <chris@wirex.com>2003-06-13 04:27:07 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-13 04:27:07 -0700
commit351907094f893dd931fa87785321ded97235e6b8 (patch)
tree91a08eaffc04f1e3b4010aed0af9afbcfa99e997
parent553bd5a2715ae7a5c858fde11873d0640065c29e (diff)
[PATCH] lsm: Remove task_kmod_set_label hook (2/4)
The task_kmod_set_label hook is no longer necessary. kmod is now handled by keventd which already does reparent_to_init, so there is no need to worry about getting the security labels right for code running off the keventd workqueue.
-rw-r--r--include/linux/security.h16
-rw-r--r--security/capability.c8
-rw-r--r--security/dummy.c6
-rw-r--r--security/root_plug.c1
4 files changed, 0 insertions, 31 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index c1d1480d2f49..febbf577a676 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -46,7 +46,6 @@ extern void cap_capset_set (struct task_struct *target, kernel_cap_t *effective,
extern int cap_bprm_set_security (struct linux_binprm *bprm);
extern void cap_bprm_compute_creds (struct linux_binprm *bprm);
extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
-extern void cap_task_kmod_set_label (void);
extern void cap_task_reparent_to_init (struct task_struct *p);
extern int cap_syslog (int type);
@@ -607,10 +606,6 @@ struct swap_info_struct;
* @arg4 contains a argument.
* @arg5 contains a argument.
* Return 0 if permission is granted.
- * @task_kmod_set_label:
- * Set the security attributes in current->security for the kernel module
- * loader thread, so that it has the permissions needed to perform its
- * function.
* @task_reparent_to_init:
* Set the security attributes in @p->security for a kernel thread that
* is being reparented to the init task.
@@ -1111,7 +1106,6 @@ struct security_operations {
int (*task_prctl) (int option, unsigned long arg2,
unsigned long arg3, unsigned long arg4,
unsigned long arg5);
- void (*task_kmod_set_label) (void);
void (*task_reparent_to_init) (struct task_struct * p);
void (*task_to_inode)(struct task_struct *p, struct inode *inode);
@@ -1692,11 +1686,6 @@ static inline int security_task_prctl (int option, unsigned long arg2,
return security_ops->task_prctl (option, arg2, arg3, arg4, arg5);
}
-static inline void security_task_kmod_set_label (void)
-{
- security_ops->task_kmod_set_label ();
-}
-
static inline void security_task_reparent_to_init (struct task_struct *p)
{
security_ops->task_reparent_to_init (p);
@@ -2321,11 +2310,6 @@ static inline int security_task_prctl (int option, unsigned long arg2,
return 0;
}
-static inline void security_task_kmod_set_label (void)
-{
- cap_task_kmod_set_label ();
-}
-
static inline void security_task_reparent_to_init (struct task_struct *p)
{
cap_task_reparent_to_init (p);
diff --git a/security/capability.c b/security/capability.c
index 9b2b9862d035..e2496a3f39ab 100644
--- a/security/capability.c
+++ b/security/capability.c
@@ -248,12 +248,6 @@ int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid,
return 0;
}
-void cap_task_kmod_set_label (void)
-{
- cap_set_full (current->cap_effective);
- return;
-}
-
void cap_task_reparent_to_init (struct task_struct *p)
{
p->cap_effective = CAP_INIT_EFF_SET;
@@ -278,7 +272,6 @@ EXPORT_SYMBOL(cap_capset_set);
EXPORT_SYMBOL(cap_bprm_set_security);
EXPORT_SYMBOL(cap_bprm_compute_creds);
EXPORT_SYMBOL(cap_task_post_setuid);
-EXPORT_SYMBOL(cap_task_kmod_set_label);
EXPORT_SYMBOL(cap_task_reparent_to_init);
EXPORT_SYMBOL(cap_syslog);
@@ -298,7 +291,6 @@ static struct security_operations capability_ops = {
.bprm_set_security = cap_bprm_set_security,
.task_post_setuid = cap_task_post_setuid,
- .task_kmod_set_label = cap_task_kmod_set_label,
.task_reparent_to_init = cap_task_reparent_to_init,
.syslog = cap_syslog,
diff --git a/security/dummy.c b/security/dummy.c
index 4774b769a6de..5873fef1ae4c 100644
--- a/security/dummy.c
+++ b/security/dummy.c
@@ -517,11 +517,6 @@ static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3,
return 0;
}
-static void dummy_task_kmod_set_label (void)
-{
- return;
-}
-
static void dummy_task_reparent_to_init (struct task_struct *p)
{
p->euid = p->fsuid = 0;
@@ -871,7 +866,6 @@ void security_fixup_ops (struct security_operations *ops)
set_to_dummy_if_null(ops, task_wait);
set_to_dummy_if_null(ops, task_kill);
set_to_dummy_if_null(ops, task_prctl);
- set_to_dummy_if_null(ops, task_kmod_set_label);
set_to_dummy_if_null(ops, task_reparent_to_init);
set_to_dummy_if_null(ops, task_to_inode);
set_to_dummy_if_null(ops, ipc_permission);
diff --git a/security/root_plug.c b/security/root_plug.c
index 73ee98192b3a..c683d6133321 100644
--- a/security/root_plug.c
+++ b/security/root_plug.c
@@ -94,7 +94,6 @@ static struct security_operations rootplug_security_ops = {
.bprm_set_security = cap_bprm_set_security,
.task_post_setuid = cap_task_post_setuid,
- .task_kmod_set_label = cap_task_kmod_set_label,
.task_reparent_to_init = cap_task_reparent_to_init,
.bprm_check_security = rootplug_bprm_check_security,