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=a2cc8501881166782a71ef3142383e22a390e430;hpb=79008bddf679a5e0900369950eb346c9fa687107;p=elogind.git diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index a2cc85018..b45a4513e 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -112,7 +112,7 @@ _printf_(2, 3) static int log_callback(int type, const char *fmt, ...) { #endif va_start(ap, fmt); - log_internalv(LOG_USER | LOG_INFO, 0, __FILE__, __LINE__, __FUNCTION__, fmt, ap); + log_internalv(LOG_AUTH | LOG_INFO, 0, __FILE__, __LINE__, __FUNCTION__, fmt, ap); va_end(ap); return 0; @@ -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("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);