policy: change complaint log format of bus_client_policy_check_can_own() to print... 11/210611/1
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 23 Jul 2019 02:43:40 +0000 (11:43 +0900)
committersanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 23 Jul 2019 02:43:46 +0000 (11:43 +0900)
Change-Id: Ib0fc3be8b07577da687a024f5c39178dad387644
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
bus/services.c

index bc2ffc1..9e466d8 100644 (file)
@@ -424,11 +424,12 @@ bus_registry_acquire_service (BusRegistry      *registry,
   if (_dbus_string_equal_c_str (service_name, DBUS_SERVICE_DBUS))
     {
       dbus_set_error (error, DBUS_ERROR_INVALID_ARGS,
-                      "Connection \"%s\" is not allowed to own the service \"%s\"because "
+                      "Connection \"%s\" (%s) is not allowed to own the service \"%s\"because "
                       "it is reserved for D-Bus' use only",
                       bus_connection_is_active (connection) ?
                       bus_connection_get_name (connection) :
                       "(inactive)",
+                      bus_connection_get_loginfo (connection),
                       DBUS_SERVICE_DBUS);
       goto out;
     }
@@ -453,11 +454,12 @@ bus_registry_acquire_service (BusRegistry      *registry,
        }
 
       dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
-                      "Connection \"%s\" is not allowed to own the service \"%s\" due "
+                      "Connection \"%s\" (%s) is not allowed to own the service \"%s\" due "
                       "to SELinux policy",
                       bus_connection_is_active (connection) ?
                       bus_connection_get_name (connection) :
                       "(inactive)",
+                      bus_connection_get_loginfo (connection),
                       _dbus_string_get_const_data (service_name));
       goto out;
     }
@@ -473,11 +475,12 @@ bus_registry_acquire_service (BusRegistry      *registry,
         break;
       case BUS_RESULT_FALSE:
         dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
-                              "Connection \"%s\" is not allowed to own the service \"%s\" due "
+                              "Connection \"%s\" (%s) is not allowed to own the service \"%s\" due "
                               "to security policies in the configuration file",
                               bus_connection_is_active (connection) ?
                               bus_connection_get_name (connection) :
                               "(inactive)",
+                              bus_connection_get_loginfo (connection),
                               _dbus_string_get_const_data (service_name));
 
         /* If we hit OOM while setting the error, this will syslog "out of memory"
@@ -494,11 +497,12 @@ bus_registry_acquire_service (BusRegistry      *registry,
       bus_context_get_max_services_per_connection (registry->context))
     {
       dbus_set_error (error, DBUS_ERROR_LIMITS_EXCEEDED,
-                      "Connection \"%s\" is not allowed to own more services "
+                      "Connection \"%s\" (%s) is not allowed to own more services "
                       "(increase limits in configuration file if required)",
                       bus_connection_is_active (connection) ?
                       bus_connection_get_name (connection) :
-                      "(inactive)");
+                      "(inactive)",
+                      bus_connection_get_loginfo (connection));
       goto out;
     }