return FALSE;
}
+ /* /etc/ and /run/ are a recent addition, so we treat them differently
+ * than the other directories: strict naming is enforced, and we do not
+ * set up an inotify as it might very well not exist until much later at
+ * boot. */
+ if (!_dbus_get_local_system_servicedirs (&dirs))
+ {
+ BUS_SET_OOM (error);
+ return FALSE;
+ }
+
+ if (!service_dirs_absorb_string_list (&parser->service_dirs, &dirs,
+ BUS_SERVICE_DIR_FLAGS_NO_WATCH|BUS_SERVICE_DIR_FLAGS_STRICT_NAMING))
+ {
+ BUS_SET_OOM (error);
+ _dbus_list_clear_full (&dirs, dbus_free);
+ return FALSE;
+ }
+
if (!_dbus_get_standard_system_servicedirs (&dirs))
{
BUS_SET_OOM (error);
dirs);
}
+
+/**
+ * Returns the local admin directories for a system bus to look for service
+ * activation files
+ *
+ * On UNIX this should be the /etc/ and /run/ directories.
+ *
+ * On Windows there is no system bus and this function can return nothing.
+ *
+ * @param dirs the directory list we are returning
+ * @returns #FALSE on OOM
+ */
+
+dbus_bool_t
+_dbus_get_local_system_servicedirs (DBusList **dirs)
+{
+ static const char standard_search_path[] =
+ "/etc:"
+ "/run";
+ DBusString servicedir_path;
+
+ _dbus_string_init_const (&servicedir_path, standard_search_path);
+
+ return _dbus_split_paths_and_append (&servicedir_path,
+ DBUS_UNIX_STANDARD_SYSTEM_SERVICEDIR,
+ dirs);
+}
+
/**
* Get the absolute path of the system.conf file
* (there is no system bus on Windows so this can just
return TRUE;
}
+
+/**
+ * Returns the local admin directories for a system bus to look for service
+ * activation files
+ *
+ * On UNIX this should be the /etc/ and /run/ directories.
+ *
+ * On Windows there is no system bus and this function can return nothing.
+ *
+ * @param dirs the directory list we are returning
+ * @returns #FALSE on OOM
+ */
+
+dbus_bool_t
+_dbus_get_local_system_servicedirs (DBusList **dirs)
+{
+ *dirs = NULL;
+ return TRUE;
+}
+
static dbus_bool_t
_dbus_get_config_file_name (DBusString *str,
const char *basename)
dbus_bool_t _dbus_get_standard_session_servicedirs (DBusList **dirs);
dbus_bool_t _dbus_get_standard_system_servicedirs (DBusList **dirs);
+dbus_bool_t _dbus_get_local_system_servicedirs (DBusList **dirs);
dbus_bool_t _dbus_set_up_transient_session_servicedirs (DBusList **dirs,
DBusError *error);
<para>
On Unix, the standard system service directories are:
<itemizedlist>
+ <listitem>
+ <para>
+ /etc/dbus-1/system-services: this location is specified
+ by the D-Bus Specification, and is suitable for software
+ installed locally by the system administrator,
+ or by an asset manager deploying services that are
+ not part of the OS (perhaps while /usr/ is read-only)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ /run/dbus-1/system-services: this location is specified
+ by the D-Bus Specification, and is suitable for ephemeral
+ services that will disappear after a reboot
+ </para>
+ </listitem>
<listitem>
<para>
/usr/local/share/dbus-1/system-services: this location is