dcavalca / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
b7b8f7
--- rpm-4.14.3/plugins/selinux.c.orig	2020-05-11 16:07:22.873791795 +0200
b7b8f7
+++ rpm-4.14.3/plugins/selinux.c	2020-05-11 16:10:11.701771157 +0200
b7b8f7
@@ -47,7 +47,7 @@
b7b8f7
 
b7b8f7
     sehandle = selabel_open(SELABEL_CTX_FILE, opts, 1);
b7b8f7
 
b7b8f7
-    rpmlog(RPMLOG_DEBUG, "selabel_open: (%s) %s\n",
b7b8f7
+    rpmlog((sehandle == NULL) ? RPMLOG_ERR : RPMLOG_DEBUG, "selabel_open: (%s) %s\n",
b7b8f7
 	   path, (sehandle == NULL ? strerror(errno) : ""));
b7b8f7
 
b7b8f7
     return (sehandle != NULL) ? RPMRC_OK : RPMRC_FAIL;