X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fselinux-access.c;h=b45a4513e28a5b40ebb03e620c5ac6a3141e3fd8;hb=a2c0e528b8b5ba370527db279605e4e4135689c1;hp=0ec80a1b33f6ce3c6d91572e322699fa07d183ce;hpb=56f64d95763a799ba4475daf44d8e9f72a1bd474;p=elogind.git diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index 0ec80a1b3..b45a4513e 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -126,10 +126,8 @@ _printf_(2, 3) static int log_callback(int type, const char *fmt, ...) { static int access_init(void) { int r = 0; - if (avc_open(NULL, 0)) { - log_error_errno(errno, "avc_open() failed: %m"); - return -errno; - } + if (avc_open(NULL, 0)) + return log_error_errno(errno, "avc_open() failed: %m"); selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback) audit_callback); selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback) log_callback);