bus/selinux: Fix previous commit for CAP_AUDIT_WRITE retention
authorColin Walters <walters@verbum.org>
Sun, 27 Oct 2013 20:21:19 +0000 (16:21 -0400)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 1 Nov 2013 19:13:21 +0000 (19:13 +0000)
commit983237258dc440419b863461fae15f31cce08639
tree58a57555466e5626da6e4fdcb84eff7253cd92ca
parent6b3a169bb0d0c7464a861ce1d9a8af4946f62fb1
bus/selinux: Fix previous commit for CAP_AUDIT_WRITE retention

As soon as capng_clear() is called, we won't appear to have
CAP_AUDIT_WRITE.  Fix this by checking for it before resetting the
libcap state.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49062
Tested-by: Laurent Bigonville <bigon@debian.org>
Reviewed-by: Laurent Bigonville <bigon@debian.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
bus/selinux.c