summaryrefslogtreecommitdiffstats
path: root/bus/services.c
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2005-04-13 14:27:11 +0000
committerDavid Zeuthen <davidz@redhat.com>2005-04-13 14:27:11 +0000
commit44656f538f69e8f8709ddb6ab285db29f65f62dd (patch)
tree7481890277faf957d3130bd1a9b32e128f786537 /bus/services.c
parent893f5b7bf561922dafae9d8397b82ee9ee35ad49 (diff)
2005-04-13 David Zeuthen <davidz@redhat.com>
* bus/selinux.c: Add c-file-style to top of file (log_audit_callback): Don't free the data here anymore (bus_selinux_check): Don't take spid and tpid since appending that to auxdata may OOM. (bus_selinux_allows_acquire_service): Handle OOM and signal back to the caller if we are OOM by taking an error object. (bus_selinux_allows_send): -do- * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service and bus_selinux_allows_send * bus/bus.c (bus_context_check_security_policy): Pass error and pass on OOM thrown by bus_selinux_allows_send() * bus/services.c (bus_registry_acquire_service): Pass error and pass on OOM thrown by bus_selinux_allows_acquire_service()
Diffstat (limited to 'bus/services.c')
-rw-r--r--bus/services.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bus/services.c b/bus/services.c
index 4392daa2..7a22dce7 100644
--- a/bus/services.c
+++ b/bus/services.c
@@ -319,8 +319,15 @@ bus_registry_acquire_service (BusRegistry *registry,
service_name);
if (!bus_selinux_allows_acquire_service (connection, sid,
- _dbus_string_get_const_data (service_name)))
+ _dbus_string_get_const_data (service_name), error))
{
+
+ if (dbus_error_is_set (error) &&
+ dbus_error_has_name (error, DBUS_ERROR_NO_MEMORY))
+ {
+ goto out;
+ }
+
dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
"Connection \"%s\" is not allowed to own the service \"%s\" due "
"to SELinux policy",