Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235102
b: refs/heads/master
c: 4916ca4
h: refs/heads/master
v: v3
  • Loading branch information
Lucian Adrian Grijincu authored and Eric Paris committed Feb 1, 2011
1 parent 4197c3b commit 578c5b9
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e6c96935fcc1ed3dbebc96fddfef3f2f2395afc
refs/heads/master: 4916ca401e3051dad326ddd69765bd0e3f32fb9b
13 changes: 0 additions & 13 deletions trunk/include/linux/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -1259,12 +1259,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
* @cap contains the capability <include/linux/capability.h>.
* @audit: Whether to write an audit message or not
* Return 0 if the capability is granted for @tsk.
* @sysctl:
* Check permission before accessing the @table sysctl variable in the
* manner specified by @op.
* @table contains the ctl_table structure for the sysctl variable.
* @op contains the operation (001 = search, 002 = write, 004 = read).
* Return 0 if permission is granted.
* @syslog:
* Check permission before accessing the kernel message ring or changing
* logging to the console.
Expand Down Expand Up @@ -1385,7 +1379,6 @@ struct security_operations {
const kernel_cap_t *permitted);
int (*capable) (struct task_struct *tsk, const struct cred *cred,
int cap, int audit);
int (*sysctl) (struct ctl_table *table, int op);
int (*quotactl) (int cmds, int type, int id, struct super_block *sb);
int (*quota_on) (struct dentry *dentry);
int (*syslog) (int type);
Expand Down Expand Up @@ -1668,7 +1661,6 @@ int security_capset(struct cred *new, const struct cred *old,
int security_capable(int cap);
int security_real_capable(struct task_struct *tsk, int cap);
int security_real_capable_noaudit(struct task_struct *tsk, int cap);
int security_sysctl(struct ctl_table *table, int op);
int security_quotactl(int cmds, int type, int id, struct super_block *sb);
int security_quota_on(struct dentry *dentry);
int security_syslog(int type);
Expand Down Expand Up @@ -1887,11 +1879,6 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap)
return ret;
}

static inline int security_sysctl(struct ctl_table *table, int op)
{
return 0;
}

static inline int security_quotactl(int cmds, int type, int id,
struct super_block *sb)
{
Expand Down
5 changes: 0 additions & 5 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,13 +1691,8 @@ static int test_perm(int mode, int op)

int sysctl_perm(struct ctl_table_root *root, struct ctl_table *table, int op)
{
int error;
int mode;

error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC));
if (error)
return error;

if (root->permissions)
mode = root->permissions(root, current->nsproxy, table);
else
Expand Down
6 changes: 0 additions & 6 deletions trunk/security/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@

#include <linux/security.h>

static int cap_sysctl(ctl_table *table, int op)
{
return 0;
}

static int cap_syslog(int type)
{
return 0;
Expand Down Expand Up @@ -881,7 +876,6 @@ void __init security_fixup_ops(struct security_operations *ops)
set_to_cap_if_null(ops, capable);
set_to_cap_if_null(ops, quotactl);
set_to_cap_if_null(ops, quota_on);
set_to_cap_if_null(ops, sysctl);
set_to_cap_if_null(ops, syslog);
set_to_cap_if_null(ops, settime);
set_to_cap_if_null(ops, vm_enough_memory);
Expand Down
5 changes: 0 additions & 5 deletions trunk/security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap)
return ret;
}

int security_sysctl(struct ctl_table *table, int op)
{
return security_ops->sysctl(table, op);
}

int security_quotactl(int cmds, int type, int id, struct super_block *sb)
{
return security_ops->quotactl(cmds, type, id, sb);
Expand Down

0 comments on commit 578c5b9

Please sign in to comment.