diff options
Diffstat (limited to 'security/capability.c')
| -rw-r--r-- | security/capability.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/security/capability.c b/security/capability.c index c773635ca3a0..bbb51156261b 100644 --- a/security/capability.c +++ b/security/capability.c | |||
| @@ -12,11 +12,6 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/security.h> | 13 | #include <linux/security.h> |
| 14 | 14 | ||
| 15 | static int cap_sysctl(ctl_table *table, int op) | ||
| 16 | { | ||
| 17 | return 0; | ||
| 18 | } | ||
| 19 | |||
| 20 | static int cap_syslog(int type) | 15 | static int cap_syslog(int type) |
| 21 | { | 16 | { |
| 22 | return 0; | 17 | return 0; |
| @@ -59,6 +54,11 @@ static int cap_sb_copy_data(char *orig, char *copy) | |||
| 59 | return 0; | 54 | return 0; |
| 60 | } | 55 | } |
| 61 | 56 | ||
| 57 | static int cap_sb_remount(struct super_block *sb, void *data) | ||
| 58 | { | ||
| 59 | return 0; | ||
| 60 | } | ||
| 61 | |||
| 62 | static int cap_sb_kern_mount(struct super_block *sb, int flags, void *data) | 62 | static int cap_sb_kern_mount(struct super_block *sb, int flags, void *data) |
| 63 | { | 63 | { |
| 64 | return 0; | 64 | return 0; |
| @@ -118,7 +118,8 @@ static void cap_inode_free_security(struct inode *inode) | |||
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | static int cap_inode_init_security(struct inode *inode, struct inode *dir, | 120 | static int cap_inode_init_security(struct inode *inode, struct inode *dir, |
| 121 | char **name, void **value, size_t *len) | 121 | const struct qstr *qstr, char **name, |
| 122 | void **value, size_t *len) | ||
| 122 | { | 123 | { |
| 123 | return -EOPNOTSUPP; | 124 | return -EOPNOTSUPP; |
| 124 | } | 125 | } |
| @@ -180,7 +181,7 @@ static int cap_inode_follow_link(struct dentry *dentry, | |||
| 180 | return 0; | 181 | return 0; |
| 181 | } | 182 | } |
| 182 | 183 | ||
| 183 | static int cap_inode_permission(struct inode *inode, int mask) | 184 | static int cap_inode_permission(struct inode *inode, int mask, unsigned flags) |
| 184 | { | 185 | { |
| 185 | return 0; | 186 | return 0; |
| 186 | } | 187 | } |
| @@ -548,7 +549,7 @@ static int cap_sem_semop(struct sem_array *sma, struct sembuf *sops, | |||
| 548 | } | 549 | } |
| 549 | 550 | ||
| 550 | #ifdef CONFIG_SECURITY_NETWORK | 551 | #ifdef CONFIG_SECURITY_NETWORK |
| 551 | static int cap_unix_stream_connect(struct socket *sock, struct socket *other, | 552 | static int cap_unix_stream_connect(struct sock *sock, struct sock *other, |
| 552 | struct sock *newsk) | 553 | struct sock *newsk) |
| 553 | { | 554 | { |
| 554 | return 0; | 555 | return 0; |
| @@ -760,7 +761,7 @@ static int cap_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 sk_sid, u8 dir) | |||
| 760 | 761 | ||
| 761 | static int cap_xfrm_state_pol_flow_match(struct xfrm_state *x, | 762 | static int cap_xfrm_state_pol_flow_match(struct xfrm_state *x, |
| 762 | struct xfrm_policy *xp, | 763 | struct xfrm_policy *xp, |
| 763 | struct flowi *fl) | 764 | const struct flowi *fl) |
| 764 | { | 765 | { |
| 765 | return 1; | 766 | return 1; |
| 766 | } | 767 | } |
| @@ -880,7 +881,6 @@ void __init security_fixup_ops(struct security_operations *ops) | |||
| 880 | set_to_cap_if_null(ops, capable); | 881 | set_to_cap_if_null(ops, capable); |
| 881 | set_to_cap_if_null(ops, quotactl); | 882 | set_to_cap_if_null(ops, quotactl); |
| 882 | set_to_cap_if_null(ops, quota_on); | 883 | set_to_cap_if_null(ops, quota_on); |
| 883 | set_to_cap_if_null(ops, sysctl); | ||
| 884 | set_to_cap_if_null(ops, syslog); | 884 | set_to_cap_if_null(ops, syslog); |
| 885 | set_to_cap_if_null(ops, settime); | 885 | set_to_cap_if_null(ops, settime); |
| 886 | set_to_cap_if_null(ops, vm_enough_memory); | 886 | set_to_cap_if_null(ops, vm_enough_memory); |
| @@ -892,6 +892,7 @@ void __init security_fixup_ops(struct security_operations *ops) | |||
| 892 | set_to_cap_if_null(ops, sb_alloc_security); | 892 | set_to_cap_if_null(ops, sb_alloc_security); |
| 893 | set_to_cap_if_null(ops, sb_free_security); | 893 | set_to_cap_if_null(ops, sb_free_security); |
| 894 | set_to_cap_if_null(ops, sb_copy_data); | 894 | set_to_cap_if_null(ops, sb_copy_data); |
| 895 | set_to_cap_if_null(ops, sb_remount); | ||
| 895 | set_to_cap_if_null(ops, sb_kern_mount); | 896 | set_to_cap_if_null(ops, sb_kern_mount); |
| 896 | set_to_cap_if_null(ops, sb_show_options); | 897 | set_to_cap_if_null(ops, sb_show_options); |
| 897 | set_to_cap_if_null(ops, sb_statfs); | 898 | set_to_cap_if_null(ops, sb_statfs); |
