diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-03-27 17:42:07 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-03-27 17:42:07 +0300 |
commit | 0c9ed253893faa13313fee30ce6dbf40a0339035 (patch) | |
tree | 488b25b9c65c93011c75eb09035db2d5ee2f400f /bus | |
parent | 6a2ee6bd4acd68ec4f28fa397543079d8cab77cc (diff) | |
parent | c1c801dcb5e6470e9327195c89ee2da6e505127b (diff) | |
download | dbus-0c9ed253893faa13313fee30ce6dbf40a0339035.tar.gz |
Merge branch 'master' of git://anonscm.debian.org/pkg-utopia/dbus
Conflicts:
debian/changelog
debian/dbus.postinst
Diffstat (limited to 'bus')
37 files changed, 1288 insertions, 1306 deletions
diff --git a/bus/Makefile.am b/bus/Makefile.am index 6cbc09a6..f335e30c 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -42,12 +42,7 @@ agentdir=$(LAUNCHD_AGENT_DIR) agent_DATA=org.freedesktop.dbus-session.plist endif -if DBUS_USE_LIBXML -XML_SOURCES=config-loader-libxml.c -endif -if DBUS_USE_EXPAT XML_SOURCES=config-loader-expat.c -endif if DBUS_BUS_ENABLE_KQUEUE DIR_WATCH_SOURCE=dir-watch-kqueue.c @@ -55,13 +50,9 @@ else if DBUS_BUS_ENABLE_INOTIFY DIR_WATCH_SOURCE=dir-watch-inotify.c else -if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX -DIR_WATCH_SOURCE=dir-watch-dnotify.c -else DIR_WATCH_SOURCE=dir-watch-default.c endif endif -endif BUS_SOURCES= \ activation.c \ @@ -149,15 +140,15 @@ dbus_daemon_launch_helper_test_CPPFLAGS = \ ## we build yet another binary so we can do the OOM tests ## DO NOT INSTALL THIS FILE -bus_test_launch_helper_SOURCES= \ +test_bus_launch_helper_SOURCES= \ test-launch-helper.c \ $(LAUNCH_HELPER_SOURCES) -bus_test_launch_helper_LDADD= \ +test_bus_launch_helper_LDADD= \ $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) -bus_test_launch_helper_CPPFLAGS = \ +test_bus_launch_helper_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DACTIVATION_LAUNCHER_TEST \ -DACTIVATION_LAUNCHER_DO_OOM @@ -173,23 +164,23 @@ endif DBUS_UNIX ## compiled, so we don't put them in TESTS here; we run them in test/ ## instead. -if DBUS_BUILD_TESTS +if DBUS_ENABLE_EMBEDDED_TESTS ## we use noinst_PROGRAMS not check_PROGRAMS so that we build ## even when not doing "make check" # run as a test by test/Makefile.am -noinst_PROGRAMS += bus-test bus-test-system +noinst_PROGRAMS += test-bus test-bus-system if DBUS_UNIX # run as a test by test/Makefile.am -noinst_PROGRAMS += bus-test-launch-helper +noinst_PROGRAMS += test-bus-launch-helper # this is used by the tests but is not,itself, a test noinst_PROGRAMS += dbus-daemon-launch-helper-test endif DBUS_UNIX -endif DBUS_BUILD_TESTS +endif DBUS_ENABLE_EMBEDDED_TESTS -bus_test_system_SOURCES= \ +test_bus_system_SOURCES= \ $(XML_SOURCES) \ config-parser-common.c \ config-parser-common.h \ @@ -199,13 +190,13 @@ bus_test_system_SOURCES= \ utils.h \ test-system.c -bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) -bus_test_SOURCES= \ +test_bus_SOURCES= \ $(BUS_SOURCES) \ test-main.c -bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) ## mop up the gcov files clean-local: diff --git a/bus/Makefile.in b/bus/Makefile.in index f8835e3f..4425b030 100644 --- a/bus/Makefile.in +++ b/bus/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -58,24 +85,23 @@ dbus_daemon_exec_PROGRAMS = dbus-daemon$(EXEEXT) @DBUS_UNIX_TRUE@libexec_PROGRAMS = dbus-daemon-launch-helper$(EXEEXT) # run as a test by test/Makefile.am -@DBUS_BUILD_TESTS_TRUE@am__append_1 = bus-test bus-test-system +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__append_1 = test-bus test-bus-system # run as a test by test/Makefile.am # this is used by the tests but is not,itself, a test -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = \ -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@ bus-test-launch-helper \ -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = test-bus-launch-helper \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test @HAVE_SYSTEMD_TRUE@am__append_3 = \ @HAVE_SYSTEMD_TRUE@ dbus.service.in \ @HAVE_SYSTEMD_TRUE@ dbus.socket.in subdir = bus -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/dbus.service.in $(srcdir)/dbus.socket.in \ - $(srcdir)/messagebus-config.in $(srcdir)/messagebus.in \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/system.conf.in $(srcdir)/session.conf.in \ + $(srcdir)/messagebus.in $(srcdir)/messagebus-config.in \ $(srcdir)/org.freedesktop.dbus-session.plist.in \ - $(srcdir)/rc.messagebus.in $(srcdir)/session.conf.in \ - $(srcdir)/system.conf.in + $(srcdir)/rc.messagebus.in $(srcdir)/dbus.service.in \ + $(srcdir)/dbus.socket.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -96,29 +122,27 @@ am__installdirs = "$(DESTDIR)$(dbus_daemon_execdir)" \ "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(initddir)" "$(DESTDIR)$(agentdir)" \ "$(DESTDIR)$(configdir)" "$(DESTDIR)$(systemdsystemunitdir)" -@DBUS_BUILD_TESTS_TRUE@am__EXEEXT_1 = bus-test$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@ bus-test-system$(EXEEXT) -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__EXEEXT_2 = bus-test-launch-helper$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test$(EXEEXT) +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = test-bus$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-bus-system$(EXEEXT) +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__EXEEXT_2 = test-bus-launch-helper$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test$(EXEEXT) PROGRAMS = $(dbus_daemon_exec_PROGRAMS) $(libexec_PROGRAMS) \ $(noinst_PROGRAMS) -am__bus_test_SOURCES_DIST = activation.c activation.h \ +am__dbus_daemon_SOURCES_DIST = activation.c activation.h \ activation-exit-codes.h bus.c bus.h config-parser.c \ config-parser.h config-parser-common.c config-parser-common.h \ connection.c connection.h desktop-file.c desktop-file.h \ - dir-watch-default.c dir-watch-dnotify.c dir-watch-inotify.c \ - dir-watch-kqueue.c dir-watch.h dispatch.c dispatch.h driver.c \ - driver.h expirelist.c expirelist.h policy.c policy.h selinux.h \ + dir-watch-default.c dir-watch-inotify.c dir-watch-kqueue.c \ + dir-watch.h dispatch.c dispatch.h driver.c driver.h \ + expirelist.c expirelist.h policy.c policy.h selinux.h \ selinux.c services.c services.h signals.c signals.h stats.c \ stats.h test.c test.h utils.c utils.h config-loader-expat.c \ - config-loader-libxml.c test-main.c -@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-default.$(OBJEXT) -@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_TRUE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-dnotify.$(OBJEXT) + main.c +@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-default.$(OBJEXT) @DBUS_BUS_ENABLE_INOTIFY_TRUE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-inotify.$(OBJEXT) @DBUS_BUS_ENABLE_KQUEUE_TRUE@am__objects_1 = \ @DBUS_BUS_ENABLE_KQUEUE_TRUE@ dir-watch-kqueue.$(OBJEXT) -@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_2 = config-loader-libxml.$(OBJEXT) -@DBUS_USE_EXPAT_TRUE@am__objects_2 = config-loader-expat.$(OBJEXT) +am__objects_2 = config-loader-expat.$(OBJEXT) am__objects_3 = activation.$(OBJEXT) bus.$(OBJEXT) \ config-parser.$(OBJEXT) config-parser-common.$(OBJEXT) \ connection.$(OBJEXT) desktop-file.$(OBJEXT) $(am__objects_1) \ @@ -126,99 +150,76 @@ am__objects_3 = activation.$(OBJEXT) bus.$(OBJEXT) \ policy.$(OBJEXT) selinux.$(OBJEXT) services.$(OBJEXT) \ signals.$(OBJEXT) stats.$(OBJEXT) test.$(OBJEXT) \ utils.$(OBJEXT) $(am__objects_2) -am_bus_test_OBJECTS = $(am__objects_3) test-main.$(OBJEXT) -bus_test_OBJECTS = $(am_bus_test_OBJECTS) +am_dbus_daemon_OBJECTS = $(am__objects_3) main.$(OBJEXT) +dbus_daemon_OBJECTS = $(am_dbus_daemon_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -bus_test_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ - $(am__DEPENDENCIES_2) +dbus_daemon_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent -am__bus_test_launch_helper_SOURCES_DIST = test-launch-helper.c \ - config-loader-expat.c config-loader-libxml.c \ - config-parser-common.c config-parser-common.h \ - config-parser-trivial.c config-parser-trivial.h desktop-file.c \ - desktop-file.h utils.c utils.h activation-exit-codes.h \ - activation-helper.h activation-helper.c -@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_4 = bus_test_launch_helper-config-loader-libxml.$(OBJEXT) -@DBUS_USE_EXPAT_TRUE@am__objects_4 = bus_test_launch_helper-config-loader-expat.$(OBJEXT) -am__objects_5 = $(am__objects_4) \ - bus_test_launch_helper-config-parser-common.$(OBJEXT) \ - bus_test_launch_helper-config-parser-trivial.$(OBJEXT) \ - bus_test_launch_helper-desktop-file.$(OBJEXT) \ - bus_test_launch_helper-utils.$(OBJEXT) \ - bus_test_launch_helper-activation-helper.$(OBJEXT) -am_bus_test_launch_helper_OBJECTS = \ - bus_test_launch_helper-test-launch-helper.$(OBJEXT) \ - $(am__objects_5) -bus_test_launch_helper_OBJECTS = $(am_bus_test_launch_helper_OBJECTS) -am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -bus_test_launch_helper_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) -am__bus_test_system_SOURCES_DIST = config-loader-expat.c \ - config-loader-libxml.c config-parser-common.c \ - config-parser-common.h config-parser-trivial.c \ - config-parser-trivial.h utils.c utils.h test-system.c -am_bus_test_system_OBJECTS = $(am__objects_2) \ - config-parser-common.$(OBJEXT) config-parser-trivial.$(OBJEXT) \ - utils.$(OBJEXT) test-system.$(OBJEXT) -bus_test_system_OBJECTS = $(am_bus_test_system_OBJECTS) -bus_test_system_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_2) -am__dbus_daemon_SOURCES_DIST = activation.c activation.h \ - activation-exit-codes.h bus.c bus.h config-parser.c \ - config-parser.h config-parser-common.c config-parser-common.h \ - connection.c connection.h desktop-file.c desktop-file.h \ - dir-watch-default.c dir-watch-dnotify.c dir-watch-inotify.c \ - dir-watch-kqueue.c dir-watch.h dispatch.c dispatch.h driver.c \ - driver.h expirelist.c expirelist.h policy.c policy.h selinux.h \ - selinux.c services.c services.h signals.c signals.h stats.c \ - stats.h test.c test.h utils.c utils.h config-loader-expat.c \ - config-loader-libxml.c main.c -am_dbus_daemon_OBJECTS = $(am__objects_3) main.$(OBJEXT) -dbus_daemon_OBJECTS = $(am_dbus_daemon_OBJECTS) -dbus_daemon_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) -am__dbus_daemon_launch_helper_SOURCES_DIST = activation-helper-bin.c \ - config-loader-expat.c config-loader-libxml.c \ - config-parser-common.c config-parser-common.h \ - config-parser-trivial.c config-parser-trivial.h desktop-file.c \ - desktop-file.h utils.c utils.h activation-exit-codes.h \ - activation-helper.h activation-helper.c -am__objects_6 = $(am__objects_2) config-parser-common.$(OBJEXT) \ +am__v_lt_1 = +am__objects_4 = $(am__objects_2) config-parser-common.$(OBJEXT) \ config-parser-trivial.$(OBJEXT) desktop-file.$(OBJEXT) \ utils.$(OBJEXT) activation-helper.$(OBJEXT) am_dbus_daemon_launch_helper_OBJECTS = \ - activation-helper-bin.$(OBJEXT) $(am__objects_6) + activation-helper-bin.$(OBJEXT) $(am__objects_4) dbus_daemon_launch_helper_OBJECTS = \ $(am_dbus_daemon_launch_helper_OBJECTS) +am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) dbus_daemon_launch_helper_DEPENDENCIES = \ $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) -am__dbus_daemon_launch_helper_test_SOURCES_DIST = \ - activation-helper-bin.c config-loader-expat.c \ - config-loader-libxml.c config-parser-common.c \ - config-parser-common.h config-parser-trivial.c \ - config-parser-trivial.h desktop-file.c desktop-file.h utils.c \ - utils.h activation-exit-codes.h activation-helper.h \ - activation-helper.c -@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_7 = dbus_daemon_launch_helper_test-config-loader-libxml.$(OBJEXT) -@DBUS_USE_EXPAT_TRUE@am__objects_7 = dbus_daemon_launch_helper_test-config-loader-expat.$(OBJEXT) -am__objects_8 = $(am__objects_7) \ +am__objects_5 = \ + dbus_daemon_launch_helper_test-config-loader-expat.$(OBJEXT) +am__objects_6 = $(am__objects_5) \ dbus_daemon_launch_helper_test-config-parser-common.$(OBJEXT) \ dbus_daemon_launch_helper_test-config-parser-trivial.$(OBJEXT) \ dbus_daemon_launch_helper_test-desktop-file.$(OBJEXT) \ dbus_daemon_launch_helper_test-utils.$(OBJEXT) \ dbus_daemon_launch_helper_test-activation-helper.$(OBJEXT) am_dbus_daemon_launch_helper_test_OBJECTS = dbus_daemon_launch_helper_test-activation-helper-bin.$(OBJEXT) \ - $(am__objects_8) + $(am__objects_6) dbus_daemon_launch_helper_test_OBJECTS = \ $(am_dbus_daemon_launch_helper_test_OBJECTS) dbus_daemon_launch_helper_test_DEPENDENCIES = \ $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) +am__test_bus_SOURCES_DIST = activation.c activation.h \ + activation-exit-codes.h bus.c bus.h config-parser.c \ + config-parser.h config-parser-common.c config-parser-common.h \ + connection.c connection.h desktop-file.c desktop-file.h \ + dir-watch-default.c dir-watch-inotify.c dir-watch-kqueue.c \ + dir-watch.h dispatch.c dispatch.h driver.c driver.h \ + expirelist.c expirelist.h policy.c policy.h selinux.h \ + selinux.c services.c services.h signals.c signals.h stats.c \ + stats.h test.c test.h utils.c utils.h config-loader-expat.c \ + test-main.c +am_test_bus_OBJECTS = $(am__objects_3) test-main.$(OBJEXT) +test_bus_OBJECTS = $(am_test_bus_OBJECTS) +test_bus_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ + $(am__DEPENDENCIES_2) +am__objects_7 = test_bus_launch_helper-config-loader-expat.$(OBJEXT) +am__objects_8 = $(am__objects_7) \ + test_bus_launch_helper-config-parser-common.$(OBJEXT) \ + test_bus_launch_helper-config-parser-trivial.$(OBJEXT) \ + test_bus_launch_helper-desktop-file.$(OBJEXT) \ + test_bus_launch_helper-utils.$(OBJEXT) \ + test_bus_launch_helper-activation-helper.$(OBJEXT) +am_test_bus_launch_helper_OBJECTS = \ + test_bus_launch_helper-test-launch-helper.$(OBJEXT) \ + $(am__objects_8) +test_bus_launch_helper_OBJECTS = $(am_test_bus_launch_helper_OBJECTS) +test_bus_launch_helper_DEPENDENCIES = \ + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) +am_test_bus_system_OBJECTS = $(am__objects_2) \ + config-parser-common.$(OBJEXT) config-parser-trivial.$(OBJEXT) \ + utils.$(OBJEXT) test-system.$(OBJEXT) +test_bus_system_OBJECTS = $(am_test_bus_system_OBJECTS) +test_bus_system_DEPENDENCIES = \ + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_2) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -247,6 +248,18 @@ am__uninstall_files_from_dir = { \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) $(initd_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -259,36 +272,47 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(bus_test_SOURCES) $(bus_test_launch_helper_SOURCES) \ - $(bus_test_system_SOURCES) $(dbus_daemon_SOURCES) \ +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(dbus_daemon_SOURCES) $(dbus_daemon_launch_helper_SOURCES) \ + $(dbus_daemon_launch_helper_test_SOURCES) $(test_bus_SOURCES) \ + $(test_bus_launch_helper_SOURCES) $(test_bus_system_SOURCES) +DIST_SOURCES = $(am__dbus_daemon_SOURCES_DIST) \ $(dbus_daemon_launch_helper_SOURCES) \ - $(dbus_daemon_launch_helper_test_SOURCES) -DIST_SOURCES = $(am__bus_test_SOURCES_DIST) \ - $(am__bus_test_launch_helper_SOURCES_DIST) \ - $(am__bus_test_system_SOURCES_DIST) \ - $(am__dbus_daemon_SOURCES_DIST) \ - $(am__dbus_daemon_launch_helper_SOURCES_DIST) \ - $(am__dbus_daemon_launch_helper_test_SOURCES_DIST) + $(dbus_daemon_launch_helper_test_SOURCES) \ + $(am__test_bus_SOURCES_DIST) $(test_bus_launch_helper_SOURCES) \ + $(test_bus_system_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(agent_DATA) $(config_DATA) $(systemdsystemunit_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -320,7 +344,6 @@ DBUS_DAEMONDIR = @DBUS_DAEMONDIR@ DBUS_DATADIR = @DBUS_DATADIR@ DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ -DBUS_HAVE_INT64 = @DBUS_HAVE_INT64@ DBUS_INT16_TYPE = @DBUS_INT16_TYPE@ DBUS_INT32_TYPE = @DBUS_INT32_TYPE@ DBUS_INT64_CONSTANT = @DBUS_INT64_CONSTANT@ @@ -331,7 +354,8 @@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ -DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ +DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ +DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ @@ -380,8 +404,6 @@ LIBDBUS_LIBS = @LIBDBUS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -390,7 +412,6 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ -MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETWORK_libs = @NETWORK_libs@ @@ -424,7 +445,6 @@ SHELL = @SHELL@ STRIP = @STRIP@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ SYSTEMD_LIBS = @SYSTEMD_LIBS@ -TEST_BUS_BINARY = @TEST_BUS_BINARY@ TEST_LAUNCH_HELPER_BINARY = @TEST_LAUNCH_HELPER_BINARY@ TEST_LISTEN = @TEST_LISTEN@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ @@ -539,10 +559,8 @@ config_DATA = \ @DBUS_ENABLE_LAUNCHD_TRUE@agentdir = $(LAUNCHD_AGENT_DIR) @DBUS_ENABLE_LAUNCHD_TRUE@agent_DATA = org.freedesktop.dbus-session.plist -@DBUS_USE_EXPAT_TRUE@XML_SOURCES = config-loader-expat.c -@DBUS_USE_LIBXML_TRUE@XML_SOURCES = config-loader-libxml.c -@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@DIR_WATCH_SOURCE = dir-watch-default.c -@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_TRUE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@DIR_WATCH_SOURCE = dir-watch-dnotify.c +XML_SOURCES = config-loader-expat.c +@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@DIR_WATCH_SOURCE = dir-watch-default.c @DBUS_BUS_ENABLE_INOTIFY_TRUE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@DIR_WATCH_SOURCE = dir-watch-inotify.c @DBUS_BUS_ENABLE_KQUEUE_TRUE@DIR_WATCH_SOURCE = dir-watch-kqueue.c BUS_SOURCES = \ @@ -626,20 +644,20 @@ dbus_daemon_launch_helper_test_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DACTIVATION_LAUNCHER_TEST -bus_test_launch_helper_SOURCES = \ +test_bus_launch_helper_SOURCES = \ test-launch-helper.c \ $(LAUNCH_HELPER_SOURCES) -bus_test_launch_helper_LDADD = \ +test_bus_launch_helper_LDADD = \ $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) -bus_test_launch_helper_CPPFLAGS = \ +test_bus_launch_helper_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DACTIVATION_LAUNCHER_TEST \ -DACTIVATION_LAUNCHER_DO_OOM -bus_test_system_SOURCES = \ +test_bus_system_SOURCES = \ $(XML_SOURCES) \ config-parser-common.c \ config-parser-common.h \ @@ -649,12 +667,12 @@ bus_test_system_SOURCES = \ utils.h \ test-system.c -bus_test_system_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) -bus_test_SOURCES = \ +test_bus_system_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_SOURCES = \ $(BUS_SOURCES) \ test-main.c -bus_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) #### Init scripts fun SCRIPT_IN_FILES = messagebus.in messagebus-config.in rc.messagebus.in \ @@ -736,10 +754,12 @@ install-dbus_daemon_execPROGRAMS: $(dbus_daemon_exec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -760,7 +780,8 @@ uninstall-dbus_daemon_execPROGRAMS: @list='$(dbus_daemon_exec_PROGRAMS)'; test -n "$(dbus_daemon_execdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(dbus_daemon_execdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(dbus_daemon_execdir)" && rm -f $$files @@ -782,10 +803,12 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -806,7 +829,8 @@ uninstall-libexecPROGRAMS: @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files @@ -828,24 +852,30 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -bus-test$(EXEEXT): $(bus_test_OBJECTS) $(bus_test_DEPENDENCIES) $(EXTRA_bus_test_DEPENDENCIES) - @rm -f bus-test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bus_test_OBJECTS) $(bus_test_LDADD) $(LIBS) -bus-test-launch-helper$(EXEEXT): $(bus_test_launch_helper_OBJECTS) $(bus_test_launch_helper_DEPENDENCIES) $(EXTRA_bus_test_launch_helper_DEPENDENCIES) - @rm -f bus-test-launch-helper$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bus_test_launch_helper_OBJECTS) $(bus_test_launch_helper_LDADD) $(LIBS) -bus-test-system$(EXEEXT): $(bus_test_system_OBJECTS) $(bus_test_system_DEPENDENCIES) $(EXTRA_bus_test_system_DEPENDENCIES) - @rm -f bus-test-system$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bus_test_system_OBJECTS) $(bus_test_system_LDADD) $(LIBS) + dbus-daemon$(EXEEXT): $(dbus_daemon_OBJECTS) $(dbus_daemon_DEPENDENCIES) $(EXTRA_dbus_daemon_DEPENDENCIES) @rm -f dbus-daemon$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_daemon_OBJECTS) $(dbus_daemon_LDADD) $(LIBS) + dbus-daemon-launch-helper$(EXEEXT): $(dbus_daemon_launch_helper_OBJECTS) $(dbus_daemon_launch_helper_DEPENDENCIES) $(EXTRA_dbus_daemon_launch_helper_DEPENDENCIES) @rm -f dbus-daemon-launch-helper$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_daemon_launch_helper_OBJECTS) $(dbus_daemon_launch_helper_LDADD) $(LIBS) + dbus-daemon-launch-helper-test$(EXEEXT): $(dbus_daemon_launch_helper_test_OBJECTS) $(dbus_daemon_launch_helper_test_DEPENDENCIES) $(EXTRA_dbus_daemon_launch_helper_test_DEPENDENCIES) @rm -f dbus-daemon-launch-helper-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_daemon_launch_helper_test_OBJECTS) $(dbus_daemon_launch_helper_test_LDADD) $(LIBS) + +test-bus$(EXEEXT): $(test_bus_OBJECTS) $(test_bus_DEPENDENCIES) $(EXTRA_test_bus_DEPENDENCIES) + @rm -f test-bus$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bus_OBJECTS) $(test_bus_LDADD) $(LIBS) + +test-bus-launch-helper$(EXEEXT): $(test_bus_launch_helper_OBJECTS) $(test_bus_launch_helper_DEPENDENCIES) $(EXTRA_test_bus_launch_helper_DEPENDENCIES) + @rm -f test-bus-launch-helper$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bus_launch_helper_OBJECTS) $(test_bus_launch_helper_LDADD) $(LIBS) + +test-bus-system$(EXEEXT): $(test_bus_system_OBJECTS) $(test_bus_system_DEPENDENCIES) $(EXTRA_test_bus_system_DEPENDENCIES) + @rm -f test-bus-system$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bus_system_OBJECTS) $(test_bus_system_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -927,16 +957,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activation-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activation.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-activation-helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-loader-expat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-parser-common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-desktop-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-loader-expat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-loader-libxml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser-trivial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser.Po@am__quote@ @@ -944,14 +965,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-expat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-libxml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-config-parser-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-config-parser-trivial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-desktop-file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/desktop-file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-default.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-dnotify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-inotify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-kqueue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch.Po@am__quote@ @@ -966,6 +985,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-system.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-activation-helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-config-loader-expat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-config-parser-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-desktop-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-test-launch-helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ .c.o: @@ -973,14 +999,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -989,118 +1015,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -bus_test_launch_helper-test-launch-helper.o: test-launch-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-test-launch-helper.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo -c -o bus_test_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='bus_test_launch_helper-test-launch-helper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c - -bus_test_launch_helper-test-launch-helper.obj: test-launch-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-test-launch-helper.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo -c -o bus_test_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='bus_test_launch_helper-test-launch-helper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` - -bus_test_launch_helper-config-loader-expat.o: config-loader-expat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-loader-expat.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo -c -o bus_test_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='bus_test_launch_helper-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c - -bus_test_launch_helper-config-loader-expat.obj: config-loader-expat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo -c -o bus_test_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='bus_test_launch_helper-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` - -bus_test_launch_helper-config-loader-libxml.o: config-loader-libxml.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-loader-libxml.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Tpo -c -o bus_test_launch_helper-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Tpo $(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-libxml.c' object='bus_test_launch_helper-config-loader-libxml.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c - -bus_test_launch_helper-config-loader-libxml.obj: config-loader-libxml.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-loader-libxml.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Tpo -c -o bus_test_launch_helper-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Tpo $(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-libxml.c' object='bus_test_launch_helper-config-loader-libxml.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` - -bus_test_launch_helper-config-parser-common.o: config-parser-common.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-common.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo -c -o bus_test_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='bus_test_launch_helper-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c - -bus_test_launch_helper-config-parser-common.obj: config-parser-common.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-common.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo -c -o bus_test_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='bus_test_launch_helper-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` - -bus_test_launch_helper-config-parser-trivial.o: config-parser-trivial.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-trivial.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo -c -o bus_test_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='bus_test_launch_helper-config-parser-trivial.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c - -bus_test_launch_helper-config-parser-trivial.obj: config-parser-trivial.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-trivial.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo -c -o bus_test_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='bus_test_launch_helper-config-parser-trivial.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` - -bus_test_launch_helper-desktop-file.o: desktop-file.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-desktop-file.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo -c -o bus_test_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo $(DEPDIR)/bus_test_launch_helper-desktop-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='bus_test_launch_helper-desktop-file.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c - -bus_test_launch_helper-desktop-file.obj: desktop-file.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-desktop-file.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo -c -o bus_test_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo $(DEPDIR)/bus_test_launch_helper-desktop-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='bus_test_launch_helper-desktop-file.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` - -bus_test_launch_helper-utils.o: utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-utils.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-utils.Tpo -c -o bus_test_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-utils.Tpo $(DEPDIR)/bus_test_launch_helper-utils.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='bus_test_launch_helper-utils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c - -bus_test_launch_helper-utils.obj: utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-utils.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-utils.Tpo -c -o bus_test_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-utils.Tpo $(DEPDIR)/bus_test_launch_helper-utils.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='bus_test_launch_helper-utils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` - -bus_test_launch_helper-activation-helper.o: activation-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-activation-helper.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo -c -o bus_test_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo $(DEPDIR)/bus_test_launch_helper-activation-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='bus_test_launch_helper-activation-helper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c - -bus_test_launch_helper-activation-helper.obj: activation-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-activation-helper.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo -c -o bus_test_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo $(DEPDIR)/bus_test_launch_helper-activation-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='bus_test_launch_helper-activation-helper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` - dbus_daemon_launch_helper_test-activation-helper-bin.o: activation-helper-bin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper_test-activation-helper-bin.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Tpo -c -o dbus_daemon_launch_helper_test-activation-helper-bin.o `test -f 'activation-helper-bin.c' || echo '$(srcdir)/'`activation-helper-bin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Tpo $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Po @@ -1129,20 +1043,6 @@ dbus_daemon_launch_helper_test-config-loader-expat.obj: config-loader-expat.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper_test-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` -dbus_daemon_launch_helper_test-config-loader-libxml.o: config-loader-libxml.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper_test-config-loader-libxml.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-libxml.Tpo -c -o dbus_daemon_launch_helper_test-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-libxml.Tpo $(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-libxml.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-libxml.c' object='dbus_daemon_launch_helper_test-config-loader-libxml.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper_test-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c - -dbus_daemon_launch_helper_test-config-loader-libxml.obj: config-loader-libxml.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper_test-config-loader-libxml.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-libxml.Tpo -c -o dbus_daemon_launch_helper_test-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-libxml.Tpo $(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-libxml.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-libxml.c' object='dbus_daemon_launch_helper_test-config-loader-libxml.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper_test-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` - dbus_daemon_launch_helper_test-config-parser-common.o: config-parser-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper_test-config-parser-common.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper_test-config-parser-common.Tpo -c -o dbus_daemon_launch_helper_test-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper_test-config-parser-common.Tpo $(DEPDIR)/dbus_daemon_launch_helper_test-config-parser-common.Po @@ -1213,6 +1113,104 @@ dbus_daemon_launch_helper_test-activation-helper.obj: activation-helper.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper_test-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` +test_bus_launch_helper-test-launch-helper.o: test-launch-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-test-launch-helper.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo -c -o test_bus_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='test_bus_launch_helper-test-launch-helper.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c + +test_bus_launch_helper-test-launch-helper.obj: test-launch-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-test-launch-helper.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo -c -o test_bus_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='test_bus_launch_helper-test-launch-helper.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` + +test_bus_launch_helper-config-loader-expat.o: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-loader-expat.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo -c -o test_bus_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='test_bus_launch_helper-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c + +test_bus_launch_helper-config-loader-expat.obj: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo -c -o test_bus_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='test_bus_launch_helper-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` + +test_bus_launch_helper-config-parser-common.o: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-common.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo -c -o test_bus_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='test_bus_launch_helper-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c + +test_bus_launch_helper-config-parser-common.obj: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-common.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo -c -o test_bus_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='test_bus_launch_helper-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` + +test_bus_launch_helper-config-parser-trivial.o: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-trivial.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo -c -o test_bus_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='test_bus_launch_helper-config-parser-trivial.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c + +test_bus_launch_helper-config-parser-trivial.obj: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-trivial.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo -c -o test_bus_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='test_bus_launch_helper-config-parser-trivial.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` + +test_bus_launch_helper-desktop-file.o: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-desktop-file.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo -c -o test_bus_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo $(DEPDIR)/test_bus_launch_helper-desktop-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='test_bus_launch_helper-desktop-file.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c + +test_bus_launch_helper-desktop-file.obj: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-desktop-file.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo -c -o test_bus_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo $(DEPDIR)/test_bus_launch_helper-desktop-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='test_bus_launch_helper-desktop-file.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` + +test_bus_launch_helper-utils.o: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-utils.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-utils.Tpo -c -o test_bus_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-utils.Tpo $(DEPDIR)/test_bus_launch_helper-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='test_bus_launch_helper-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c + +test_bus_launch_helper-utils.obj: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-utils.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-utils.Tpo -c -o test_bus_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-utils.Tpo $(DEPDIR)/test_bus_launch_helper-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='test_bus_launch_helper-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` + +test_bus_launch_helper-activation-helper.o: activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-activation-helper.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo -c -o test_bus_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo $(DEPDIR)/test_bus_launch_helper-activation-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='test_bus_launch_helper-activation-helper.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c + +test_bus_launch_helper-activation-helper.obj: activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-activation-helper.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo -c -o test_bus_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo $(DEPDIR)/test_bus_launch_helper-activation-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='test_bus_launch_helper-activation-helper.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -1282,26 +1280,15 @@ uninstall-systemdsystemunitDATA: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1313,15 +1300,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1330,6 +1313,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1483,24 +1481,24 @@ uninstall-am: uninstall-agentDATA uninstall-binSCRIPTS \ .MAKE: install-am install-data-am install-exec-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-dbus_daemon_execPROGRAMS clean-generic \ clean-libexecPROGRAMS clean-libtool clean-local \ - clean-noinstPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-agentDATA \ - install-am install-binSCRIPTS install-configDATA install-data \ - install-data-am install-data-hook \ - install-dbus_daemon_execPROGRAMS install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-agentDATA install-am install-binSCRIPTS \ + install-configDATA install-data install-data-am \ + install-data-hook install-dbus_daemon_execPROGRAMS install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-info install-info-am \ install-initdSCRIPTS install-libexecPROGRAMS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemdsystemunitDATA installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-agentDATA uninstall-am \ + tags tags-am uninstall uninstall-agentDATA uninstall-am \ uninstall-binSCRIPTS uninstall-configDATA \ uninstall-dbus_daemon_execPROGRAMS uninstall-initdSCRIPTS \ uninstall-libexecPROGRAMS uninstall-systemdsystemunitDATA diff --git a/bus/activation-helper-bin.c b/bus/activation-helper-bin.c index a360acc7..f5f16d2c 100644 --- a/bus/activation-helper-bin.c +++ b/bus/activation-helper-bin.c @@ -45,6 +45,9 @@ convert_error_to_exit_code (DBusError *error) return BUS_SPAWN_EXIT_CODE_SETUP_FAILED; if (dbus_error_has_name (error, DBUS_ERROR_SPAWN_SERVICE_INVALID)) + return BUS_SPAWN_EXIT_CODE_NAME_INVALID; + + if (dbus_error_has_name (error, DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) return BUS_SPAWN_EXIT_CODE_SERVICE_NOT_FOUND; if (dbus_error_has_name (error, DBUS_ERROR_SPAWN_PERMISSIONS_INVALID)) @@ -65,7 +68,7 @@ convert_error_to_exit_code (DBusError *error) /* should we assert? */ fprintf(stderr, "%s: %s\n", error->name, error->message); - return BUS_SPAWN_EXIT_CODE_SETUP_FAILED; + return BUS_SPAWN_EXIT_CODE_GENERIC_FAILURE; } int diff --git a/bus/activation-helper.c b/bus/activation-helper.c index 8d7ae36f..394f3938 100644 --- a/bus/activation-helper.c +++ b/bus/activation-helper.c @@ -40,6 +40,7 @@ #include <pwd.h> #include <grp.h> +#include <dbus/dbus-misc.h> #include <dbus/dbus-shell.h> #include <dbus/dbus-marshal-validate.h> @@ -156,8 +157,8 @@ clear_environment (DBusError *error) } /* Ensure the bus is set to system */ - _dbus_setenv ("DBUS_STARTER_ADDRESS", DBUS_SYSTEM_BUS_DEFAULT_ADDRESS); - _dbus_setenv ("DBUS_STARTER_BUS_TYPE", "system"); + dbus_setenv ("DBUS_STARTER_ADDRESS", DBUS_SYSTEM_BUS_DEFAULT_ADDRESS); + dbus_setenv ("DBUS_STARTER_BUS_TYPE", "system"); #endif return TRUE; @@ -371,7 +372,7 @@ check_bus_name (const char *bus_name, _dbus_string_init_const (&str, bus_name); if (!_dbus_validate_bus_name (&str, 0, _dbus_string_get_length (&str))) { - dbus_set_error (error, DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND, + dbus_set_error (error, DBUS_ERROR_SPAWN_SERVICE_INVALID, "bus name '%s' is not a valid bus name\n", bus_name); return FALSE; diff --git a/bus/activation.c b/bus/activation.c index 3dfba787..ecd19bb4 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -80,7 +80,14 @@ typedef struct BusPendingActivationEntry BusPendingActivationEntry; struct BusPendingActivationEntry { + /* Normally a method call, but if connection is NULL, this is a signal + * instead. + */ DBusMessage *activation_message; + /* NULL if this activation entry is for the dbus-daemon itself, + * waiting for systemd to start. In this case, auto_activation is always + * TRUE. + */ DBusConnection *connection; dbus_bool_t auto_activation; @@ -1106,7 +1113,8 @@ bus_activation_service_created (BusActivation *activation, BusPendingActivationEntry *entry = link->data; DBusList *next = _dbus_list_get_next_link (&pending_activation->entries, link); - if (dbus_connection_get_is_connected (entry->connection)) + /* entry->connection is NULL for activating systemd */ + if (entry->connection && dbus_connection_get_is_connected (entry->connection)) { /* Only send activation replies to regular activation requests. */ if (!entry->auto_activation) @@ -1154,14 +1162,11 @@ bus_activation_service_created (BusActivation *activation, dbus_bool_t bus_activation_send_pending_auto_activation_messages (BusActivation *activation, BusService *service, - BusTransaction *transaction, - DBusError *error) + BusTransaction *transaction) { BusPendingActivation *pending_activation; DBusList *link; - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - /* Check if it's a pending activation */ pending_activation = _dbus_hash_table_lookup_string (activation->pending_activations, bus_service_get_name (service)); @@ -1175,9 +1180,12 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation BusPendingActivationEntry *entry = link->data; DBusList *next = _dbus_list_get_next_link (&pending_activation->entries, link); - if (entry->auto_activation && dbus_connection_get_is_connected (entry->connection)) + if (entry->auto_activation && (entry->connection == NULL || dbus_connection_get_is_connected (entry->connection))) { DBusConnection *addressed_recipient; + DBusError error; + + dbus_error_init (&error); addressed_recipient = bus_service_get_primary_owners_connection (service); @@ -1185,8 +1193,22 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation if (!bus_dispatch_matches (transaction, entry->connection, addressed_recipient, - entry->activation_message, error)) - goto error; + entry->activation_message, &error)) + { + /* If permission is denied, we just want to return the error + * to the original method invoker; in particular, we don't + * want to make the RequestName call fail with that error + * (see fd.o #78979, CVE-2014-3477). */ + if (!bus_transaction_send_error_reply (transaction, entry->connection, + &error, entry->activation_message)) + { + bus_connection_send_oom_error (entry->connection, + entry->activation_message); + } + + link = next; + continue; + } } link = next; @@ -1195,7 +1217,6 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation if (!add_restore_pending_to_transaction (transaction, pending_activation)) { _dbus_verbose ("Could not add cancel hook to transaction to revert removing pending activation\n"); - BUS_SET_OOM (error); goto error; } @@ -1233,7 +1254,7 @@ try_send_activation_failure (BusPendingActivation *pending_activation, BusPendingActivationEntry *entry = link->data; DBusList *next = _dbus_list_get_next_link (&pending_activation->entries, link); - if (dbus_connection_get_is_connected (entry->connection)) + if (entry->connection && dbus_connection_get_is_connected (entry->connection)) { if (!bus_transaction_send_error_reply (transaction, entry->connection, @@ -1281,6 +1302,10 @@ handle_servicehelper_exit_error (int exit_code, { switch (exit_code) { + case BUS_SPAWN_EXIT_CODE_CONFIG_INVALID: + dbus_set_error (error, DBUS_ERROR_SPAWN_CONFIG_INVALID, + "Invalid configuration (missing or empty <user>?)"); + break; case BUS_SPAWN_EXIT_CODE_NO_MEMORY: dbus_set_error (error, DBUS_ERROR_NO_MEMORY, "Launcher could not run (out of memory)"); @@ -1317,6 +1342,7 @@ handle_servicehelper_exit_error (int exit_code, dbus_set_error (error, DBUS_ERROR_SPAWN_CHILD_SIGNALED, "Launched child was signaled, it probably crashed"); break; + case BUS_SPAWN_EXIT_CODE_GENERIC_FAILURE: default: dbus_set_error (error, DBUS_ERROR_SPAWN_CHILD_EXITED, "Launch helper exited with unknown return code %i", exit_code); @@ -1662,6 +1688,31 @@ out: return retval; } +static void +child_setup (void *user_data) +{ +#ifdef DBUS_UNIX + BusActivation *activation = user_data; + DBusRLimit *initial_fd_limit; + DBusError error; + + dbus_error_init (&error); + initial_fd_limit = bus_context_get_initial_fd_limit (activation->context); + + if (initial_fd_limit != NULL && + !_dbus_rlimit_restore_fd_limit (initial_fd_limit, &error)) + { + /* unfortunately we don't actually know the service name here */ + bus_context_log (activation->context, + DBUS_SYSTEM_LOG_INFO, + "Failed to reset fd limit before activating " + "service: %s: %s", + error.name, error.message); + } +#endif +} + + dbus_bool_t bus_activation_activate_service (BusActivation *activation, DBusConnection *connection, @@ -1759,7 +1810,8 @@ bus_activation_activate_service (BusActivation *activation, pending_activation_entry->activation_message = activation_message; dbus_message_ref (activation_message); pending_activation_entry->connection = connection; - dbus_connection_ref (connection); + if (connection) + dbus_connection_ref (connection); /* Check if the service is being activated */ pending_activation = _dbus_hash_table_lookup_string (activation->pending_activations, service_name); @@ -1972,7 +2024,7 @@ bus_activation_activate_service (BusActivation *activation, service_name, entry->systemd_service); /* systemd is not around, let's "activate" it. */ - retval = bus_activation_activate_service (activation, connection, activation_transaction, TRUE, + retval = bus_activation_activate_service (activation, NULL, activation_transaction, TRUE, message, "org.freedesktop.systemd1", error); } @@ -2090,9 +2142,12 @@ bus_activation_activate_service (BusActivation *activation, dbus_error_init (&tmp_error); - if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, argv, + if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, + service_name, + argv, envp, - NULL, activation, + child_setup, + activation, &tmp_error)) { _dbus_verbose ("Failed to spawn child\n"); @@ -2170,7 +2225,7 @@ bus_activation_list_services (BusActivation *activation, error: for (j = 0; j < i; j++) - dbus_free (retval[i]); + dbus_free (retval[j]); dbus_free (retval); return FALSE; @@ -2223,7 +2278,7 @@ dbus_activation_systemd_failure (BusActivation *activation, return TRUE; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include <stdio.h> @@ -2530,11 +2585,17 @@ dbus_bool_t bus_activation_service_reload_test (const DBusString *test_data_dir) { DBusString directory; + const char *tmp; if (!_dbus_string_init (&directory)) return FALSE; - if (!_dbus_string_append (&directory, _dbus_get_tmpdir())) + tmp = _dbus_get_tmpdir (); + + if (tmp == NULL) + return FALSE; + + if (!_dbus_string_append (&directory, tmp)) return FALSE; if (!_dbus_string_append (&directory, "/dbus-reload-test-") || @@ -2570,4 +2631,4 @@ bus_activation_service_reload_test (const DBusString *test_data_dir) return TRUE; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/activation.h b/bus/activation.h index 97f25b1f..fc5d426f 100644 --- a/bus/activation.h +++ b/bus/activation.h @@ -62,8 +62,7 @@ dbus_bool_t dbus_activation_systemd_failure (BusActivation *activation, dbus_bool_t bus_activation_send_pending_auto_activation_messages (BusActivation *activation, BusService *service, - BusTransaction *transaction, - DBusError *error); + BusTransaction *transaction); #endif /* BUS_ACTIVATION_H */ @@ -39,6 +39,7 @@ #include <dbus/dbus-hash.h> #include <dbus/dbus-credentials.h> #include <dbus/dbus-internals.h> +#include <dbus/dbus-server-protected.h> #ifdef DBUS_CYGWIN #include <signal.h> @@ -63,11 +64,13 @@ struct BusContext BusPolicy *policy; BusMatchmaker *matchmaker; BusLimits limits; + DBusRLimit *initial_fd_limit; unsigned int fork : 1; unsigned int syslog : 1; unsigned int keep_umask : 1; unsigned int allow_anonymous : 1; unsigned int systemd_activation : 1; + dbus_bool_t watches_enabled; }; static dbus_int32_t server_data_slot = -1; @@ -287,7 +290,7 @@ process_config_first_time_only (BusContext *context, auth_mechanisms = NULL; pidfile = NULL; - _dbus_init_system_log (); + _dbus_init_system_log (TRUE); if (flags & BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION) context->systemd_activation = TRUE; @@ -526,6 +529,18 @@ process_config_every_time (BusContext *context, context->policy = bus_config_parser_steal_policy (parser); _dbus_assert (context->policy != NULL); + /* context->connections is NULL when creating new BusContext */ + if (context->connections) + { + _dbus_verbose ("Reload policy rules for completed connections\n"); + retval = bus_connections_reload_policy (context->connections, error); + if (!retval) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto failed; + } + } + /* We have to build the address backward, so that * <listen> later in the config file have priority */ @@ -645,19 +660,38 @@ oom: static void raise_file_descriptor_limit (BusContext *context) { +#ifdef DBUS_UNIX + DBusError error = DBUS_ERROR_INIT; - /* I just picked this out of thin air; we need some extra - * descriptors for things like any internal pipes we create, - * inotify, connections to SELinux, etc. - */ - unsigned int arbitrary_extra_fds = 32; - unsigned int limit; + /* we only do this once */ + if (context->initial_fd_limit != NULL) + return; - limit = context->limits.max_completed_connections + - context->limits.max_incomplete_connections - + arbitrary_extra_fds; + context->initial_fd_limit = _dbus_rlimit_save_fd_limit (&error); + + if (context->initial_fd_limit == NULL) + { + bus_context_log (context, DBUS_SYSTEM_LOG_INFO, + "%s: %s", error.name, error.message); + dbus_error_free (&error); + return; + } - _dbus_request_file_descriptor_limit (limit); + /* We used to compute a suitable rlimit based on the configured number + * of connections, but that breaks down as soon as we allow fd-passing, + * because each connection is allowed to pass 64 fds to us, and if + * they all did, we'd hit kernel limits. We now hard-code 64k as a + * good limit, like systemd does: that's enough to avoid DoS from + * anything short of multiple uids conspiring against us. + */ + if (!_dbus_rlimit_raise_fd_limit_if_privileged (65536, &error)) + { + bus_context_log (context, DBUS_SYSTEM_LOG_INFO, + "%s: %s", error.name, error.message); + dbus_error_free (&error); + return; + } +#endif } static dbus_bool_t @@ -746,6 +780,8 @@ bus_context_new (const DBusString *config_file, goto failed; } + context->watches_enabled = TRUE; + context->registry = bus_registry_new (context); if (context->registry == NULL) { @@ -894,7 +930,7 @@ bus_context_new (const DBusString *config_file, if (!bus_selinux_full_init ()) { - bus_context_log (context, DBUS_SYSTEM_LOG_FATAL, "SELinux enabled but AVC initialization failed; check system log\n"); + bus_context_log (context, DBUS_SYSTEM_LOG_FATAL, "SELinux enabled but D-Bus initialization failed; check system log\n"); } if (!process_config_postinit (context, parser, error)) @@ -1114,6 +1150,10 @@ bus_context_unref (BusContext *context) dbus_free (context->pidfile); } + + if (context->initial_fd_limit) + _dbus_rlimit_free (context->initial_fd_limit); + dbus_free (context); dbus_server_free_data_slot (&server_data_slot); @@ -1225,6 +1265,12 @@ bus_context_get_auth_timeout (BusContext *context) } int +bus_context_get_pending_fd_timeout (BusContext *context) +{ + return context->limits.pending_fd_timeout; +} + +int bus_context_get_max_completed_connections (BusContext *context) { return context->limits.max_completed_connections; @@ -1272,6 +1318,12 @@ bus_context_get_reply_timeout (BusContext *context) return context->limits.reply_timeout; } +DBusRLimit * +bus_context_get_initial_fd_limit (BusContext *context) +{ + return context->initial_fd_limit; +} + void bus_context_log (BusContext *context, DBusSystemLogSeverity severity, const char *msg, ...) _DBUS_GNUC_PRINTF (3, 4); @@ -1608,7 +1660,7 @@ bus_context_check_security_policy (BusContext *context, complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, "Rejected receive message", toggles, message, sender, proposed_recipient, requested_reply, - (addressed_recipient == proposed_recipient), NULL); + (addressed_recipient == proposed_recipient), error); _dbus_verbose ("security policy disallowing message due to recipient policy\n"); return FALSE; } @@ -1646,3 +1698,36 @@ bus_context_check_security_policy (BusContext *context, _dbus_verbose ("security policy allowing message\n"); return TRUE; } + +void +bus_context_check_all_watches (BusContext *context) +{ + DBusList *link; + dbus_bool_t enabled = TRUE; + + if (bus_connections_get_n_incomplete (context->connections) >= + bus_context_get_max_incomplete_connections (context)) + { + enabled = FALSE; + } + + if (context->watches_enabled == enabled) + return; + + context->watches_enabled = enabled; + + for (link = _dbus_list_get_first_link (&context->servers); + link != NULL; + link = _dbus_list_get_next_link (&context->servers, link)) + { + /* A BusContext might contains several DBusServer (if there are + * several <listen> configuration items) and a DBusServer might + * contain several DBusWatch in its DBusWatchList (if getaddrinfo + * returns several addresses on a dual IPv4-IPv6 stack or if + * systemd passes several fds). + * We want to enable/disable them all. + */ + DBusServer *server = link->data; + _dbus_server_toggle_all_watches (server, enabled); + } +} @@ -54,6 +54,7 @@ typedef struct long max_message_unix_fds; /**< Max number of unix fds of a single message*/ int activation_timeout; /**< How long to wait for an activation to time out */ int auth_timeout; /**< How long to wait for an authentication to time out */ + int pending_fd_timeout; /**< How long to wait for a D-Bus message with a fd to time out */ int max_completed_connections; /**< Max number of authorized connections */ int max_incomplete_connections; /**< Max number of incomplete connections */ int max_connections_per_user; /**< Max number of connections auth'd as same user */ @@ -106,6 +107,7 @@ BusClientPolicy* bus_context_create_client_policy (BusContext DBusError *error); int bus_context_get_activation_timeout (BusContext *context); int bus_context_get_auth_timeout (BusContext *context); +int bus_context_get_pending_fd_timeout (BusContext *context); int bus_context_get_max_completed_connections (BusContext *context); int bus_context_get_max_incomplete_connections (BusContext *context); int bus_context_get_max_connections_per_user (BusContext *context); @@ -114,6 +116,7 @@ int bus_context_get_max_services_per_connection (BusContext int bus_context_get_max_match_rules_per_connection (BusContext *context); int bus_context_get_max_replies_per_connection (BusContext *context); int bus_context_get_reply_timeout (BusContext *context); +DBusRLimit * bus_context_get_initial_fd_limit (BusContext *context); void bus_context_log (BusContext *context, DBusSystemLogSeverity severity, const char *msg, @@ -125,5 +128,6 @@ dbus_bool_t bus_context_check_security_policy (BusContext DBusConnection *proposed_recipient, DBusMessage *message, DBusError *error); +void bus_context_check_all_watches (BusContext *context); #endif /* BUS_BUS_H */ diff --git a/bus/config-loader-libxml.c b/bus/config-loader-libxml.c deleted file mode 100644 index c73a1815..00000000 --- a/bus/config-loader-libxml.c +++ /dev/null @@ -1,324 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* config-loader-libxml.c libxml2 XML loader - * - * Copyright (C) 2003 Red Hat, Inc. - * - * Licensed under the Academic Free License version 2.1 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <config.h> -#include "config-parser.h" -#include <dbus/dbus-internals.h> -#include <libxml/xmlreader.h> -#include <libxml/parser.h> -#include <libxml/globals.h> -#include <libxml/xmlmemory.h> -#ifdef HAVE_ERRNO_H -#include <errno.h> -#endif -#include <string.h> - -/* About the error handling: - * - setup a "structured" error handler that catches structural - * errors and some oom errors - * - assume that a libxml function returning an error code means - * out-of-memory - */ -#define _DBUS_MAYBE_SET_OOM(e) (dbus_error_is_set(e) ? (void)0 : _DBUS_SET_OOM(e)) - - -static dbus_bool_t -xml_text_start_element (BusConfigParser *parser, - xmlTextReader *reader, - DBusError *error) -{ - const char *name; - int n_attributes; - const char **attribute_names, **attribute_values; - dbus_bool_t ret; - int i, status, is_empty; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - ret = FALSE; - attribute_names = NULL; - attribute_values = NULL; - - name = xmlTextReaderConstName (reader); - n_attributes = xmlTextReaderAttributeCount (reader); - is_empty = xmlTextReaderIsEmptyElement (reader); - - if (name == NULL || n_attributes < 0 || is_empty == -1) - { - _DBUS_MAYBE_SET_OOM (error); - goto out; - } - - attribute_names = dbus_new0 (const char *, n_attributes + 1); - attribute_values = dbus_new0 (const char *, n_attributes + 1); - if (attribute_names == NULL || attribute_values == NULL) - { - _DBUS_SET_OOM (error); - goto out; - } - i = 0; - while ((status = xmlTextReaderMoveToNextAttribute (reader)) == 1) - { - _dbus_assert (i < n_attributes); - attribute_names[i] = xmlTextReaderConstName (reader); - attribute_values[i] = xmlTextReaderConstValue (reader); - if (attribute_names[i] == NULL || attribute_values[i] == NULL) - { - _DBUS_MAYBE_SET_OOM (error); - goto out; - } - i++; - } - if (status == -1) - { - _DBUS_MAYBE_SET_OOM (error); - goto out; - } - _dbus_assert (i == n_attributes); - - ret = bus_config_parser_start_element (parser, name, - attribute_names, attribute_values, - error); - if (ret && is_empty == 1) - ret = bus_config_parser_end_element (parser, name, error); - - out: - dbus_free (attribute_names); - dbus_free (attribute_values); - - return ret; -} - -static void xml_shut_up (void *ctx, const char *msg, ...) -{ - return; -} - -static void -xml_text_reader_error (void *arg, xmlErrorPtr xml_error) -{ - DBusError *error = arg; - -#if 0 - _dbus_verbose ("XML_ERROR level=%d, domain=%d, code=%d, msg=%s\n", - xml_error->level, xml_error->domain, - xml_error->code, xml_error->message); -#endif - - if (!dbus_error_is_set (error)) - { - if (xml_error->code == XML_ERR_NO_MEMORY) - _DBUS_SET_OOM (error); - else if (xml_error->level == XML_ERR_ERROR || - xml_error->level == XML_ERR_FATAL) - dbus_set_error (error, DBUS_ERROR_FAILED, - "Error loading config file: '%s'", - xml_error->message); - } -} - - -BusConfigParser* -bus_config_load (const DBusString *file, - dbus_bool_t is_toplevel, - const BusConfigParser *parent, - DBusError *error) - -{ - xmlTextReader *reader; - BusConfigParser *parser; - DBusString dirname, data; - DBusError tmp_error; - int ret; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - parser = NULL; - reader = NULL; - - if (!_dbus_string_init (&dirname)) - { - _DBUS_SET_OOM (error); - return NULL; - } - - if (!_dbus_string_init (&data)) - { - _DBUS_SET_OOM (error); - _dbus_string_free (&dirname); - return NULL; - } - - if (is_toplevel) - { - /* xmlMemSetup only fails if one of the functions is NULL */ - xmlMemSetup (dbus_free, - dbus_malloc, - dbus_realloc, - _dbus_strdup); - xmlInitParser (); - xmlSetGenericErrorFunc (NULL, xml_shut_up); - } - - if (!_dbus_string_get_dirname (file, &dirname)) - { - _DBUS_SET_OOM (error); - goto failed; - } - - parser = bus_config_parser_new (&dirname, is_toplevel, parent); - if (parser == NULL) - { - _DBUS_SET_OOM (error); - goto failed; - } - - if (!_dbus_file_get_contents (&data, file, error)) - goto failed; - - reader = xmlReaderForMemory (_dbus_string_get_const_data (&data), - _dbus_string_get_length (&data), - NULL, NULL, 0); - if (reader == NULL) - { - _DBUS_SET_OOM (error); - goto failed; - } - - xmlTextReaderSetParserProp (reader, XML_PARSER_SUBST_ENTITIES, 1); - - dbus_error_init (&tmp_error); - xmlTextReaderSetStructuredErrorHandler (reader, xml_text_reader_error, &tmp_error); - - while ((ret = xmlTextReaderRead (reader)) == 1) - { - int type; - - if (dbus_error_is_set (&tmp_error)) - goto reader_out; - - type = xmlTextReaderNodeType (reader); - if (type == -1) - { - _DBUS_MAYBE_SET_OOM (&tmp_error); - goto reader_out; - } - - switch ((xmlReaderTypes) type) { - case XML_READER_TYPE_ELEMENT: - xml_text_start_element (parser, reader, &tmp_error); - break; - - case XML_READER_TYPE_TEXT: - case XML_READER_TYPE_CDATA: - { - DBusString content; - const char *value; - value = xmlTextReaderConstValue (reader); - if (value != NULL) - { - _dbus_string_init_const (&content, value); - bus_config_parser_content (parser, &content, &tmp_error); - } - else - _DBUS_MAYBE_SET_OOM (&tmp_error); - break; - } - - case XML_READER_TYPE_DOCUMENT_TYPE: - { - const char *name; - name = xmlTextReaderConstName (reader); - if (name != NULL) - bus_config_parser_check_doctype (parser, name, &tmp_error); - else - _DBUS_MAYBE_SET_OOM (&tmp_error); - break; - } - - case XML_READER_TYPE_END_ELEMENT: - { - const char *name; - name = xmlTextReaderConstName (reader); - if (name != NULL) - bus_config_parser_end_element (parser, name, &tmp_error); - else - _DBUS_MAYBE_SET_OOM (&tmp_error); - break; - } - - case XML_READER_TYPE_DOCUMENT: - case XML_READER_TYPE_DOCUMENT_FRAGMENT: - case XML_READER_TYPE_PROCESSING_INSTRUCTION: - case XML_READER_TYPE_COMMENT: - case XML_READER_TYPE_ENTITY: - case XML_READER_TYPE_NOTATION: - case XML_READER_TYPE_WHITESPACE: - case XML_READER_TYPE_SIGNIFICANT_WHITESPACE: - case XML_READER_TYPE_END_ENTITY: - case XML_READER_TYPE_XML_DECLARATION: - /* nothing to do, just read on */ - break; - - case XML_READER_TYPE_NONE: - case XML_READER_TYPE_ATTRIBUTE: - case XML_READER_TYPE_ENTITY_REFERENCE: - _dbus_assert_not_reached ("unexpected nodes in XML"); - } - - if (dbus_error_is_set (&tmp_error)) - goto reader_out; - } - - if (ret == -1) - _DBUS_MAYBE_SET_OOM (&tmp_error); - - reader_out: - xmlFreeTextReader (reader); - reader = NULL; - if (dbus_error_is_set (&tmp_error)) - { - dbus_move_error (&tmp_error, error); - goto failed; - } - - if (!bus_config_parser_finished (parser, error)) - goto failed; - _dbus_string_free (&dirname); - _dbus_string_free (&data); - if (is_toplevel) - xmlCleanupParser(); - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - return parser; - - failed: - _DBUS_ASSERT_ERROR_IS_SET (error); - _dbus_string_free (&dirname); - _dbus_string_free (&data); - if (is_toplevel) - xmlCleanupParser(); - if (parser) - bus_config_parser_unref (parser); - _dbus_assert (reader == NULL); /* must go to reader_out first */ - return NULL; -} diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index 6ef50f8e..64a05c3a 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -330,7 +330,7 @@ bus_config_parser_get_service_dirs (BusConfigParser *parser) return &parser->service_dirs; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include <stdio.h> #include "test.h" @@ -712,5 +712,5 @@ finish: return retval; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/config-parser.c b/bus/config-parser.c index 07e8fbb6..ee2d4e7d 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -30,6 +30,7 @@ #include "selinux.h" #include <dbus/dbus-list.h> #include <dbus/dbus-internals.h> +#include <dbus/dbus-misc.h> #include <dbus/dbus-sysdeps.h> #include <string.h> @@ -317,13 +318,23 @@ merge_included (BusConfigParser *parser, if (included->keep_umask) parser->keep_umask = TRUE; + if (included->allow_anonymous) + parser->allow_anonymous = TRUE; + if (included->pidfile != NULL) { dbus_free (parser->pidfile); 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); @@ -413,9 +424,9 @@ bus_config_parser_new (const DBusString *basedir, maximum number of file descriptors we can receive. Picking a high value here thus translates directly to more memory allocation. */ - parser->limits.max_incoming_unix_fds = 1024*4; - parser->limits.max_outgoing_unix_fds = 1024*4; - parser->limits.max_message_unix_fds = 1024; + parser->limits.max_incoming_unix_fds = DBUS_DEFAULT_MESSAGE_UNIX_FDS*4; + parser->limits.max_outgoing_unix_fds = DBUS_DEFAULT_MESSAGE_UNIX_FDS*4; + parser->limits.max_message_unix_fds = DBUS_DEFAULT_MESSAGE_UNIX_FDS; /* Making this long means the user has to wait longer for an error * message if something screws up, but making it too short means @@ -428,6 +439,11 @@ bus_config_parser_new (const DBusString *basedir, * password) is allowed, then potentially it has to be quite long. */ parser->limits.auth_timeout = 30000; /* 30 seconds */ + + /* Do not allow a fd to stay forever in dbus-daemon + * https://bugs.freedesktop.org/show_bug.cgi?id=80559 + */ + parser->limits.pending_fd_timeout = 150000; /* 2.5 minutes */ parser->limits.max_incomplete_connections = 64; parser->limits.max_connections_per_user = 256; @@ -456,7 +472,7 @@ bus_config_parser_new (const DBusString *basedir, /* this is effectively a limit on message queue size for messages * that require a reply */ - parser->limits.max_replies_per_connection = 1024*8; + parser->limits.max_replies_per_connection = 128; } parser->refcount = 1; @@ -1891,6 +1907,12 @@ set_limit (BusConfigParser *parser, must_be_int = TRUE; parser->limits.auth_timeout = value; } + else if (strcmp (name, "pending_fd_timeout") == 0) + { + must_be_positive = TRUE; + must_be_int = TRUE; + parser->limits.pending_fd_timeout = value; + } else if (strcmp (name, "reply_timeout") == 0) { must_be_positive = TRUE; @@ -2735,7 +2757,7 @@ bus_config_parser_steal_service_context_table (BusConfigParser *parser) return table; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include <stdio.h> typedef enum @@ -3097,6 +3119,7 @@ limits_equal (const BusLimits *a, || a->max_message_unix_fds == b->max_message_unix_fds || a->activation_timeout == b->activation_timeout || a->auth_timeout == b->auth_timeout + || a->pending_fd_timeout == b->pending_fd_timeout || a->max_completed_connections == b->max_completed_connections || a->max_incomplete_connections == b->max_incomplete_connections || a->max_connections_per_user == b->max_connections_per_user @@ -3410,10 +3433,10 @@ test_default_session_servicedirs (void) } #ifdef DBUS_UNIX - if (!_dbus_setenv ("XDG_DATA_HOME", "/testhome/foo/.testlocal/testshare")) + if (!dbus_setenv ("XDG_DATA_HOME", "/testhome/foo/.testlocal/testshare")) _dbus_assert_not_reached ("couldn't setenv XDG_DATA_HOME"); - if (!_dbus_setenv ("XDG_DATA_DIRS", ":/testusr/testlocal/testshare: :/testusr/testshare:")) + if (!dbus_setenv ("XDG_DATA_DIRS", ":/testusr/testlocal/testshare: :/testusr/testshare:")) _dbus_assert_not_reached ("couldn't setenv XDG_DATA_DIRS"); #endif if (!_dbus_get_standard_session_servicedirs (&dirs)) @@ -3543,10 +3566,10 @@ test_default_system_servicedirs (void) } #ifdef DBUS_UNIX - if (!_dbus_setenv ("XDG_DATA_HOME", "/testhome/foo/.testlocal/testshare")) + if (!dbus_setenv ("XDG_DATA_HOME", "/testhome/foo/.testlocal/testshare")) _dbus_assert_not_reached ("couldn't setenv XDG_DATA_HOME"); - if (!_dbus_setenv ("XDG_DATA_DIRS", ":/testusr/testlocal/testshare: :/testusr/testshare:")) + if (!dbus_setenv ("XDG_DATA_DIRS", ":/testusr/testlocal/testshare: :/testusr/testshare:")) _dbus_assert_not_reached ("couldn't setenv XDG_DATA_DIRS"); #endif if (!_dbus_get_standard_system_servicedirs (&dirs)) @@ -3629,5 +3652,5 @@ bus_config_parser_test (const DBusString *test_data_dir) return TRUE; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/connection.c b/bus/connection.c index d69758c9..7107434f 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -33,6 +33,7 @@ #include <dbus/dbus-list.h> #include <dbus/dbus-hash.h> #include <dbus/dbus-timeout.h> +#include <dbus/dbus-connection-internal.h> /* Trim executed commands to this length; we want to keep logs readable */ #define MAX_LOG_COMMAND_LEN 50 @@ -102,6 +103,8 @@ typedef struct int peak_match_rules; int peak_bus_names; #endif + int n_pending_unix_fds; + DBusTimeout *pending_unix_fds_timeout; } BusConnectionData; static dbus_bool_t bus_pending_reply_expired (BusExpireList *list, @@ -268,6 +271,15 @@ bus_connection_disconnected (DBusConnection *connection) dbus_connection_set_dispatch_status_function (connection, NULL, NULL, NULL); + + if (d->pending_unix_fds_timeout) + { + _dbus_loop_remove_timeout (bus_context_get_loop (d->connections->context), + d->pending_unix_fds_timeout); + _dbus_timeout_unref (d->pending_unix_fds_timeout); + } + d->pending_unix_fds_timeout = NULL; + _dbus_connection_set_pending_fds_function (connection, NULL, NULL); bus_connection_remove_transactions (connection); @@ -293,6 +305,10 @@ bus_connection_disconnected (DBusConnection *connection) _dbus_list_remove_link (&d->connections->incomplete, d->link_in_connection_list); d->link_in_connection_list = NULL; d->connections->n_incomplete -= 1; + + /* If we have dropped below the max. number of incomplete + * connections, start accept()ing again */ + bus_context_check_all_watches (d->connections->context); } _dbus_assert (d->connections->n_incomplete >= 0); @@ -588,6 +604,42 @@ oom: return FALSE; } +static void +check_pending_fds_cb (DBusConnection *connection) +{ + BusConnectionData *d = BUS_CONNECTION_DATA (connection); + int n_pending_unix_fds_old = d->n_pending_unix_fds; + int n_pending_unix_fds_new; + + n_pending_unix_fds_new = _dbus_connection_get_pending_fds_count (connection); + + _dbus_verbose ("Pending fds count changed on connection %p: %d -> %d\n", + connection, n_pending_unix_fds_old, n_pending_unix_fds_new); + + if (n_pending_unix_fds_old == 0 && n_pending_unix_fds_new > 0) + { + _dbus_timeout_set_interval (d->pending_unix_fds_timeout, + bus_context_get_pending_fd_timeout (d->connections->context)); + _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, TRUE); + } + + if (n_pending_unix_fds_old > 0 && n_pending_unix_fds_new == 0) + { + _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, FALSE); + } + + + d->n_pending_unix_fds = n_pending_unix_fds_new; +} + +static dbus_bool_t +pending_unix_fds_timeout_cb (void *data) +{ + DBusConnection *connection = data; + dbus_connection_close (connection); + return TRUE; +} + dbus_bool_t bus_connections_setup_connection (BusConnections *connections, DBusConnection *connection) @@ -683,36 +735,38 @@ bus_connections_setup_connection (BusConnections *connections, } } + /* Setup pending fds timeout (see #80559) */ + d->pending_unix_fds_timeout = _dbus_timeout_new (100, /* irrelevant */ + pending_unix_fds_timeout_cb, + connection, NULL); + if (d->pending_unix_fds_timeout == NULL) + goto out; + + _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, FALSE); + if (!_dbus_loop_add_timeout (bus_context_get_loop (connections->context), + d->pending_unix_fds_timeout)) + goto out; + + _dbus_connection_set_pending_fds_function (connection, + (DBusPendingFdsChangeFunction) check_pending_fds_cb, + connection); + _dbus_list_append_link (&connections->incomplete, d->link_in_connection_list); connections->n_incomplete += 1; dbus_connection_ref (connection); - /* Note that we might disconnect ourselves here, but it only takes - * effect on return to the main loop. We call this to free up - * expired connections if possible, and to queue the timeout for our - * own expiration. - */ bus_connections_expire_incomplete (connections); - /* And we might also disconnect ourselves here, but again it - * only takes effect on return to main loop. - */ - if (connections->n_incomplete > - bus_context_get_max_incomplete_connections (connections->context)) - { - _dbus_verbose ("Number of incomplete connections exceeds max, dropping oldest one\n"); - - _dbus_assert (connections->incomplete != NULL); - /* Disconnect the oldest unauthenticated connection. FIXME - * would it be more secure to drop a *random* connection? This - * algorithm seems to mean that if someone can create new - * connections quickly enough, they can keep anyone else from - * completing authentication. But random may or may not really - * help with that, a more elaborate solution might be required. - */ - dbus_connection_close (connections->incomplete->data); - } + /* The listening socket is removed from the main loop, + * i.e. does not accept(), while n_incomplete is at its + * maximum value; so we shouldn't get here in that case */ + _dbus_assert (connections->n_incomplete <= + bus_context_get_max_incomplete_connections (connections->context)); + + /* If we have the maximum number of incomplete connections, + * stop accept()ing any more, to avert a DoS. See fd.o #80919 */ + bus_context_check_all_watches (d->connections->context); retval = TRUE; @@ -744,6 +798,13 @@ bus_connections_setup_connection (BusConnections *connections, dbus_connection_set_dispatch_status_function (connection, NULL, NULL, NULL); + if (d->pending_unix_fds_timeout) + _dbus_timeout_unref (d->pending_unix_fds_timeout); + + d->pending_unix_fds_timeout = NULL; + + _dbus_connection_set_pending_fds_function (connection, NULL, NULL); + if (d->link_in_connection_list != NULL) { _dbus_assert (d->link_in_connection_list->next == NULL); @@ -799,6 +860,14 @@ bus_connections_expire_incomplete (BusConnections *connections) if (elapsed >= (double) auth_timeout) { + /* Unfortunately, we can't identify the connection: it doesn't + * have a unique name yet, we don't know its uid/pid yet, + * and so on. */ + bus_context_log (connections->context, DBUS_SYSTEM_LOG_INFO, + "Connection has not authenticated soon enough, closing it " + "(auth_timeout=%dms, elapsed: %.0fms)", + auth_timeout, elapsed); + _dbus_verbose ("Timing out authentication for connection %p\n", connection); dbus_connection_close (connection); } @@ -1419,6 +1488,10 @@ bus_connection_complete (DBusConnection *connection, _dbus_assert (d->connections->n_incomplete >= 0); _dbus_assert (d->connections->n_completed > 0); + /* If we have dropped below the max. number of incomplete + * connections, start accept()ing again */ + bus_context_check_all_watches (d->connections->context); + /* See if we can remove the timeout */ bus_connections_expire_incomplete (d->connections); @@ -1435,6 +1508,42 @@ fail: return FALSE; } +dbus_bool_t +bus_connections_reload_policy (BusConnections *connections, + DBusError *error) +{ + BusConnectionData *d; + DBusConnection *connection; + DBusList *link; + + _dbus_assert (connections != NULL); + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + for (link = _dbus_list_get_first_link (&(connections->completed)); + link; + link = _dbus_list_get_next_link (&(connections->completed), link)) + { + connection = link->data; + d = BUS_CONNECTION_DATA (connection); + _dbus_assert (d != NULL); + _dbus_assert (d->policy != NULL); + + bus_client_policy_unref (d->policy); + d->policy = bus_context_create_client_policy (connections->context, + connection, + error); + if (d->policy == NULL) + { + _dbus_verbose ("Failed to create security policy for connection %p\n", + connection); + _DBUS_ASSERT_ERROR_IS_SET (error); + return FALSE; + } + } + + return TRUE; +} + const char * bus_connection_get_name (DBusConnection *connection) { @@ -1990,12 +2099,6 @@ bus_transaction_get_context (BusTransaction *transaction) return transaction->context; } -BusConnections* -bus_transaction_get_connections (BusTransaction *transaction) -{ - return bus_context_get_connections (transaction->context); -} - dbus_bool_t bus_transaction_send_from_driver (BusTransaction *transaction, DBusConnection *connection, @@ -2126,6 +2229,16 @@ bus_transaction_send (BusTransaction *transaction, } static void +transaction_free (BusTransaction *transaction) +{ + _dbus_assert (transaction->connections == NULL); + + free_cancel_hooks (transaction); + + dbus_free (transaction); +} + +static void connection_cancel_transaction (DBusConnection *connection, BusTransaction *transaction) { @@ -2163,14 +2276,10 @@ bus_transaction_cancel_and_free (BusTransaction *transaction) while ((connection = _dbus_list_pop_first (&transaction->connections))) connection_cancel_transaction (connection, transaction); - _dbus_assert (transaction->connections == NULL); - _dbus_list_foreach (&transaction->cancel_hooks, cancel_hook_cancel, NULL); - free_cancel_hooks (transaction); - - dbus_free (transaction); + transaction_free (transaction); } static void @@ -2224,11 +2333,7 @@ bus_transaction_execute_and_free (BusTransaction *transaction) while ((connection = _dbus_list_pop_first (&transaction->connections))) connection_execute_transaction (connection, transaction); - _dbus_assert (transaction->connections == NULL); - - free_cancel_hooks (transaction); - - dbus_free (transaction); + transaction_free (transaction); } static void @@ -2316,7 +2421,6 @@ bus_transaction_add_cancel_hook (BusTransaction *transaction, return TRUE; } -#ifdef DBUS_ENABLE_STATS int bus_connections_get_n_active (BusConnections *connections) { @@ -2329,6 +2433,7 @@ bus_connections_get_n_incomplete (BusConnections *connections) return connections->n_incomplete; } +#ifdef DBUS_ENABLE_STATS int bus_connections_get_total_match_rules (BusConnections *connections) { diff --git a/bus/connection.h b/bus/connection.h index c9360212..6fbcd38d 100644 --- a/bus/connection.h +++ b/bus/connection.h @@ -45,6 +45,8 @@ void bus_connections_foreach_active (BusConnections void *data); BusContext* bus_connections_get_context (BusConnections *connections); void bus_connections_increment_stamp (BusConnections *connections); +dbus_bool_t bus_connections_reload_policy (BusConnections *connections, + DBusError *error); BusContext* bus_connection_get_context (DBusConnection *connection); BusConnections* bus_connection_get_connections (DBusConnection *connection); BusRegistry* bus_connection_get_registry (DBusConnection *connection); @@ -120,7 +122,6 @@ typedef void (* BusTransactionCancelFunction) (void *data); BusTransaction* bus_transaction_new (BusContext *context); BusContext* bus_transaction_get_context (BusTransaction *transaction); -BusConnections* bus_transaction_get_connections (BusTransaction *transaction); dbus_bool_t bus_transaction_send (BusTransaction *transaction, DBusConnection *connection, DBusMessage *message); @@ -138,9 +139,10 @@ dbus_bool_t bus_transaction_add_cancel_hook (BusTransaction * void *data, DBusFreeFunction free_data_function); -/* called by stats.c, only present if DBUS_ENABLE_STATS */ int bus_connections_get_n_active (BusConnections *connections); int bus_connections_get_n_incomplete (BusConnections *connections); + +/* called by stats.c, only present if DBUS_ENABLE_STATS */ int bus_connections_get_total_match_rules (BusConnections *connections); int bus_connections_get_peak_match_rules (BusConnections *connections); int bus_connections_get_peak_match_rules_per_conn (BusConnections *connections); diff --git a/bus/dbus.service.in b/bus/dbus.service.in index 160947c7..3bc4726a 100644 --- a/bus/dbus.service.in +++ b/bus/dbus.service.in @@ -1,7 +1,7 @@ [Unit] Description=D-Bus System Message Bus +Documentation=man:dbus-daemon(1) Requires=dbus.socket -After=syslog.target [Service] ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation diff --git a/bus/desktop-file.c b/bus/desktop-file.c index ae441c5e..bfeb72e2 100644 --- a/bus/desktop-file.c +++ b/bus/desktop-file.c @@ -688,6 +688,12 @@ bus_desktop_file_load (DBusString *filename, else if (is_blank_line (&parser) || _dbus_string_get_byte (&parser.data, parser.pos) == '#') parse_comment_or_blank (&parser); + else if (parser.current_section < 0) + { + dbus_set_error(error, DBUS_ERROR_FAILED, + "invalid service file: key=value before [Section]"); + return NULL; + } else { if (!parse_key_value (&parser, error)) diff --git a/bus/desktop-file.h b/bus/desktop-file.h index 58e78e8f..e405625c 100644 --- a/bus/desktop-file.h +++ b/bus/desktop-file.h @@ -34,7 +34,6 @@ #define DBUS_SERVICE_NAME "Name" #define DBUS_SERVICE_EXEC "Exec" #define DBUS_SERVICE_USER "User" -#define DBUS_SERVICE_GROUP "Group" #define DBUS_SERVICE_SYSTEMD_SERVICE "SystemdService" typedef struct BusDesktopFile BusDesktopFile; diff --git a/bus/dir-watch-dnotify.c b/bus/dir-watch-dnotify.c deleted file mode 100644 index b38d7d19..00000000 --- a/bus/dir-watch-dnotify.c +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* dir-watch-dnotify.c OS specific directory change notification for message bus - * - * Copyright (C) 2003 Red Hat, Inc. - * - * Licensed under the Academic Free License version 2.1 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <config.h> - -#define _GNU_SOURCE -#include <stdlib.h> -#include <unistd.h> -#include <fcntl.h> -#ifdef HAVE_ERRNO_H -#include <errno.h> -#endif - -#include <dbus/dbus-internals.h> -#include "dir-watch.h" - -#define MAX_DIRS_TO_WATCH 128 - -/* use a static array to avoid handling OOM */ -static int fds[MAX_DIRS_TO_WATCH]; -static int num_fds = 0; - -void -bus_watch_directory (const char *dir, BusContext *context) -{ - int fd; - - _dbus_assert (dir != NULL); - - if (num_fds >= MAX_DIRS_TO_WATCH ) - { - _dbus_warn ("Cannot watch config directory '%s'. Already watching %d directories\n", dir, MAX_DIRS_TO_WATCH); - goto out; - } - - fd = open (dir, O_RDONLY); - if (fd < 0) - { - _dbus_warn ("Cannot open directory '%s'; error '%s'\n", dir, _dbus_strerror (errno)); - goto out; - } - - if (fcntl (fd, F_NOTIFY, DN_CREATE|DN_DELETE|DN_RENAME|DN_MODIFY) == -1) - { - _dbus_warn ("Cannot setup D_NOTIFY for '%s' error '%s'\n", dir, _dbus_strerror (errno)); - close (fd); - goto out; - } - - fds[num_fds++] = fd; - _dbus_verbose ("Added watch on config directory '%s'\n", dir); - - out: - ; -} - -void -bus_drop_all_directory_watches (void) -{ - int i; - - _dbus_verbose ("Dropping all watches on config directories\n"); - - for (i = 0; i < num_fds; i++) - { - if (close (fds[i]) != 0) - { - _dbus_verbose ("Error closing fd %d for config directory watch\n", fds[i]); - } - } - - num_fds = 0; -} diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index 2e9be988..49ebc721 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -22,11 +22,15 @@ * */ +/* Be careful, this file is not Linux-only: QNX also uses it */ + #include <config.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> +/* QNX's inotify is broken, and requires stdint.h to be manually included first */ +#include <stdint.h> #include <sys/inotify.h> #include <sys/types.h> #include <signal.h> @@ -55,32 +59,30 @@ _handle_inotify_watch (DBusWatch *passed_watch, unsigned int flags, void *data) char buffer[INOTIFY_BUF_LEN]; ssize_t ret = 0; int i = 0; - pid_t pid; - dbus_bool_t have_change = FALSE; ret = read (inotify_fd, buffer, INOTIFY_BUF_LEN); if (ret < 0) _dbus_verbose ("Error reading inotify event: '%s'\n", _dbus_strerror(errno)); else if (!ret) _dbus_verbose ("Error reading inotify event: buffer too small\n"); + else + { + _dbus_verbose ("Sending SIGHUP signal on reception of %ld inotify event(s)\n", (long) ret); + (void) kill (_dbus_getpid (), SIGHUP); + } +#ifdef DBUS_ENABLE_VERBOSE_MODE while (i < ret) { struct inotify_event *ev; - pid = _dbus_getpid (); ev = (struct inotify_event *) &buffer[i]; i += INOTIFY_EVENT_SIZE + ev->len; -#ifdef DBUS_ENABLE_VERBOSE_MODE if (ev->len) _dbus_verbose ("event name: '%s'\n", ev->name); _dbus_verbose ("inotify event: wd=%d mask=%u cookie=%u len=%u\n", ev->wd, ev->mask, ev->cookie, ev->len); -#endif - _dbus_verbose ("Sending SIGHUP signal on reception of a inotify event\n"); - have_change = TRUE; } - if (have_change) - (void) kill (pid, SIGHUP); +#endif return TRUE; } diff --git a/bus/dir-watch-kqueue.c b/bus/dir-watch-kqueue.c index ac6290cc..33d5e95d 100644 --- a/bus/dir-watch-kqueue.c +++ b/bus/dir-watch-kqueue.c @@ -73,12 +73,12 @@ _handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data) { kq = -1; if (watch != NULL) - { - _dbus_loop_remove_watch (loop, watch); + { + _dbus_loop_remove_watch (loop, watch); _dbus_watch_invalidate (watch); _dbus_watch_unref (watch); - watch = NULL; - } + watch = NULL; + } pid = getpid (); _dbus_verbose ("Sending SIGHUP signal since kqueue has been closed\n"); (void) kill (pid, SIGHUP); @@ -87,11 +87,49 @@ _handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data) return TRUE; } +static void _shutdown_kqueue (void *data) +{ + int i; + + if (kq < 0) + return; + + for (i = 0; i < MAX_DIRS_TO_WATCH; i++) + { + if (fds[i] >= 0) + { + close (fds[i]); + fds[i] = -1; + } + if (dirs[i] != NULL) + { + /* dbus_free() is necessary to pass memleak check */ + dbus_free (dirs[i]); + dirs[i] = NULL; + } + } + + if (loop) + { + _dbus_loop_remove_watch (loop, watch); + _dbus_loop_unref (loop); + loop = NULL; + } + + if (watch) + { + _dbus_watch_invalidate (watch); + _dbus_watch_unref (watch); + watch = NULL; + } + + close (kq); + kq = -1; +} + static int _init_kqueue (BusContext *context) { - int ret = 0; - if (kq < 0) { @@ -99,38 +137,61 @@ _init_kqueue (BusContext *context) if (kq < 0) { _dbus_warn ("Cannot create kqueue; error '%s'\n", _dbus_strerror (errno)); - goto out; - } - - loop = bus_context_get_loop (context); - - watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE, - _handle_kqueue_watch, NULL, NULL); - - if (watch == NULL) - { - _dbus_warn ("Unable to create kqueue watch\n"); - close (kq); - kq = -1; - goto out; - } - - if (!_dbus_loop_add_watch (loop, watch)) - { - _dbus_warn ("Unable to add reload watch to main loop"); - _dbus_watch_invalidate (watch); - _dbus_watch_unref (watch); - watch = NULL; - close (kq); - kq = -1; - goto out; - } + goto out; + } + + loop = bus_context_get_loop (context); + _dbus_loop_ref (loop); + + watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE, + _handle_kqueue_watch, NULL, NULL); + + if (watch == NULL) + { + _dbus_warn ("Unable to create kqueue watch\n"); + goto out1; + } + + if (!_dbus_loop_add_watch (loop, watch)) + { + _dbus_warn ("Unable to add reload watch to main loop"); + goto out2; + } + + if (!_dbus_register_shutdown_func (_shutdown_kqueue, NULL)) + { + _dbus_warn ("Unable to register shutdown function"); + goto out3; + } + } + + return 1; + +out3: + _dbus_loop_remove_watch (loop, watch); + +out2: + if (watch) + { + _dbus_watch_invalidate (watch); + _dbus_watch_unref (watch); + watch = NULL; } - ret = 1; +out1: + if (kq >= 0) + { + close (kq); + kq = -1; + } + if (loop) + { + _dbus_loop_unref (loop); + loop = NULL; + } out: - return ret; + return 0; } void @@ -139,7 +200,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) int new_fds[MAX_DIRS_TO_WATCH]; char *new_dirs[MAX_DIRS_TO_WATCH]; DBusList *link; - int i, j, f, fd; + int i, j, fd; struct kevent ev; if (!_init_kqueue (context)) @@ -169,12 +230,12 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) if (dirs[j] && strcmp (new_dirs[i], dirs[j]) == 0) { new_fds[i] = fds[j]; - new_dirs[i] = dirs[j]; - fds[j] = -1; - dirs[j] = NULL; - break; - } - } + new_dirs[i] = dirs[j]; + fds[j] = -1; + dirs[j] = NULL; + break; + } + } } /* Any directory we find in "fds" with a nonzero fd must @@ -185,10 +246,10 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) if (fds[j] != -1) { close (fds[j]); - dbus_free (dirs[j]); - fds[j] = -1; - dirs[j] = NULL; - } + dbus_free (dirs[j]); + fds[j] = -1; + dirs[j] = NULL; + } } for (i = 0; new_dirs[i]; i++) @@ -196,9 +257,9 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) if (new_fds[i] == -1) { /* FIXME - less lame error handling for failing to add a watch; - * we may need to sleep. - */ - fd = open (new_dirs[i], O_RDONLY); + * we may need to sleep. + */ + fd = open (new_dirs[i], O_RDONLY | O_CLOEXEC); if (fd < 0) { if (errno != ENOENT) @@ -223,18 +284,18 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) goto out; } - new_fds[i] = fd; - new_dirs[i] = _dbus_strdup (new_dirs[i]); - if (!new_dirs[i]) + new_fds[i] = fd; + new_dirs[i] = _dbus_strdup (new_dirs[i]); + if (!new_dirs[i]) { /* FIXME have less lame handling for OOM, we just silently fail to - * watch. (In reality though, the whole OOM handling in dbus is - * stupid but we won't go into that in this comment =) ) - */ + * watch. (In reality though, the whole OOM handling in dbus is + * stupid but we won't go into that in this comment =) ) + */ close (fd); - new_fds[i] = -1; - } - } + new_fds[i] = -1; + } + } } num_fds = i; diff --git a/bus/dispatch.c b/bus/dispatch.c index 7a96f9dc..7a61953f 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -34,6 +34,7 @@ #include "signals.h" #include "test.h" #include <dbus/dbus-internals.h> +#include <dbus/dbus-misc.h> #include <string.h> #ifdef HAVE_UNIX_FD_PASSING @@ -132,7 +133,7 @@ bus_dispatch_matches (BusTransaction *transaction, } /* Now dispatch to others who look interested in this message */ - connections = bus_transaction_get_connections (transaction); + connections = bus_context_get_connections (context); dbus_error_init (&tmp_error); matchmaker = bus_context_get_matchmaker (context); @@ -428,7 +429,7 @@ bus_dispatch_remove_connection (DBusConnection *connection) NULL); } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include <stdio.h> @@ -1306,9 +1307,15 @@ check_get_connection_unix_process_id (BusContext *context, #endif else { +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ + defined(__linux__) || \ + defined(__OpenBSD__) warn_unexpected (connection, message, "not this error"); goto out; +#else + _dbus_verbose ("does not support GetConnectionUnixProcessID but perhaps that's OK?\n"); +#endif } } else @@ -4466,7 +4473,7 @@ setenv_TEST_LAUNCH_HELPER_CONFIG(const DBusString *test_data_dir, _dbus_verbose ("Setting TEST_LAUNCH_HELPER_CONFIG to '%s'\n", _dbus_string_get_const_data (&full)); - _dbus_setenv ("TEST_LAUNCH_HELPER_CONFIG", _dbus_string_get_const_data (&full)); + dbus_setenv ("TEST_LAUNCH_HELPER_CONFIG", _dbus_string_get_const_data (&full)); _dbus_string_free (&full); @@ -4907,4 +4914,4 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) } #endif -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/driver.c b/bus/driver.c index 574e0f3d..f5d3ebe2 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -32,12 +32,56 @@ #include "signals.h" #include "stats.h" #include "utils.h" + +#include <dbus/dbus-asv-util.h> #include <dbus/dbus-string.h> #include <dbus/dbus-internals.h> #include <dbus/dbus-message.h> #include <dbus/dbus-marshal-recursive.h> #include <string.h> +static DBusConnection * +bus_driver_get_conn_helper (DBusConnection *connection, + DBusMessage *message, + const char *what_we_want, + const char **name_p, + DBusError *error) +{ + const char *name; + BusRegistry *registry; + BusService *serv; + DBusString str; + DBusConnection *conn; + + if (!dbus_message_get_args (message, error, + DBUS_TYPE_STRING, &name, + DBUS_TYPE_INVALID)) + return NULL; + + _dbus_assert (name != NULL); + _dbus_verbose ("asked for %s of connection %s\n", what_we_want, name); + + registry = bus_connection_get_registry (connection); + _dbus_string_init_const (&str, name); + serv = bus_registry_lookup (registry, &str); + + if (serv == NULL) + { + dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER, + "Could not get %s of name '%s': no such name", + what_we_want, name); + return NULL; + } + + conn = bus_service_get_primary_owners_connection (serv); + _dbus_assert (conn != NULL); + + if (name_p != NULL) + *name_p = name; + + return conn; +} + static dbus_bool_t bus_driver_send_welcome_message (DBusConnection *connection, DBusMessage *hello_message, BusTransaction *transaction, @@ -834,6 +878,44 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_CLEAR (error); + if (!bus_driver_check_message_is_for_us (message, error)) + return FALSE; + +#ifdef DBUS_UNIX + { + /* UpdateActivationEnvironment is basically a recipe for privilege + * escalation so let's be extra-careful: do not allow the sysadmin + * to shoot themselves in the foot. */ + unsigned long uid; + + if (!dbus_connection_get_unix_user (connection, &uid)) + { + bus_context_log (bus_transaction_get_context (transaction), + DBUS_SYSTEM_LOG_SECURITY, + "rejected attempt to call UpdateActivationEnvironment by " + "unknown uid"); + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, + "rejected attempt to call UpdateActivationEnvironment by " + "unknown uid"); + return FALSE; + } + + /* On the system bus, we could in principle allow uid 0 to call + * UpdateActivationEnvironment; but they should know better anyway, + * and our default system.conf has always forbidden it */ + if (!_dbus_unix_user_is_process_owner (uid)) + { + bus_context_log (bus_transaction_get_context (transaction), + DBUS_SYSTEM_LOG_SECURITY, + "rejected attempt to call UpdateActivationEnvironment by uid %lu", + uid); + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, + "rejected attempt to call UpdateActivationEnvironment"); + return FALSE; + } + } +#endif + activation = bus_connection_get_activation (connection); dbus_message_iter_init (message, &iter); @@ -841,13 +923,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, /* The message signature has already been checked for us, * so let's just assert it's right. */ -#ifndef DBUS_DISABLE_ASSERT - { - int msg_type = dbus_message_iter_get_arg_type (&iter); - - _dbus_assert (msg_type == DBUS_TYPE_ARRAY); - } -#endif + _dbus_assert (dbus_message_iter_get_arg_type (&iter) == DBUS_TYPE_ARRAY); dbus_message_iter_recurse (&iter, &dict_iter); @@ -1262,40 +1338,21 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection, DBusMessage *message, DBusError *error) { - const char *service; - DBusString str; - BusRegistry *registry; - BusService *serv; DBusConnection *conn; DBusMessage *reply; unsigned long uid; dbus_uint32_t uid32; + const char *service; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - registry = bus_connection_get_registry (connection); - - service = NULL; reply = NULL; - if (! dbus_message_get_args (message, error, - DBUS_TYPE_STRING, &service, - DBUS_TYPE_INVALID)) - goto failed; - - _dbus_verbose ("asked for UID of connection %s\n", service); - - _dbus_string_init_const (&str, service); - serv = bus_registry_lookup (registry, &str); - if (serv == NULL) - { - dbus_set_error (error, - DBUS_ERROR_NAME_HAS_NO_OWNER, - "Could not get UID of name '%s': no such name", service); - goto failed; - } + conn = bus_driver_get_conn_helper (connection, message, "UID", &service, + error); - conn = bus_service_get_primary_owners_connection (serv); + if (conn == NULL) + goto failed; reply = dbus_message_new_method_return (message); if (reply == NULL) @@ -1338,40 +1395,21 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection, DBusMessage *message, DBusError *error) { - const char *service; - DBusString str; - BusRegistry *registry; - BusService *serv; DBusConnection *conn; DBusMessage *reply; unsigned long pid; dbus_uint32_t pid32; + const char *service; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - registry = bus_connection_get_registry (connection); - - service = NULL; reply = NULL; - if (! dbus_message_get_args (message, error, - DBUS_TYPE_STRING, &service, - DBUS_TYPE_INVALID)) - goto failed; - - _dbus_verbose ("asked for PID of connection %s\n", service); - - _dbus_string_init_const (&str, service); - serv = bus_registry_lookup (registry, &str); - if (serv == NULL) - { - dbus_set_error (error, - DBUS_ERROR_NAME_HAS_NO_OWNER, - "Could not get PID of name '%s': no such name", service); - goto failed; - } + conn = bus_driver_get_conn_helper (connection, message, "PID", &service, + error); - conn = bus_service_get_primary_owners_connection (serv); + if (conn == NULL) + goto failed; reply = dbus_message_new_method_return (message); if (reply == NULL) @@ -1414,40 +1452,21 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection, DBusMessage *message, DBusError *error) { - const char *service; - DBusString str; - BusRegistry *registry; - BusService *serv; DBusConnection *conn; DBusMessage *reply; void *data = NULL; dbus_uint32_t data_size; + const char *service; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - registry = bus_connection_get_registry (connection); - - service = NULL; reply = NULL; - if (! dbus_message_get_args (message, error, - DBUS_TYPE_STRING, &service, - DBUS_TYPE_INVALID)) - goto failed; - - _dbus_verbose ("asked for audit session data for connection %s\n", service); - - _dbus_string_init_const (&str, service); - serv = bus_registry_lookup (registry, &str); - if (serv == NULL) - { - dbus_set_error (error, - DBUS_ERROR_NAME_HAS_NO_OWNER, - "Could not get audit session data for name '%s': no such name", service); - goto failed; - } + conn = bus_driver_get_conn_helper (connection, message, + "audit session data", &service, error); - conn = bus_service_get_primary_owners_connection (serv); + if (conn == NULL) + goto failed; reply = dbus_message_new_method_return (message); if (reply == NULL) @@ -1489,39 +1508,20 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne DBusMessage *message, DBusError *error) { - const char *service; - DBusString str; - BusRegistry *registry; - BusService *serv; DBusConnection *conn; DBusMessage *reply; BusSELinuxID *context; + const char *service; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - registry = bus_connection_get_registry (connection); - - service = NULL; reply = NULL; - if (! dbus_message_get_args (message, error, - DBUS_TYPE_STRING, &service, - DBUS_TYPE_INVALID)) - goto failed; - - _dbus_verbose ("asked for security context of connection %s\n", service); + conn = bus_driver_get_conn_helper (connection, message, "security context", + &service, error); - _dbus_string_init_const (&str, service); - serv = bus_registry_lookup (registry, &str); - if (serv == NULL) - { - dbus_set_error (error, - DBUS_ERROR_NAME_HAS_NO_OWNER, - "Could not get security context of name '%s': no such name", service); - goto failed; - } - - conn = bus_service_get_primary_owners_connection (serv); + if (conn == NULL) + goto failed; reply = dbus_message_new_method_return (message); if (reply == NULL) @@ -1557,6 +1557,80 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne } static dbus_bool_t +bus_driver_handle_get_connection_credentials (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error) +{ + DBusConnection *conn; + DBusMessage *reply; + DBusMessageIter reply_iter; + DBusMessageIter array_iter; + unsigned long ulong_val; + const char *service; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + reply = NULL; + + conn = bus_driver_get_conn_helper (connection, message, "credentials", + &service, error); + + if (conn == NULL) + goto failed; + + reply = _dbus_asv_new_method_return (message, &reply_iter, &array_iter); + if (reply == NULL) + goto oom; + + /* we can't represent > 32-bit pids; if your system needs them, please + * add ProcessID64 to the spec or something */ + if (dbus_connection_get_unix_process_id (conn, &ulong_val) && + ulong_val <= _DBUS_UINT32_MAX) + { + if (!_dbus_asv_add_uint32 (&array_iter, "ProcessID", ulong_val)) + goto oom; + } + + /* we can't represent > 32-bit uids; if your system needs them, please + * add UnixUserID64 to the spec or something */ + if (dbus_connection_get_unix_user (conn, &ulong_val) && + ulong_val <= _DBUS_UINT32_MAX) + { + if (!_dbus_asv_add_uint32 (&array_iter, "UnixUserID", ulong_val)) + goto oom; + } + + if (!_dbus_asv_close (&reply_iter, &array_iter)) + goto oom; + + if (! bus_transaction_send_from_driver (transaction, connection, reply)) + { + /* this time we don't want to close the iterator again, so just + * get rid of the message */ + dbus_message_unref (reply); + reply = NULL; + goto oom; + } + + return TRUE; + + oom: + BUS_SET_OOM (error); + + failed: + _DBUS_ASSERT_ERROR_IS_SET (error); + + if (reply) + { + _dbus_asv_abandon (&reply_iter, &array_iter); + dbus_message_unref (reply); + } + + return FALSE; +} + +static dbus_bool_t bus_driver_handle_reload_config (DBusConnection *connection, BusTransaction *transaction, DBusMessage *message, @@ -1736,6 +1810,8 @@ static const MessageHandler dbus_message_handlers[] = { "", DBUS_TYPE_STRING_AS_STRING, bus_driver_handle_get_id }, + { "GetConnectionCredentials", "s", "a{sv}", + bus_driver_handle_get_connection_credentials }, { NULL, NULL, NULL, NULL } }; @@ -1927,6 +2003,38 @@ bus_driver_handle_introspect (DBusConnection *connection, return FALSE; } +/* + * Set @error and return FALSE if the message is not directed to the + * dbus-daemon by its canonical object path. This is hardening against + * system services with poorly-written security policy files, which + * might allow sending dangerously broad equivalence classes of messages + * such as "anything with this assumed-to-be-safe object path". + * + * dbus-daemon is unusual in that it normally ignores the object path + * of incoming messages; we need to keep that behaviour for the "read" + * read-only method calls like GetConnectionUnixUser for backwards + * compatibility, but it seems safer to be more restrictive for things + * intended to be root-only or privileged-developers-only. + * + * It is possible that there are other system services with the same + * quirk as dbus-daemon. + */ +dbus_bool_t +bus_driver_check_message_is_for_us (DBusMessage *message, + DBusError *error) +{ + if (!dbus_message_has_path (message, DBUS_PATH_DBUS)) + { + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, + "Method '%s' is only available at the canonical object path '%s'", + dbus_message_get_member (message), DBUS_PATH_DBUS); + + return FALSE; + } + + return TRUE; +} + dbus_bool_t bus_driver_handle_message (DBusConnection *connection, BusTransaction *transaction, @@ -1964,13 +2072,8 @@ bus_driver_handle_message (DBusConnection *connection, _dbus_verbose ("Driver got a method call: %s\n", name); /* security checks should have kept this from getting here */ -#ifndef DBUS_DISABLE_ASSERT - { - const char *sender = dbus_message_get_sender (message); - - _dbus_assert (sender != NULL || strcmp (name, "Hello") == 0); - } -#endif + _dbus_assert (dbus_message_get_sender (message) != NULL || + strcmp (name, "Hello") == 0); for (ih = interface_handlers; ih->name != NULL; ih++) { diff --git a/bus/driver.h b/bus/driver.h index 713b2764..201709c4 100644 --- a/bus/driver.h +++ b/bus/driver.h @@ -46,7 +46,7 @@ dbus_bool_t bus_driver_send_service_owner_changed (const char *service_name BusTransaction *transaction, DBusError *error); dbus_bool_t bus_driver_generate_introspect_string (DBusString *xml); - - +dbus_bool_t bus_driver_check_message_is_for_us (DBusMessage *message, + DBusError *error); #endif /* BUS_DRIVER_H */ diff --git a/bus/expirelist.c b/bus/expirelist.c index 1a12ea45..9a3886e9 100644 --- a/bus/expirelist.c +++ b/bus/expirelist.c @@ -281,7 +281,7 @@ bus_expire_list_contains_item (BusExpireList *list, return _dbus_list_find_last (&list->items, item) != NULL; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS typedef struct { @@ -399,4 +399,4 @@ bus_expire_list_test (const DBusString *test_data_dir) return result; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ @@ -61,11 +61,6 @@ signal_handler (int sig) { switch (sig) { -#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX - case SIGIO: - /* explicit fall-through */ -#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */ -#ifdef SIGHUP case SIGHUP: { DBusString str; @@ -91,11 +86,13 @@ signal_handler (int sig) static const char message[] = "Unable to write to reload pipe - buffer full?\n"; - write (STDERR_FILENO, message, strlen (message)); + if (write (STDERR_FILENO, message, strlen (message)) != strlen (message)) + { + /* ignore failure to write out a warning */ + } } } break; -#endif case SIGTERM: { @@ -113,7 +110,10 @@ signal_handler (int sig) "Unable to write termination signal to pipe - buffer full?\n" "Will exit instead.\n"; - write (STDERR_FILENO, message, strlen (message)); + if (write (STDERR_FILENO, message, strlen (message)) != strlen (message)) + { + /* ignore failure to write out a warning */ + } _exit (1); } } @@ -125,7 +125,23 @@ signal_handler (int sig) static void usage (void) { - fprintf (stderr, DBUS_DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect] [--address=ADDRESS] [--systemd-activation] [--nopidfile]\n"); + fprintf (stderr, + DBUS_DAEMON_NAME + " [--version]" + " [--session]" + " [--system]" + " [--config-file=FILE]" + " [--print-address[=DESCRIPTOR]]" + " [--print-pid[=DESCRIPTOR]]" + " [--introspect]" + " [--address=ADDRESS]" + " [--nopidfile]" + " [--nofork]" +#ifdef DBUS_UNIX + " [--fork]" + " [--systemd-activation]" +#endif + "\n"); exit (1); } @@ -399,19 +415,21 @@ main (int argc, char **argv) flags &= ~BUS_CONTEXT_FLAG_FORK_ALWAYS; flags |= BUS_CONTEXT_FLAG_FORK_NEVER; } +#ifdef DBUS_UNIX else if (strcmp (arg, "--fork") == 0) { flags &= ~BUS_CONTEXT_FLAG_FORK_NEVER; flags |= BUS_CONTEXT_FLAG_FORK_ALWAYS; } - else if (strcmp (arg, "--nopidfile") == 0) - { - flags &= ~BUS_CONTEXT_FLAG_WRITE_PID_FILE; - } else if (strcmp (arg, "--systemd-activation") == 0) { flags |= BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION; } +#endif + else if (strcmp (arg, "--nopidfile") == 0) + { + flags &= ~BUS_CONTEXT_FLAG_WRITE_PID_FILE; + } else if (strcmp (arg, "--system") == 0) { check_two_config_files (&config_file, "system"); @@ -622,12 +640,7 @@ main (int argc, char **argv) * no point in trying to make the handler portable to non-Unix. */ _dbus_set_signal_handler (SIGTERM, signal_handler); -#ifdef SIGHUP _dbus_set_signal_handler (SIGHUP, signal_handler); -#endif -#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX - _dbus_set_signal_handler (SIGIO, signal_handler); -#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */ #endif /* DBUS_UNIX */ _dbus_verbose ("We are on D-Bus...\n"); diff --git a/bus/policy.c b/bus/policy.c index 379cea95..082f3853 100644 --- a/bus/policy.c +++ b/bus/policy.c @@ -1302,12 +1302,12 @@ bus_client_policy_check_can_own (BusClientPolicy *policy, return bus_rules_check_can_own (policy->rules, service_name); } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS dbus_bool_t bus_policy_check_can_own (BusPolicy *policy, const DBusString *service_name) { return bus_rules_check_can_own (policy->default_rules, service_name); } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/policy.h b/bus/policy.h index 3ff6f482..d1d3e72b 100644 --- a/bus/policy.h +++ b/bus/policy.h @@ -161,7 +161,7 @@ dbus_bool_t bus_client_policy_append_rule (BusClientPolicy *policy, BusPolicyRule *rule); void bus_client_policy_optimize (BusClientPolicy *policy); -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS dbus_bool_t bus_policy_check_can_own (BusPolicy *policy, const DBusString *service_name); #endif diff --git a/bus/selinux.c b/bus/selinux.c index 36287e9f..99994ca9 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -44,8 +44,6 @@ #include <syslog.h> #include <selinux/selinux.h> #include <selinux/avc.h> -#include <selinux/av_permissions.h> -#include <selinux/flask.h> #include <signal.h> #include <stdarg.h> #include <stdio.h> @@ -314,8 +312,27 @@ bus_selinux_pre_init (void) #endif } +/* + * Private Flask definitions; the order of these constants must + * exactly match that of the structure array below! + */ +/* security dbus class constants */ +#define SECCLASS_DBUS 1 + +/* dbus's per access vector constants */ +#define DBUS__ACQUIRE_SVC 1 +#define DBUS__SEND_MSG 2 + +#ifdef HAVE_SELINUX +static struct security_class_mapping dbus_map[] = { + { "dbus", { "acquire_svc", "send_msg", NULL } }, + { NULL } +}; +#endif /* HAVE_SELINUX */ + /** - * Initialize the user space access vector cache (AVC) for D-Bus and set up + * Establish dynamic object class and permission mapping and + * initialize the user space access vector cache (AVC) for D-Bus and set up * logging callbacks. */ dbus_bool_t @@ -334,6 +351,13 @@ bus_selinux_full_init (void) _dbus_verbose ("SELinux is enabled in this kernel.\n"); + if (selinux_set_mapping (dbus_map) < 0) + { + _dbus_warn ("Failed to set up security class mapping (selinux_set_mapping():%s).\n", + strerror (errno)); + return FALSE; + } + avc_entry_ref_init (&aeref); if (avc_init ("avc", &mem_cb, &log_cb, &thread_cb, &lock_cb) < 0) { @@ -936,8 +960,7 @@ bus_selinux_get_policy_root (void) void bus_selinux_id_table_print (DBusHashTable *service_table) { -#ifdef DBUS_ENABLE_VERBOSE_MODE -#ifdef HAVE_SELINUX +#if defined (DBUS_ENABLE_VERBOSE_MODE) && defined (HAVE_SELINUX) DBusHashIter iter; if (!selinux_enabled) @@ -953,19 +976,18 @@ bus_selinux_id_table_print (DBusHashTable *service_table) _dbus_verbose ("The context is %s\n", sid->ctx); _dbus_verbose ("The refcount is %d\n", sid->refcnt); } -#endif /* HAVE_SELINUX */ -#endif /* DBUS_ENABLE_VERBOSE_MODE */ +#endif /* DBUS_ENABLE_VERBOSE_MODE && HAVE_SELINUX */ } -#ifdef DBUS_ENABLE_VERBOSE_MODE -#ifdef HAVE_SELINUX /** * Print out some AVC statistics. */ +#ifdef HAVE_SELINUX static void bus_avc_print_stats (void) { +#ifdef DBUS_ENABLE_VERBOSE_MODE struct avc_cache_stats cstats; if (!selinux_enabled) @@ -983,10 +1005,9 @@ bus_avc_print_stats (void) _dbus_verbose ("CAV hits: %d\n", cstats.cav_hits); _dbus_verbose ("CAV probes: %d\n", cstats.cav_probes); _dbus_verbose ("CAV misses: %d\n", cstats.cav_misses); +#endif /* DBUS_ENABLE_VERBOSE_MODE */ } #endif /* HAVE_SELINUX */ -#endif /* DBUS_ENABLE_VERBOSE_MODE */ - /** * Destroy the AVC before we terminate. @@ -1005,12 +1026,7 @@ bus_selinux_shutdown (void) sidput (bus_sid); bus_sid = SECSID_WILD; -#ifdef DBUS_ENABLE_VERBOSE_MODE - - if (_dbus_is_verbose()) - bus_avc_print_stats (); - -#endif /* DBUS_ENABLE_VERBOSE_MODE */ + bus_avc_print_stats (); avc_destroy (); #ifdef HAVE_LIBAUDIT @@ -1051,10 +1067,17 @@ _dbus_change_to_daemon_user (const char *user, if (_dbus_geteuid () == 0) { int rc; + int have_audit_write; + have_audit_write = capng_have_capability (CAPNG_PERMITTED, CAP_AUDIT_WRITE); capng_clear (CAPNG_SELECT_BOTH); - capng_update (CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED, - CAP_AUDIT_WRITE); + /* Only attempt to retain CAP_AUDIT_WRITE if we had it when + * starting. See: + * https://bugs.freedesktop.org/show_bug.cgi?id=49062#c9 + */ + if (have_audit_write) + capng_update (CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED, + CAP_AUDIT_WRITE); rc = capng_change_id (uid, gid, CAPNG_DROP_SUPP_GRP); if (rc) { diff --git a/bus/services.c b/bus/services.c index 6f380fac..584485b1 100644 --- a/bus/services.c +++ b/bus/services.c @@ -368,7 +368,7 @@ bus_registry_list_services (BusRegistry *registry, error: for (j = 0; j < i; j++) - dbus_free (retval[i]); + dbus_free (retval[j]); dbus_free (retval); return FALSE; @@ -588,8 +588,9 @@ bus_registry_acquire_service (BusRegistry *registry, activation = bus_context_get_activation (registry->context); retval = bus_activation_send_pending_auto_activation_messages (activation, service, - transaction, - error); + transaction); + if (!retval) + BUS_SET_OOM (error); out: return retval; diff --git a/bus/session.conf.in b/bus/session.conf.in index e121ff93..cfe9544f 100644 --- a/bus/session.conf.in +++ b/bus/session.conf.in @@ -12,7 +12,7 @@ the behavior of child processes. --> <keep_umask/> - <listen>@DBUS_SESSION_BUS_DEFAULT_ADDRESS@</listen> + <listen>@DBUS_SESSION_BUS_LISTEN_ADDRESS@</listen> <standard_session_servicedirs /> @@ -49,9 +49,11 @@ <limit name="max_outgoing_bytes">1000000000</limit> <limit name="max_outgoing_unix_fds">250000000</limit> <limit name="max_message_size">1000000000</limit> - <limit name="max_message_unix_fds">4096</limit> + <!-- We do not override max_message_unix_fds here since the in-kernel + limit is also relatively low --> <limit name="service_start_timeout">120000</limit> <limit name="auth_timeout">240000</limit> + <limit name="pending_fd_timeout">150000</limit> <limit name="max_completed_connections">100000</limit> <limit name="max_incomplete_connections">10000</limit> <limit name="max_connections_per_user">100000</limit> diff --git a/bus/signals.c b/bus/signals.c index 28506d3f..4c500c67 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -64,7 +64,7 @@ bus_match_rule_new (DBusConnection *matches_go_to) rule->refcount = 1; rule->matches_go_to = matches_go_to; -#ifndef DBUS_BUILD_TESTS +#ifndef DBUS_ENABLE_EMBEDDED_TESTS _dbus_assert (rule->matches_go_to != NULL); #endif @@ -1836,8 +1836,11 @@ match_rule_matches (BusMatchRule *rule, * namespace, rather than just starting with that string, * by checking that the matched prefix is followed by a '/' * or the end of the path. + * + * Special case: the only valid path of length 1, "/", + * matches everything. */ - if (path[len] != '\0' && path[len] != '/') + if (len > 1 && path[len] != '\0' && path[len] != '/') return FALSE; } @@ -1980,12 +1983,10 @@ get_recipients_from_list (DBusList **rules, if (!_dbus_list_append (recipients_p, rule->matches_go_to)) return FALSE; } -#ifdef DBUS_ENABLE_VERBOSE_MODE else { _dbus_verbose ("Connection already receiving this message, so not adding again\n"); } -#endif /* DBUS_ENABLE_VERBOSE_MODE */ } link = _dbus_list_get_next_link (rules, link); @@ -2056,7 +2057,7 @@ bus_matchmaker_get_recipients (BusMatchmaker *matchmaker, return TRUE; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include "test.h" #include <stdlib.h> @@ -2719,6 +2720,7 @@ test_path_matching (void) static const char* path_namespace_should_match_message_1[] = { + "type='signal',path_namespace='/'", "type='signal',path_namespace='/foo'", "type='signal',path_namespace='/foo/TheObjectManager'", NULL @@ -2733,6 +2735,7 @@ path_namespace_should_not_match_message_1[] = { static const char* path_namespace_should_match_message_2[] = { + "type='signal',path_namespace='/'", "type='signal',path_namespace='/foo/TheObjectManager'", NULL }; @@ -2744,6 +2747,7 @@ path_namespace_should_not_match_message_2[] = { static const char* path_namespace_should_match_message_3[] = { + "type='signal',path_namespace='/'", NULL }; @@ -2753,12 +2757,25 @@ path_namespace_should_not_match_message_3[] = { NULL }; +static const char* +path_namespace_should_match_message_4[] = { + "type='signal',path_namespace='/'", + NULL +}; + +static const char* +path_namespace_should_not_match_message_4[] = { + "type='signal',path_namespace='/foo/TheObjectManager'", + NULL +}; + static void test_matching_path_namespace (void) { DBusMessage *message1; DBusMessage *message2; DBusMessage *message3; + DBusMessage *message4; message1 = dbus_message_new (DBUS_MESSAGE_TYPE_SIGNAL); _dbus_assert (message1 != NULL); @@ -2775,6 +2792,11 @@ test_matching_path_namespace (void) if (!dbus_message_set_path (message3, "/foo/TheObjectManagerOther")) _dbus_assert_not_reached ("oom"); + message4 = dbus_message_new (DBUS_MESSAGE_TYPE_SIGNAL); + _dbus_assert (message4 != NULL); + if (!dbus_message_set_path (message4, "/")) + _dbus_assert_not_reached ("oom"); + check_matching (message1, 1, path_namespace_should_match_message_1, path_namespace_should_not_match_message_1); @@ -2784,7 +2806,11 @@ test_matching_path_namespace (void) check_matching (message3, 3, path_namespace_should_match_message_3, path_namespace_should_not_match_message_3); + check_matching (message4, 4, + path_namespace_should_match_message_4, + path_namespace_should_not_match_message_4); + dbus_message_unref (message4); dbus_message_unref (message3); dbus_message_unref (message2); dbus_message_unref (message1); @@ -2811,5 +2837,5 @@ bus_signals_test (const DBusString *test_data_dir) return TRUE; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/stats.c b/bus/stats.c index 28fd49ba..20321e5e 100644 --- a/bus/stats.c +++ b/bus/stats.c @@ -1,5 +1,8 @@ /* stats.c - statistics from the bus driver * + * Copyright © 2011-2012 Nokia Corporation + * Copyright © 2012-2013 Collabora Ltd. + * * Licensed under the Academic Free License version 2.1 * * This program is free software; you can redistribute it and/or modify @@ -21,168 +24,24 @@ #include <config.h> #include "stats.h" +#include <dbus/dbus-asv-util.h> #include <dbus/dbus-internals.h> #include <dbus/dbus-connection-internal.h> #include "connection.h" +#include "driver.h" #include "services.h" #include "utils.h" #ifdef DBUS_ENABLE_STATS -static DBusMessage * -new_asv_reply (DBusMessage *message, - DBusMessageIter *iter, - DBusMessageIter *arr_iter) -{ - DBusMessage *reply = dbus_message_new_method_return (message); - - if (reply == NULL) - return NULL; - - dbus_message_iter_init_append (reply, iter); - - if (!dbus_message_iter_open_container (iter, DBUS_TYPE_ARRAY, "{sv}", - arr_iter)) - { - dbus_message_unref (reply); - return NULL; - } - - return reply; -} - -static dbus_bool_t -open_asv_entry (DBusMessageIter *arr_iter, - DBusMessageIter *entry_iter, - const char *key, - const char *type, - DBusMessageIter *var_iter) -{ - if (!dbus_message_iter_open_container (arr_iter, DBUS_TYPE_DICT_ENTRY, - NULL, entry_iter)) - return FALSE; - - if (!dbus_message_iter_append_basic (entry_iter, DBUS_TYPE_STRING, &key)) - { - dbus_message_iter_abandon_container (arr_iter, entry_iter); - return FALSE; - } - - if (!dbus_message_iter_open_container (entry_iter, DBUS_TYPE_VARIANT, - type, var_iter)) - { - dbus_message_iter_abandon_container (arr_iter, entry_iter); - return FALSE; - } - - return TRUE; -} - -static dbus_bool_t -close_asv_entry (DBusMessageIter *arr_iter, - DBusMessageIter *entry_iter, - DBusMessageIter *var_iter) -{ - if (!dbus_message_iter_close_container (entry_iter, var_iter)) - { - dbus_message_iter_abandon_container (arr_iter, entry_iter); - return FALSE; - } - - if (!dbus_message_iter_close_container (arr_iter, entry_iter)) - return FALSE; - - return TRUE; -} - -static dbus_bool_t -close_asv_reply (DBusMessageIter *iter, - DBusMessageIter *arr_iter) -{ - return dbus_message_iter_close_container (iter, arr_iter); -} - -static void -abandon_asv_entry (DBusMessageIter *arr_iter, - DBusMessageIter *entry_iter, - DBusMessageIter *var_iter) -{ - dbus_message_iter_abandon_container (entry_iter, var_iter); - dbus_message_iter_abandon_container (arr_iter, entry_iter); -} - -static void -abandon_asv_reply (DBusMessageIter *iter, - DBusMessageIter *arr_iter) -{ - dbus_message_iter_abandon_container (iter, arr_iter); -} - -static dbus_bool_t -asv_add_uint32 (DBusMessageIter *iter, - DBusMessageIter *arr_iter, - const char *key, - dbus_uint32_t value) -{ - DBusMessageIter entry_iter, var_iter; - - if (!open_asv_entry (arr_iter, &entry_iter, key, DBUS_TYPE_UINT32_AS_STRING, - &var_iter)) - goto oom; - - if (!dbus_message_iter_append_basic (&var_iter, DBUS_TYPE_UINT32, - &value)) - { - abandon_asv_entry (arr_iter, &entry_iter, &var_iter); - goto oom; - } - - if (!close_asv_entry (arr_iter, &entry_iter, &var_iter)) - goto oom; - - return TRUE; - -oom: - abandon_asv_reply (iter, arr_iter); - return FALSE; -} - -static dbus_bool_t -asv_add_string (DBusMessageIter *iter, - DBusMessageIter *arr_iter, - const char *key, - const char *value) -{ - DBusMessageIter entry_iter, var_iter; - - if (!open_asv_entry (arr_iter, &entry_iter, key, DBUS_TYPE_STRING_AS_STRING, - &var_iter)) - goto oom; - - if (!dbus_message_iter_append_basic (&var_iter, DBUS_TYPE_STRING, - &value)) - { - abandon_asv_entry (arr_iter, &entry_iter, &var_iter); - goto oom; - } - - if (!close_asv_entry (arr_iter, &entry_iter, &var_iter)) - goto oom; - - return TRUE; - -oom: - abandon_asv_reply (iter, arr_iter); - return FALSE; -} - dbus_bool_t bus_stats_handle_get_stats (DBusConnection *connection, BusTransaction *transaction, DBusMessage *message, DBusError *error) { + BusContext *context; BusConnections *connections; DBusMessage *reply = NULL; DBusMessageIter iter, arr_iter; @@ -191,49 +50,56 @@ bus_stats_handle_get_stats (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_CLEAR (error); - connections = bus_transaction_get_connections (transaction); + if (!bus_driver_check_message_is_for_us (message, error)) + return FALSE; + + context = bus_transaction_get_context (transaction); + connections = bus_context_get_connections (context); - reply = new_asv_reply (message, &iter, &arr_iter); + reply = _dbus_asv_new_method_return (message, &iter, &arr_iter); if (reply == NULL) goto oom; /* Globals */ - if (!asv_add_uint32 (&iter, &arr_iter, "Serial", stats_serial++)) - goto oom; - _dbus_list_get_stats (&in_use, &in_free_list, &allocated); - if (!asv_add_uint32 (&iter, &arr_iter, "ListMemPoolUsedBytes", in_use) || - !asv_add_uint32 (&iter, &arr_iter, "ListMemPoolCachedBytes", - in_free_list) || - !asv_add_uint32 (&iter, &arr_iter, "ListMemPoolAllocatedBytes", - allocated)) - goto oom; + + if (!_dbus_asv_add_uint32 (&arr_iter, "Serial", stats_serial++) || + !_dbus_asv_add_uint32 (&arr_iter, "ListMemPoolUsedBytes", in_use) || + !_dbus_asv_add_uint32 (&arr_iter, "ListMemPoolCachedBytes", in_free_list) || + !_dbus_asv_add_uint32 (&arr_iter, "ListMemPoolAllocatedBytes", allocated)) + { + _dbus_asv_abandon (&iter, &arr_iter); + goto oom; + } /* Connections */ - if (!asv_add_uint32 (&iter, &arr_iter, "ActiveConnections", + if (!_dbus_asv_add_uint32 (&arr_iter, "ActiveConnections", bus_connections_get_n_active (connections)) || - !asv_add_uint32 (&iter, &arr_iter, "IncompleteConnections", + !_dbus_asv_add_uint32 (&arr_iter, "IncompleteConnections", bus_connections_get_n_incomplete (connections)) || - !asv_add_uint32 (&iter, &arr_iter, "MatchRules", + !_dbus_asv_add_uint32 (&arr_iter, "MatchRules", bus_connections_get_total_match_rules (connections)) || - !asv_add_uint32 (&iter, &arr_iter, "PeakMatchRules", + !_dbus_asv_add_uint32 (&arr_iter, "PeakMatchRules", bus_connections_get_peak_match_rules (connections)) || - !asv_add_uint32 (&iter, &arr_iter, "PeakMatchRulesPerConnection", + !_dbus_asv_add_uint32 (&arr_iter, "PeakMatchRulesPerConnection", bus_connections_get_peak_match_rules_per_conn (connections)) || - !asv_add_uint32 (&iter, &arr_iter, "BusNames", + !_dbus_asv_add_uint32 (&arr_iter, "BusNames", bus_connections_get_total_bus_names (connections)) || - !asv_add_uint32 (&iter, &arr_iter, "PeakBusNames", + !_dbus_asv_add_uint32 (&arr_iter, "PeakBusNames", bus_connections_get_peak_bus_names (connections)) || - !asv_add_uint32 (&iter, &arr_iter, "PeakBusNamesPerConnection", + !_dbus_asv_add_uint32 (&arr_iter, "PeakBusNamesPerConnection", bus_connections_get_peak_bus_names_per_conn (connections))) - goto oom; + { + _dbus_asv_abandon (&iter, &arr_iter); + goto oom; + } /* end */ - if (!close_asv_reply (&iter, &arr_iter)) + if (!_dbus_asv_close (&iter, &arr_iter)) goto oom; if (!bus_transaction_send_from_driver (transaction, connection, reply)) @@ -269,6 +135,9 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection, _DBUS_ASSERT_ERROR_IS_CLEAR (error); + if (!bus_driver_check_message_is_for_us (message, error)) + return FALSE; + registry = bus_connection_get_registry (caller_connection); if (! dbus_message_get_args (message, error, @@ -289,25 +158,28 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection, stats_connection = bus_service_get_primary_owners_connection (service); _dbus_assert (stats_connection != NULL); - reply = new_asv_reply (message, &iter, &arr_iter); + reply = _dbus_asv_new_method_return (message, &iter, &arr_iter); if (reply == NULL) goto oom; /* Bus daemon per-connection stats */ - if (!asv_add_uint32 (&iter, &arr_iter, "Serial", stats_serial++) || - !asv_add_uint32 (&iter, &arr_iter, "MatchRules", + if (!_dbus_asv_add_uint32 (&arr_iter, "Serial", stats_serial++) || + !_dbus_asv_add_uint32 (&arr_iter, "MatchRules", bus_connection_get_n_match_rules (stats_connection)) || - !asv_add_uint32 (&iter, &arr_iter, "PeakMatchRules", + !_dbus_asv_add_uint32 (&arr_iter, "PeakMatchRules", bus_connection_get_peak_match_rules (stats_connection)) || - !asv_add_uint32 (&iter, &arr_iter, "BusNames", + !_dbus_asv_add_uint32 (&arr_iter, "BusNames", bus_connection_get_n_services_owned (stats_connection)) || - !asv_add_uint32 (&iter, &arr_iter, "PeakBusNames", + !_dbus_asv_add_uint32 (&arr_iter, "PeakBusNames", bus_connection_get_peak_bus_names (stats_connection)) || - !asv_add_string (&iter, &arr_iter, "UniqueName", + !_dbus_asv_add_string (&arr_iter, "UniqueName", bus_connection_get_name (stats_connection))) - goto oom; + { + _dbus_asv_abandon (&iter, &arr_iter); + goto oom; + } /* DBusConnection per-connection stats */ @@ -317,21 +189,24 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection, &out_messages, &out_bytes, &out_fds, &out_peak_bytes, &out_peak_fds); - if (!asv_add_uint32 (&iter, &arr_iter, "IncomingMessages", in_messages) || - !asv_add_uint32 (&iter, &arr_iter, "IncomingBytes", in_bytes) || - !asv_add_uint32 (&iter, &arr_iter, "IncomingFDs", in_fds) || - !asv_add_uint32 (&iter, &arr_iter, "PeakIncomingBytes", in_peak_bytes) || - !asv_add_uint32 (&iter, &arr_iter, "PeakIncomingFDs", in_peak_fds) || - !asv_add_uint32 (&iter, &arr_iter, "OutgoingMessages", out_messages) || - !asv_add_uint32 (&iter, &arr_iter, "OutgoingBytes", out_bytes) || - !asv_add_uint32 (&iter, &arr_iter, "OutgoingFDs", out_fds) || - !asv_add_uint32 (&iter, &arr_iter, "PeakOutgoingBytes", out_peak_bytes) || - !asv_add_uint32 (&iter, &arr_iter, "PeakOutgoingFDs", out_peak_fds)) - goto oom; + if (!_dbus_asv_add_uint32 (&arr_iter, "IncomingMessages", in_messages) || + !_dbus_asv_add_uint32 (&arr_iter, "IncomingBytes", in_bytes) || + !_dbus_asv_add_uint32 (&arr_iter, "IncomingFDs", in_fds) || + !_dbus_asv_add_uint32 (&arr_iter, "PeakIncomingBytes", in_peak_bytes) || + !_dbus_asv_add_uint32 (&arr_iter, "PeakIncomingFDs", in_peak_fds) || + !_dbus_asv_add_uint32 (&arr_iter, "OutgoingMessages", out_messages) || + !_dbus_asv_add_uint32 (&arr_iter, "OutgoingBytes", out_bytes) || + !_dbus_asv_add_uint32 (&arr_iter, "OutgoingFDs", out_fds) || + !_dbus_asv_add_uint32 (&arr_iter, "PeakOutgoingBytes", out_peak_bytes) || + !_dbus_asv_add_uint32 (&arr_iter, "PeakOutgoingFDs", out_peak_fds)) + { + _dbus_asv_abandon (&iter, &arr_iter); + goto oom; + } /* end */ - if (!close_asv_reply (&iter, &arr_iter)) + if (!_dbus_asv_close (&iter, &arr_iter)) goto oom; if (!bus_transaction_send_from_driver (transaction, caller_connection, diff --git a/bus/system.conf.in b/bus/system.conf.in index 92f4cc42..851b9e63 100644 --- a/bus/system.conf.in +++ b/bus/system.conf.in @@ -68,6 +68,14 @@ <deny send_destination="org.freedesktop.DBus" send_interface="org.freedesktop.DBus" send_member="UpdateActivationEnvironment"/> + <deny send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.systemd1.Activator"/> + </policy> + + <!-- Only systemd, which runs as root, may report activation failures. --> + <policy user="root"> + <allow send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.systemd1.Activator"/> </policy> <!-- Config files are placed here that among other things, punch diff --git a/bus/test-launch-helper.c b/bus/test-launch-helper.c index ab36b6ec..e9ba412a 100644 --- a/bus/test-launch-helper.c +++ b/bus/test-launch-helper.c @@ -28,8 +28,9 @@ #include <stdio.h> #include <stdlib.h> #include <dbus/dbus-internals.h> +#include <dbus/dbus-misc.h> -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -56,7 +57,7 @@ test_post_hook (const char *name) { check_memleaks (name); } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ #ifdef ACTIVATION_LAUNCHER_DO_OOM @@ -97,7 +98,7 @@ bus_activation_helper_oom_test (void *data) int main (int argc, char **argv) { -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; DBusString config_file; @@ -122,8 +123,8 @@ main (int argc, char **argv) return 1; /* use a config file that will actually work... */ - _dbus_setenv ("TEST_LAUNCH_HELPER_CONFIG", - _dbus_string_get_const_data (&config_file)); + dbus_setenv ("TEST_LAUNCH_HELPER_CONFIG", + _dbus_string_get_const_data (&config_file)); _dbus_string_free (&config_file); @@ -137,7 +138,7 @@ main (int argc, char **argv) printf ("%s: Success\n", argv[0]); return 0; -#else /* DBUS_BUILD_TESTS */ +#else /* DBUS_ENABLE_EMBEDDED_TESTS */ printf ("Not compiled with test support\n"); diff --git a/bus/test-main.c b/bus/test-main.c index 0f736c7c..01d22870 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -31,7 +31,7 @@ #include <dbus/dbus-message-internal.h> #include "selinux.h" -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -52,7 +52,7 @@ check_memleaks (const char *name) die ("memleaks"); } } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ static DBusInitialFDs *initial_fds = NULL; @@ -84,7 +84,7 @@ test_post_hook (void) int main (int argc, char **argv) { -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; const char *only; DBusString test_data_dir; @@ -181,7 +181,7 @@ main (int argc, char **argv) return 0; -#else /* DBUS_BUILD_TESTS */ +#else /* DBUS_ENABLE_EMBEDDED_TESTS */ printf ("Not compiled with test support\n"); diff --git a/bus/test-system.c b/bus/test-system.c index 56a7d4ea..5f02d0ab 100644 --- a/bus/test-system.c +++ b/bus/test-system.c @@ -29,7 +29,7 @@ #include <dbus/dbus-sysdeps.h> #include <dbus/dbus-internals.h> -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -50,7 +50,7 @@ check_memleaks (const char *name) die ("memleaks"); } } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ static void test_pre_hook (void) @@ -67,7 +67,7 @@ test_post_hook (void) int main (int argc, char **argv) { -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; DBusString test_data_dir; @@ -98,7 +98,7 @@ main (int argc, char **argv) printf ("%s: Success\n", argv[0]); return 0; -#else /* DBUS_BUILD_TESTS */ +#else /* DBUS_ENABLE_EMBEDDED_TESTS */ printf ("Not compiled with test support\n"); @@ -23,7 +23,7 @@ #include <config.h> -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include "test.h" #include <dbus/dbus-internals.h> #include <dbus/dbus-list.h> @@ -24,7 +24,7 @@ #ifndef BUS_TEST_H #define BUS_TEST_H -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include <dbus/dbus.h> #include <dbus/dbus-string.h> |