diff options
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/security/security.c b/security/security.c index d7542493454d..bf619ffc9a4d 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/integrity.h> | 19 | #include <linux/integrity.h> |
20 | #include <linux/ima.h> | 20 | #include <linux/ima.h> |
21 | #include <linux/evm.h> | 21 | #include <linux/evm.h> |
22 | #include <linux/fsnotify.h> | ||
23 | #include <net/flow.h> | ||
22 | 24 | ||
23 | #define MAX_LSM_EVM_XATTR 2 | 25 | #define MAX_LSM_EVM_XATTR 2 |
24 | 26 | ||
@@ -187,25 +189,11 @@ int security_settime(const struct timespec *ts, const struct timezone *tz) | |||
187 | return security_ops->settime(ts, tz); | 189 | return security_ops->settime(ts, tz); |
188 | } | 190 | } |
189 | 191 | ||
190 | int security_vm_enough_memory(long pages) | ||
191 | { | ||
192 | WARN_ON(current->mm == NULL); | ||
193 | return security_ops->vm_enough_memory(current->mm, pages); | ||
194 | } | ||
195 | |||
196 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | 192 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) |
197 | { | 193 | { |
198 | WARN_ON(mm == NULL); | ||
199 | return security_ops->vm_enough_memory(mm, pages); | 194 | return security_ops->vm_enough_memory(mm, pages); |
200 | } | 195 | } |
201 | 196 | ||
202 | int security_vm_enough_memory_kern(long pages) | ||
203 | { | ||
204 | /* If current->mm is a kernel thread then we will pass NULL, | ||
205 | for this specific case that is fine */ | ||
206 | return security_ops->vm_enough_memory(current->mm, pages); | ||
207 | } | ||
208 | |||
209 | int security_bprm_set_creds(struct linux_binprm *bprm) | 197 | int security_bprm_set_creds(struct linux_binprm *bprm) |
210 | { | 198 | { |
211 | return security_ops->bprm_set_creds(bprm); | 199 | return security_ops->bprm_set_creds(bprm); |
@@ -729,6 +717,11 @@ int security_task_create(unsigned long clone_flags) | |||
729 | return security_ops->task_create(clone_flags); | 717 | return security_ops->task_create(clone_flags); |
730 | } | 718 | } |
731 | 719 | ||
720 | void security_task_free(struct task_struct *task) | ||
721 | { | ||
722 | security_ops->task_free(task); | ||
723 | } | ||
724 | |||
732 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp) | 725 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp) |
733 | { | 726 | { |
734 | return security_ops->cred_alloc_blank(cred, gfp); | 727 | return security_ops->cred_alloc_blank(cred, gfp); |