summaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-11-15 18:36:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-11-15 15:40:01 -0800
commit12b3052c3ee8f508b2c7ee4ddd63ed03423409d8 (patch)
treeb97d0f209f363cfad94ce9d075312274e349da89 /security/security.c
parent6800e4c0ea3e96cf78953b8b5743381cb1bb9e37 (diff)
downloadlinux-12b3052c3ee8f508b2c7ee4ddd63ed03423409d8.tar.gz
linux-12b3052c3ee8f508b2c7ee4ddd63ed03423409d8.tar.bz2
linux-12b3052c3ee8f508b2c7ee4ddd63ed03423409d8.zip
capabilities/syslog: open code cap_syslog logic to fix build failure
The addition of CONFIG_SECURITY_DMESG_RESTRICT resulted in a build failure when CONFIG_PRINTK=n. This is because the capabilities code which used the new option was built even though the variable in question didn't exist. The patch here fixes this by moving the capabilities checks out of the LSM and into the caller. All (known) LSMs should have been calling the capabilities hook already so it actually makes the code organization better to eliminate the hook altogether. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/security.c b/security/security.c
index 3ef5e2a7a741..1b798d3df710 100644
--- a/security/security.c
+++ b/security/security.c
@@ -197,9 +197,9 @@ int security_quota_on(struct dentry *dentry)
return security_ops->quota_on(dentry);
}
-int security_syslog(int type, bool from_file)
+int security_syslog(int type)
{
- return security_ops->syslog(type, from_file);
+ return security_ops->syslog(type);
}
int security_settime(struct timespec *ts, struct timezone *tz)