diff options
Diffstat (limited to 'security/dummy.c')
| -rw-r--r-- | security/dummy.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/security/dummy.c b/security/dummy.c index 3d34f3de7e82..3ca5f2b828a0 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
| @@ -377,7 +377,7 @@ static int dummy_inode_removexattr (struct dentry *dentry, char *name) | |||
| 377 | return 0; | 377 | return 0; |
| 378 | } | 378 | } |
| 379 | 379 | ||
| 380 | static int dummy_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size) | 380 | static int dummy_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size, int err) |
| 381 | { | 381 | { |
| 382 | return -EOPNOTSUPP; | 382 | return -EOPNOTSUPP; |
| 383 | } | 383 | } |
| @@ -803,6 +803,23 @@ static int dummy_setprocattr(struct task_struct *p, char *name, void *value, siz | |||
| 803 | return -EINVAL; | 803 | return -EINVAL; |
| 804 | } | 804 | } |
| 805 | 805 | ||
| 806 | #ifdef CONFIG_KEYS | ||
| 807 | static inline int dummy_key_alloc(struct key *key) | ||
| 808 | { | ||
| 809 | return 0; | ||
| 810 | } | ||
| 811 | |||
| 812 | static inline void dummy_key_free(struct key *key) | ||
| 813 | { | ||
| 814 | } | ||
| 815 | |||
| 816 | static inline int dummy_key_permission(key_ref_t key_ref, | ||
| 817 | struct task_struct *context, | ||
| 818 | key_perm_t perm) | ||
| 819 | { | ||
| 820 | return 0; | ||
| 821 | } | ||
| 822 | #endif /* CONFIG_KEYS */ | ||
| 806 | 823 | ||
| 807 | struct security_operations dummy_security_ops; | 824 | struct security_operations dummy_security_ops; |
| 808 | 825 | ||
| @@ -954,5 +971,11 @@ void security_fixup_ops (struct security_operations *ops) | |||
| 954 | set_to_dummy_if_null(ops, sk_alloc_security); | 971 | set_to_dummy_if_null(ops, sk_alloc_security); |
| 955 | set_to_dummy_if_null(ops, sk_free_security); | 972 | set_to_dummy_if_null(ops, sk_free_security); |
| 956 | #endif /* CONFIG_SECURITY_NETWORK */ | 973 | #endif /* CONFIG_SECURITY_NETWORK */ |
| 974 | #ifdef CONFIG_KEYS | ||
| 975 | set_to_dummy_if_null(ops, key_alloc); | ||
| 976 | set_to_dummy_if_null(ops, key_free); | ||
| 977 | set_to_dummy_if_null(ops, key_permission); | ||
| 978 | #endif /* CONFIG_KEYS */ | ||
| 979 | |||
| 957 | } | 980 | } |
| 958 | 981 | ||
