diff options
Diffstat (limited to 'security/dummy.c')
-rw-r--r-- | security/dummy.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/security/dummy.c b/security/dummy.c index 3ccfbbe973b6..48d4b0a52737 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
@@ -225,22 +225,40 @@ static void dummy_sb_post_remount (struct vfsmount *mnt, unsigned long flags, | |||
225 | } | 225 | } |
226 | 226 | ||
227 | 227 | ||
228 | static void dummy_sb_post_mountroot (void) | 228 | static void dummy_sb_post_addmount (struct vfsmount *mnt, struct nameidata *nd) |
229 | { | 229 | { |
230 | return; | 230 | return; |
231 | } | 231 | } |
232 | 232 | ||
233 | static void dummy_sb_post_addmount (struct vfsmount *mnt, struct nameidata *nd) | 233 | static int dummy_sb_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd) |
234 | { | ||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | static void dummy_sb_post_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd) | ||
234 | { | 239 | { |
235 | return; | 240 | return; |
236 | } | 241 | } |
237 | 242 | ||
238 | static int dummy_sb_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd) | 243 | static int dummy_sb_get_mnt_opts(const struct super_block *sb, char ***mount_options, |
244 | int **flags, int *num_opts) | ||
239 | { | 245 | { |
246 | *mount_options = NULL; | ||
247 | *flags = NULL; | ||
248 | *num_opts = 0; | ||
240 | return 0; | 249 | return 0; |
241 | } | 250 | } |
242 | 251 | ||
243 | static void dummy_sb_post_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd) | 252 | static int dummy_sb_set_mnt_opts(struct super_block *sb, char **mount_options, |
253 | int *flags, int num_opts) | ||
254 | { | ||
255 | if (unlikely(num_opts)) | ||
256 | return -EOPNOTSUPP; | ||
257 | return 0; | ||
258 | } | ||
259 | |||
260 | static void dummy_sb_clone_mnt_opts(const struct super_block *oldsb, | ||
261 | struct super_block *newsb) | ||
244 | { | 262 | { |
245 | return; | 263 | return; |
246 | } | 264 | } |
@@ -928,6 +946,11 @@ static int dummy_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | |||
928 | return -EOPNOTSUPP; | 946 | return -EOPNOTSUPP; |
929 | } | 947 | } |
930 | 948 | ||
949 | static int dummy_secctx_to_secid(char *secdata, u32 seclen, u32 *secid) | ||
950 | { | ||
951 | return -EOPNOTSUPP; | ||
952 | } | ||
953 | |||
931 | static void dummy_release_secctx(char *secdata, u32 seclen) | 954 | static void dummy_release_secctx(char *secdata, u32 seclen) |
932 | { | 955 | { |
933 | } | 956 | } |
@@ -994,10 +1017,12 @@ void security_fixup_ops (struct security_operations *ops) | |||
994 | set_to_dummy_if_null(ops, sb_umount_close); | 1017 | set_to_dummy_if_null(ops, sb_umount_close); |
995 | set_to_dummy_if_null(ops, sb_umount_busy); | 1018 | set_to_dummy_if_null(ops, sb_umount_busy); |
996 | set_to_dummy_if_null(ops, sb_post_remount); | 1019 | set_to_dummy_if_null(ops, sb_post_remount); |
997 | set_to_dummy_if_null(ops, sb_post_mountroot); | ||
998 | set_to_dummy_if_null(ops, sb_post_addmount); | 1020 | set_to_dummy_if_null(ops, sb_post_addmount); |
999 | set_to_dummy_if_null(ops, sb_pivotroot); | 1021 | set_to_dummy_if_null(ops, sb_pivotroot); |
1000 | set_to_dummy_if_null(ops, sb_post_pivotroot); | 1022 | set_to_dummy_if_null(ops, sb_post_pivotroot); |
1023 | set_to_dummy_if_null(ops, sb_get_mnt_opts); | ||
1024 | set_to_dummy_if_null(ops, sb_set_mnt_opts); | ||
1025 | set_to_dummy_if_null(ops, sb_clone_mnt_opts); | ||
1001 | set_to_dummy_if_null(ops, inode_alloc_security); | 1026 | set_to_dummy_if_null(ops, inode_alloc_security); |
1002 | set_to_dummy_if_null(ops, inode_free_security); | 1027 | set_to_dummy_if_null(ops, inode_free_security); |
1003 | set_to_dummy_if_null(ops, inode_init_security); | 1028 | set_to_dummy_if_null(ops, inode_init_security); |
@@ -1086,6 +1111,7 @@ void security_fixup_ops (struct security_operations *ops) | |||
1086 | set_to_dummy_if_null(ops, getprocattr); | 1111 | set_to_dummy_if_null(ops, getprocattr); |
1087 | set_to_dummy_if_null(ops, setprocattr); | 1112 | set_to_dummy_if_null(ops, setprocattr); |
1088 | set_to_dummy_if_null(ops, secid_to_secctx); | 1113 | set_to_dummy_if_null(ops, secid_to_secctx); |
1114 | set_to_dummy_if_null(ops, secctx_to_secid); | ||
1089 | set_to_dummy_if_null(ops, release_secctx); | 1115 | set_to_dummy_if_null(ops, release_secctx); |
1090 | #ifdef CONFIG_SECURITY_NETWORK | 1116 | #ifdef CONFIG_SECURITY_NETWORK |
1091 | set_to_dummy_if_null(ops, unix_stream_connect); | 1117 | set_to_dummy_if_null(ops, unix_stream_connect); |