summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-24 23:56:35 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-24 23:56:35 +0200
commit31c460208d92f90f5d1d9253a9c60a8bb75ff5da (patch)
treebabaa0dd896293fd0c505a73d4b8e6c867ba7ef4
parentcecd32f648cdf315ee19c0cf7c8c7cb9fb5d6ee6 (diff)
selinux: use standard D-Bus error id for access denied
-rw-r--r--src/core/bus-errors.h1
-rw-r--r--src/core/selinux-access.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/src/core/bus-errors.h b/src/core/bus-errors.h
index dca7824bd8..04c1b2849d 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 8513634f96..5edb09a0e9 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);