[PATCH] fix abort when selinux denies a message

Havoc Pennington hp at redhat.com
Fri Sep 14 13:41:08 PDT 2007


Hi,

Thanks, there's another bug here which is that if the error is set but
is not NO_MEMORY, the set_error tries to overwrite it.
dbus_set_error() will be unhappy about that.

The error is allowed to be NULL, though (means caller wants to ignore errors).

So the correct code I believe is something like:

 if (!bus_selinux_allows_send()) {
   if (error != NULL && !dbus_error_is_set(error)) {
      dbus_set_error();
   }
   return FALSE;
}

Havoc


More information about the dbus mailing list