diff options
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/security/security.c b/security/security.c index ca475ca206e4..d15e56cbaade 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -23,7 +23,9 @@ extern struct security_operations dummy_security_ops; | |||
23 | extern void security_fixup_ops(struct security_operations *ops); | 23 | extern void security_fixup_ops(struct security_operations *ops); |
24 | 24 | ||
25 | struct security_operations *security_ops; /* Initialized to NULL */ | 25 | struct security_operations *security_ops; /* Initialized to NULL */ |
26 | unsigned long mmap_min_addr; /* 0 means no protection */ | 26 | |
27 | /* amount of vm to protect from userspace access */ | ||
28 | unsigned long mmap_min_addr = CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR; | ||
27 | 29 | ||
28 | static inline int verify(struct security_operations *ops) | 30 | static inline int verify(struct security_operations *ops) |
29 | { | 31 | { |
@@ -493,11 +495,11 @@ int security_inode_killpriv(struct dentry *dentry) | |||
493 | return security_ops->inode_killpriv(dentry); | 495 | return security_ops->inode_killpriv(dentry); |
494 | } | 496 | } |
495 | 497 | ||
496 | int security_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err) | 498 | int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc) |
497 | { | 499 | { |
498 | if (unlikely(IS_PRIVATE(inode))) | 500 | if (unlikely(IS_PRIVATE(inode))) |
499 | return 0; | 501 | return 0; |
500 | return security_ops->inode_getsecurity(inode, name, buffer, size, err); | 502 | return security_ops->inode_getsecurity(inode, name, buffer, alloc); |
501 | } | 503 | } |
502 | 504 | ||
503 | int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) | 505 | int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) |