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>
This commit is contained in:
committed by
Linus Torvalds
parent
6800e4c0ea
commit
12b3052c3e
@ -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)
|
||||
|
Reference in New Issue
Block a user