diff options
author | Simon McVittie <smcv@debian.org> | 2013-11-01 19:30:32 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2013-11-01 19:30:32 +0000 |
commit | 8dd761276cb91c219d99b9b43c8344ea1187a26e (patch) | |
tree | 2214712224d3a5c8b06cc37da17718d023aa5d41 /bus | |
parent | 46d1ea6379112b52d81efa0eb264321a0471c808 (diff) | |
parent | fc7f0fa64265ac3a97f23a714db4399803fa71f5 (diff) | |
download | dbus-8dd761276cb91c219d99b9b43c8344ea1187a26e.tar.gz |
Imported Upstream version 1.7.8upstream/1.7.8
Diffstat (limited to 'bus')
-rw-r--r-- | bus/Makefile.in | 221 | ||||
-rw-r--r-- | bus/activation.c | 4 | ||||
-rw-r--r-- | bus/connection.c | 22 | ||||
-rw-r--r-- | bus/main.c | 4 | ||||
-rw-r--r-- | bus/selinux.c | 8 | ||||
-rw-r--r-- | bus/signals.c | 30 |
6 files changed, 129 insertions, 160 deletions
diff --git a/bus/Makefile.in b/bus/Makefile.in index 97ccfd6a..b9ea3561 100644 --- a/bus/Makefile.in +++ b/bus/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -17,51 +18,23 @@ VPATH = @srcdir@ -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 \ +am__make_dryrun = \ + { \ + am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - 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;; \ + 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;; \ 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)) + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -96,12 +69,12 @@ dbus_daemon_exec_PROGRAMS = dbus-daemon$(EXEEXT) @HAVE_SYSTEMD_TRUE@ dbus.socket.in subdir = bus -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/system.conf.in $(srcdir)/session.conf.in \ - $(srcdir)/messagebus.in $(srcdir)/messagebus-config.in \ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/dbus.service.in $(srcdir)/dbus.socket.in \ + $(srcdir)/messagebus-config.in $(srcdir)/messagebus.in \ $(srcdir)/org.freedesktop.dbus-session.plist.in \ - $(srcdir)/rc.messagebus.in $(srcdir)/dbus.service.in \ - $(srcdir)/dbus.socket.in $(top_srcdir)/depcomp + $(srcdir)/rc.messagebus.in $(srcdir)/session.conf.in \ + $(srcdir)/system.conf.in 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 \ @@ -161,7 +134,6 @@ bus_test_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent -am__v_lt_1 = 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) \ @@ -248,18 +220,6 @@ 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 @@ -272,16 +232,20 @@ 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_CC_1 = +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 = @ 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_CCLD_1 = +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) \ $(dbus_daemon_launch_helper_SOURCES) \ @@ -297,23 +261,6 @@ am__can_run_installinfo = \ *) (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) @@ -756,12 +703,10 @@ 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 } \ @@ -782,8 +727,7 @@ 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 @@ -805,12 +749,10 @@ 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 } \ @@ -831,8 +773,7 @@ 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 @@ -854,27 +795,21 @@ 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) @@ -1001,14 +936,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 -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .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 -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1282,15 +1217,26 @@ uninstall-systemdsystemunitDATA: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir) -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) +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) set x; \ here=`pwd`; \ - $(am__define_uniq_tagged_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; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1302,11 +1248,15 @@ tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $$unique; \ fi; \ fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ +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; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1315,21 +1265,6 @@ 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 +1418,24 @@ uninstall-am: uninstall-agentDATA uninstall-binSCRIPTS \ .MAKE: install-am install-data-am install-exec-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-dbus_daemon_execPROGRAMS clean-generic \ clean-libexecPROGRAMS clean-libtool clean-local \ - 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 \ + 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 \ 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 tags-am uninstall uninstall-agentDATA uninstall-am \ + tags uninstall uninstall-agentDATA uninstall-am \ uninstall-binSCRIPTS uninstall-configDATA \ uninstall-dbus_daemon_execPROGRAMS uninstall-initdSCRIPTS \ uninstall-libexecPROGRAMS uninstall-systemdsystemunitDATA diff --git a/bus/activation.c b/bus/activation.c index 77357bea..868ce05c 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -2104,7 +2104,9 @@ 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, &tmp_error)) diff --git a/bus/connection.c b/bus/connection.c index d69758c9..fddbc78a 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -2126,6 +2126,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 +2173,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 +2230,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 @@ -61,7 +61,6 @@ signal_handler (int sig) { switch (sig) { -#ifdef SIGHUP case SIGHUP: { DBusString str; @@ -94,7 +93,6 @@ signal_handler (int sig) } } break; -#endif case SIGTERM: { @@ -642,9 +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 #endif /* DBUS_UNIX */ _dbus_verbose ("We are on D-Bus...\n"); diff --git a/bus/selinux.c b/bus/selinux.c index 7ae84d6d..768e55ef 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -1043,9 +1043,15 @@ _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); - if (capng_have_capability (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); diff --git a/bus/signals.c b/bus/signals.c index dab7154a..4c500c67 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -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; } @@ -2717,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 @@ -2731,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 }; @@ -2742,6 +2747,7 @@ path_namespace_should_not_match_message_2[] = { static const char* path_namespace_should_match_message_3[] = { + "type='signal',path_namespace='/'", NULL }; @@ -2751,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); @@ -2773,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); @@ -2782,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); |