Merge <servicehelper> from included config file
authorKrzysztof Konopko <krzysztof.konopko@youview.com>
Fri, 29 Jun 2012 12:40:37 +0000 (13:40 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 12 Feb 2013 10:49:29 +0000 (10:49 +0000)
<servicehelper> is not supported in the included config file, i. e. it's
not merged in merge_included().  There's clearly no reason it shouldn't
be supported in the included config file along with <user>, <type>
and others.  It's quite reasonable for a client willing to override the
default servicehelper, e. g. in system-local.conf.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51560
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/config-parser.c

index 07e8fbb63b959ca40587213a37a64bcefa3b1ff7..1d1b8bf044840be8c5f138bbb90abfc104fa6178 100644 (file)
@@ -323,7 +323,14 @@ merge_included (BusConfigParser *parser,
       parser->pidfile = included->pidfile;
       included->pidfile = NULL;
     }
-  
+
+  if (included->servicehelper != NULL)
+    {
+      dbus_free (parser->servicehelper);
+      parser->servicehelper = included->servicehelper;
+      included->servicehelper = NULL;
+    }
+
   while ((link = _dbus_list_pop_first_link (&included->listen_on)))
     _dbus_list_append_link (&parser->listen_on, link);