summaryrefslogtreecommitdiffstats
path: root/bus/bus.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/bus.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/bus.c')
-rw-r--r--bus/bus.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/bus/bus.c b/bus/bus.c
index cd2a0401..0340dd3c 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -1139,8 +1139,16 @@ bus_context_check_security_policy (BusContext *context,
dbus_message_get_interface (message),
dbus_message_get_member (message),
dbus_message_get_error_name (message),
- dest ? dest : DBUS_SERVICE_DBUS))
+ dest ? dest : DBUS_SERVICE_DBUS, error))
{
+
+ if (dbus_error_is_set (error) &&
+ dbus_error_has_name (error, DBUS_ERROR_NO_MEMORY))
+ {
+ return FALSE;
+ }
+
+
dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
"An SELinux policy prevents this sender "
"from sending this message to this recipient "