syslog: check cap_syslog when dmesg_restrict
authorSerge E. Hallyn <serge@hallyn.com>
Wed, 8 Dec 2010 15:19:01 +0000 (15:19 +0000)
committerJames Morris <jmorris@namei.org>
Wed, 8 Dec 2010 22:48:48 +0000 (09:48 +1100)
Eric Paris pointed out that it doesn't make sense to require
both CAP_SYS_ADMIN and CAP_SYSLOG for certain syslog actions.
So require CAP_SYSLOG, not CAP_SYS_ADMIN, when dmesg_restrict
is set.

(I'm also consolidating the now common error path)

Signed-off-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Acked-by: Eric Paris <eparis@redhat.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: James Morris <jmorris@namei.org>

No differences found