diff options
Diffstat (limited to 'security/capability.c')
-rw-r--r-- | security/capability.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/security/capability.c b/security/capability.c index 67afc679719a..b6d779b6aa25 100644 --- a/security/capability.c +++ b/security/capability.c | |||
@@ -91,7 +91,10 @@ static int cap_sb_pivotroot(struct path *old_path, struct path *new_path) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | static int cap_sb_set_mnt_opts(struct super_block *sb, | 93 | static int cap_sb_set_mnt_opts(struct super_block *sb, |
94 | struct security_mnt_opts *opts) | 94 | struct security_mnt_opts *opts, |
95 | unsigned long kern_flags, | ||
96 | unsigned long *set_kern_flags) | ||
97 | |||
95 | { | 98 | { |
96 | if (unlikely(opts->num_mnt_opts)) | 99 | if (unlikely(opts->num_mnt_opts)) |
97 | return -EOPNOTSUPP; | 100 | return -EOPNOTSUPP; |
@@ -109,6 +112,13 @@ static int cap_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) | |||
109 | return 0; | 112 | return 0; |
110 | } | 113 | } |
111 | 114 | ||
115 | static int cap_dentry_init_security(struct dentry *dentry, int mode, | ||
116 | struct qstr *name, void **ctx, | ||
117 | u32 *ctxlen) | ||
118 | { | ||
119 | return 0; | ||
120 | } | ||
121 | |||
112 | static int cap_inode_alloc_security(struct inode *inode) | 122 | static int cap_inode_alloc_security(struct inode *inode) |
113 | { | 123 | { |
114 | return 0; | 124 | return 0; |
@@ -822,6 +832,11 @@ static int cap_setprocattr(struct task_struct *p, char *name, void *value, | |||
822 | return -EINVAL; | 832 | return -EINVAL; |
823 | } | 833 | } |
824 | 834 | ||
835 | static int cap_ismaclabel(const char *name) | ||
836 | { | ||
837 | return 0; | ||
838 | } | ||
839 | |||
825 | static int cap_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | 840 | static int cap_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) |
826 | { | 841 | { |
827 | return -EOPNOTSUPP; | 842 | return -EOPNOTSUPP; |
@@ -849,7 +864,7 @@ static int cap_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen) | |||
849 | 864 | ||
850 | static int cap_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen) | 865 | static int cap_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen) |
851 | { | 866 | { |
852 | return 0; | 867 | return -EOPNOTSUPP; |
853 | } | 868 | } |
854 | #ifdef CONFIG_KEYS | 869 | #ifdef CONFIG_KEYS |
855 | static int cap_key_alloc(struct key *key, const struct cred *cred, | 870 | static int cap_key_alloc(struct key *key, const struct cred *cred, |
@@ -937,6 +952,7 @@ void __init security_fixup_ops(struct security_operations *ops) | |||
937 | set_to_cap_if_null(ops, sb_set_mnt_opts); | 952 | set_to_cap_if_null(ops, sb_set_mnt_opts); |
938 | set_to_cap_if_null(ops, sb_clone_mnt_opts); | 953 | set_to_cap_if_null(ops, sb_clone_mnt_opts); |
939 | set_to_cap_if_null(ops, sb_parse_opts_str); | 954 | set_to_cap_if_null(ops, sb_parse_opts_str); |
955 | set_to_cap_if_null(ops, dentry_init_security); | ||
940 | set_to_cap_if_null(ops, inode_alloc_security); | 956 | set_to_cap_if_null(ops, inode_alloc_security); |
941 | set_to_cap_if_null(ops, inode_free_security); | 957 | set_to_cap_if_null(ops, inode_free_security); |
942 | set_to_cap_if_null(ops, inode_init_security); | 958 | set_to_cap_if_null(ops, inode_init_security); |
@@ -1040,6 +1056,7 @@ void __init security_fixup_ops(struct security_operations *ops) | |||
1040 | set_to_cap_if_null(ops, d_instantiate); | 1056 | set_to_cap_if_null(ops, d_instantiate); |
1041 | set_to_cap_if_null(ops, getprocattr); | 1057 | set_to_cap_if_null(ops, getprocattr); |
1042 | set_to_cap_if_null(ops, setprocattr); | 1058 | set_to_cap_if_null(ops, setprocattr); |
1059 | set_to_cap_if_null(ops, ismaclabel); | ||
1043 | set_to_cap_if_null(ops, secid_to_secctx); | 1060 | set_to_cap_if_null(ops, secid_to_secctx); |
1044 | set_to_cap_if_null(ops, secctx_to_secid); | 1061 | set_to_cap_if_null(ops, secctx_to_secid); |
1045 | set_to_cap_if_null(ops, release_secctx); | 1062 | set_to_cap_if_null(ops, release_secctx); |