[systemd-commits] src/core

Lennart Poettering lennart at kemper.freedesktop.org
Mon Sep 24 14:57:01 PDT 2012


 src/core/bus-errors.h     |    1 -
 src/core/selinux-access.c |    6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 31c460208d92f90f5d1d9253a9c60a8bb75ff5da
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Sep 24 23:56:35 2012 +0200

    selinux: use standard D-Bus error id for access denied

diff --git a/src/core/bus-errors.h b/src/core/bus-errors.h
index dca7824..04c1b28 100644
--- a/src/core/bus-errors.h
+++ b/src/core/bus-errors.h
@@ -43,7 +43,6 @@
 #define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.TransactionOrderIsCyclic"
 #define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown"
 #define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess"
-#define BUS_ERROR_ACCESS_DENIED "org.freedesktop.systemd1.AccessDenied"
 
 static inline const char *bus_error(const DBusError *e, int r) {
         if (e && e->message)
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c
index 8513634..5edb09a 100644
--- a/src/core/selinux-access.c
+++ b/src/core/selinux-access.c
@@ -329,7 +329,7 @@ static int selinux_init(Manager *m, DBusError *error) {
                 /* if not first time is not set, then initialize access */
                 r = access_init();
                 if (r < 0) {
-                        dbus_set_error(error, BUS_ERROR_ACCESS_DENIED, "Unable to initialize SELinux.");
+                        dbus_set_error(error, DBUS_ERROR_ACCESS_DENIED, "Unable to initialize SELinux.");
 
                         return r;
                 }
@@ -477,7 +477,7 @@ static int selinux_access_check(DBusConnection *connection, DBusMessage *message
                 tclass = "system";
                 r = getcon(&fcon);
                 if (r < 0) {
-                        dbus_set_error(error, BUS_ERROR_ACCESS_DENIED, "Unable to get current context, SELinux policy denies access.");
+                        dbus_set_error(error, DBUS_ERROR_ACCESS_DENIED, "Unable to get current context, SELinux policy denies access.");
                         goto finish;
                 }
         }
@@ -490,7 +490,7 @@ static int selinux_access_check(DBusConnection *connection, DBusMessage *message
                 r = -errno;
                 log_error("SELinux Denied \"%s\"", audit.cmdline);
 
-                dbus_set_error(error, BUS_ERROR_ACCESS_DENIED, "SELinux policy denies access.");
+                dbus_set_error(error, DBUS_ERROR_ACCESS_DENIED, "SELinux policy denies access.");
         }
 
         log_debug("SELinux checkaccess scon %s tcon %s tclass %s perm %s path %s: %d", scon, fcon, tclass, perm, path, r);



More information about the systemd-commits mailing list