From 1b8151a0775a67b2bd4e8ec80a0d35da004b20a5 Mon Sep 17 00:00:00 2001 From: Seemant Kulleen Date: Sun, 22 Jun 2003 01:34:50 +0000 Subject: blah --- sys-apps/dbus/files/dbus-0.11-cvs-update.patch | 7403 ++++++++++++++++++++++++ sys-apps/dbus/files/digest-dbus-0.11 | 1 + 2 files changed, 7404 insertions(+) create mode 100644 sys-apps/dbus/files/dbus-0.11-cvs-update.patch create mode 100644 sys-apps/dbus/files/digest-dbus-0.11 (limited to 'sys-apps/dbus/files') diff --git a/sys-apps/dbus/files/dbus-0.11-cvs-update.patch b/sys-apps/dbus/files/dbus-0.11-cvs-update.patch new file mode 100644 index 000000000000..6a610d88080d --- /dev/null +++ b/sys-apps/dbus/files/dbus-0.11-cvs-update.patch @@ -0,0 +1,7403 @@ +diff -urN dbus-0.11.orig/ChangeLog dbus-0.11/ChangeLog +--- dbus-0.11.orig/ChangeLog 2003-05-15 12:50:37.000000000 -0700 ++++ dbus-0.11/ChangeLog 2003-05-28 13:32:17.000000000 -0700 +@@ -1,3 +1,74 @@ ++2003-05-18 Anders Carlsson ++ ++ * dbus/dbus-message.c (dbus_message_new): Remove @todo. ++ ++2003-05-17 Colin Walters ++ ++ * tools/dbus-send.c: Don't exit with an error code if --help was ++ passed. Default to using the session bus instead of the system ++ one. ++ ++ * tools/dbus-launch.c: Ditto. ++ ++ * tools/dbus-monitor.c: Ditto. ++ ++ * tools/dbus-send.1: Update with new arguments. ++ ++ * tools/dbus-launch.c: Emit code to export variables. New ++ arguments -s and -c to specify shell syntax, and a bit of code to ++ autodetect syntax. Also, allow specifying a program to run. ++ ++ * tools/dbus-launch.1: Update with new arguments. ++ ++ * tools/dbus-send.1: Ditto. ++ ++ * tools/dbus-monitor.1: Ditto. ++ ++2003-05-17 Havoc Pennington ++ ++ * bus/config-parser.c (merge_included): merge in policies from ++ child configuration file. ++ ++ * bus/policy.c (bus_policy_merge): function to merge two policies ++ together ++ ++2003-05-16 Havoc Pennington ++ ++ * dbus/dbus-connection.c: disable verbose lock spew ++ ++ * tools/dbus-send.c: add --print-reply command line option ++ ++ * tools/dbus-print-message.h (print_message): new util function ++ shared by dbus-send and dbus-monitor ++ ++ * tools/dbus-monitor.c (handler_func): exit on disconnect ++ ++ * dbus/dbus-transport-unix.c (do_reading): if the transport is ++ disconnected, don't try to use the read_watch ++ ++ * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL ++ so we can find this bug more easily ++ ++2003-05-16 Havoc Pennington ++ ++ * bus/policy.c (free_rule_list_func): avoid a crash when passed ++ NULL as DBusHashTable is annoyingly likely to do. ++ ++2003-05-16 Colin Walters ++ ++ * tools/dbus-monitor.c: Add --session argument and usage() ++ function. ++ ++ * tools/dbus-monitor.1: Update with new --session arg. ++ ++ * bus/Makefile.am (install-data-hook): Create ++ $(libdir)/dbus-1.0/services so that the session bus is happy. ++ ++2003-05-15 Havoc Pennington ++ ++ * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work ++ on non-x86. ifdef's are evil. ++ + 2003-05-15 Havoc Pennington + + * configure.in: 0.11 +diff -urN dbus-0.11.orig/Makefile.in dbus-0.11/Makefile.in +--- dbus-0.11.orig/Makefile.in 2003-05-15 12:50:57.000000000 -0700 ++++ dbus-0.11/Makefile.in 2003-05-28 13:34:13.000000000 -0700 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.7.3 from Makefile.am. ++# Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +@@ -390,9 +390,15 @@ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ ++ if (etags --etags-include --version) >/dev/null 2>&1; then \ ++ include_option=--etags-include; \ ++ else \ ++ include_option=--include; \ ++ fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ ++ test -f $$subdir/TAGS && \ ++ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ +@@ -536,7 +542,7 @@ + @echo "$(distdir).tar.gz is ready for distribution" | \ + sed 'h;s/./=/g;p;x;p;x' + distuninstallcheck: +- cd $(distuninstallcheck_dir) \ ++ @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ +@@ -545,11 +551,11 @@ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 + distcleancheck: distclean +- if test '$(srcdir)' = . ; then \ ++ @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi +- test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ++ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +diff -urN dbus-0.11.orig/aclocal.m4 dbus-0.11/aclocal.m4 +--- dbus-0.11.orig/aclocal.m4 2003-05-15 12:50:53.000000000 -0700 ++++ dbus-0.11/aclocal.m4 2003-05-28 13:34:07.000000000 -0700 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.7.3 -*- Autoconf -*- ++# generated automatically by aclocal 1.7.5 -*- Autoconf -*- + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 + # Free Software Foundation, Inc. +@@ -74,7 +74,7 @@ + # This macro actually does too much some checks are only needed if + # your package does certain things. But this isn't really a big deal. + +-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + # Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify +@@ -92,14 +92,7 @@ + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + # 02111-1307, USA. + +-# serial 9 +- +-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +-# written in clear, in which case automake, when reading aclocal.m4, +-# will think it sees a *use*, and therefore will trigger all it's +-# C support machinery. Also note that it means that autoscan, seeing +-# CC etc. in the Makefile, will ask for an AC_PROG_CC use... +- ++# serial 10 + + AC_PREREQ([2.54]) + +@@ -228,7 +221,7 @@ + # Call AM_AUTOMAKE_VERSION so it can be traced. + # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +- [AM_AUTOMAKE_VERSION([1.7.3])]) ++ [AM_AUTOMAKE_VERSION([1.7.5])]) + + # Helper functions for option handling. -*- Autoconf -*- + +@@ -778,7 +771,7 @@ + + # Check to see how 'make' treats includes. -*- Autoconf -*- + +-# Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + + # 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 +@@ -803,8 +796,9 @@ + AC_DEFUN([AM_MAKE_INCLUDE], + [am_make=${MAKE-make} + cat > confinc << 'END' +-doit: ++am__doit: + @echo done ++.PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. + AC_MSG_CHECKING([for style of include used by $am_make]) +@@ -832,9 +826,9 @@ + _am_result=BSD + fi + fi +-AC_SUBST(am__include) +-AC_SUBST(am__quote) +-AC_MSG_RESULT($_am_result) ++AC_SUBST([am__include]) ++AC_SUBST([am__quote]) ++AC_MSG_RESULT([$_am_result]) + rm -f confinc confmf + ]) + +@@ -2331,30 +2325,6 @@ + hardcode_shlibpath_var=no + ;; + +- linux*) +- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- supports_anon_versioning=no +- case `$LD -v 2>/dev/null` in +- *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 +- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... +- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... +- *\ 2.11.*) ;; # other 2.11 versions +- *) supports_anon_versioning=yes ;; +- esac +- if test $supports_anon_versioning = yes; then +- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +-$echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' +- else +- $archive_expsym_cmds="$archive_cmds" +- fi +- else +- ld_shlibs=no +- fi +- ;; +- + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +@@ -2493,7 +2463,7 @@ + allow_undefined_flag='${wl}-berok' + # This is a bit strange, but is similar to how AIX traditionally builds + # it's shared libraries. +- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' ++ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; +@@ -3024,6 +2994,18 @@ + dynamic_linker=no + ;; + ++freebsd*-gnu*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ hardcode_into_libs=yes ++ dynamic_linker='GNU/FreeBSD ld.so' ++ ;; ++ + freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat +@@ -3189,6 +3171,7 @@ + osf3* | osf4* | osf5*) + version_type=osf + need_version=no ++ need_lib_prefix=no + soname_spec='${libname}${release}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH +@@ -4323,7 +4306,7 @@ + # This must be Linux ELF. + linux-gnu*) + case $host_cpu in +- alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) ++ alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | arm* | m68k) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM +diff -urN dbus-0.11.orig/bus/Makefile.am dbus-0.11/bus/Makefile.am +--- dbus-0.11.orig/bus/Makefile.am 2003-05-15 12:50:25.000000000 -0700 ++++ dbus-0.11/bus/Makefile.am 2003-05-16 00:01:38.000000000 -0700 +@@ -86,6 +86,7 @@ + install-data-hook: + $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus + $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d ++ $(mkinstalldirs) $(DESTDIR)/$(libdir)/dbus-1.0/services + + #### Init scripts fun + SCRIPT_IN_FILES=messagebus.in +diff -urN dbus-0.11.orig/bus/Makefile.in dbus-0.11/bus/Makefile.in +--- dbus-0.11.orig/bus/Makefile.in 2003-05-15 12:50:57.000000000 -0700 ++++ dbus-0.11/bus/Makefile.in 2003-05-28 13:34:13.000000000 -0700 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.7.3 from Makefile.am. ++# Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +@@ -277,6 +277,7 @@ + #### Extra dist + EXTRA_DIST = $(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES) + subdir = bus ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = system.conf session.conf messagebus dbus-daemon-1.1 +@@ -454,7 +455,7 @@ + .c.o: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -465,7 +466,7 @@ + .c.obj: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -476,7 +477,7 @@ + .c.lo: + @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@@ -724,7 +725,6 @@ + + installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(initddir) $(DESTDIR)$(man1dir) $(DESTDIR)$(configdir) +- + install: install-am + install-exec: install-exec-am + install-data: install-data-am +@@ -823,6 +823,7 @@ + install-data-hook: + $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus + $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d ++ $(mkinstalldirs) $(DESTDIR)/$(libdir)/dbus-1.0/services + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +diff -urN dbus-0.11.orig/bus/bus.c dbus-0.11/bus/bus.c +--- dbus-0.11.orig/bus/bus.c 2003-05-05 12:10:38.000000000 -0700 ++++ dbus-0.11/bus/bus.c 2003-05-16 13:25:47.000000000 -0700 +@@ -970,6 +970,7 @@ + "had name \"%s\" destination \"%s\")", + dbus_message_get_name (message), + dest ? dest : DBUS_SERVICE_DBUS); ++ _dbus_verbose ("security policy disallowing message due to sender policy\n"); + return FALSE; + } + +@@ -986,6 +987,7 @@ + "had name \"%s\" destination \"%s\")", + dbus_message_get_name (message), + dest ? dest : DBUS_SERVICE_DBUS); ++ _dbus_verbose ("security policy disallowing message due to recipient policy\n"); + return FALSE; + } + +@@ -998,8 +1000,10 @@ + dbus_set_error (error, DBUS_ERROR_LIMITS_EXCEEDED, + "The destination service \"%s\" has a full message queue", + dest ? dest : DBUS_SERVICE_DBUS); ++ _dbus_verbose ("security policy disallowing message due to full message queue\n"); + return FALSE; + } +- ++ ++ _dbus_verbose ("security policy allowing message\n"); + return TRUE; + } +diff -urN dbus-0.11.orig/bus/config-parser.c dbus-0.11/bus/config-parser.c +--- dbus-0.11.orig/bus/config-parser.c 2003-04-28 11:49:04.000000000 -0700 ++++ dbus-0.11/bus/config-parser.c 2003-05-17 19:16:22.000000000 -0700 +@@ -231,6 +231,13 @@ + { + DBusList *link; + ++ if (!bus_policy_merge (parser->policy, ++ included->policy)) ++ { ++ BUS_SET_OOM (error); ++ return FALSE; ++ } ++ + if (included->user != NULL) + { + dbus_free (parser->user); +diff -urN dbus-0.11.orig/bus/dbus-daemon-1.1 dbus-0.11/bus/dbus-daemon-1.1 +--- dbus-0.11.orig/bus/dbus-daemon-1.1 2003-05-15 12:51:12.000000000 -0700 ++++ dbus-0.11/bus/dbus-daemon-1.1 2003-05-28 13:34:41.000000000 -0700 +@@ -30,9 +30,9 @@ + + .PP + The \-\-session option is equivalent to +-"\-\-config-file=/unst/etc/dbus-1/session.conf" and the \-\-system ++"\-\-config-file=/build/dbus/etc/dbus-1/session.conf" and the \-\-system + option is equivalent to +-"\-\-config-file=/unst/etc/dbus-1/system.conf". By creating ++"\-\-config-file=/build/dbus/etc/dbus-1/system.conf". By creating + additional configuration files and using the \-\-config-file option, + additional special-purpose message bus daemons could be created. + +@@ -106,8 +106,8 @@ + + .PP + The standard systemwide and per-session message bus setups are +-configured in the files "/unst/etc/dbus-1/system.conf" and +-"/unst/etc/dbus-1/session.conf". These files normally ++configured in the files "/build/dbus/etc/dbus-1/system.conf" and ++"/build/dbus/etc/dbus-1/session.conf". These files normally + a system-local.conf or session-local.conf; you can put local + overrides in those files to avoid modifying the primary configuration + files. +@@ -169,7 +169,7 @@ + This is intended to allow extension of the system bus by particular + packages. For example, if CUPS wants to be able to send out + notification of printer queue changes, it could install a file to +-/unst/etc/dbus-1/system.d that allowed all apps to receive ++/build/dbus/etc/dbus-1/system.d that allowed all apps to receive + this message and allowed the printer daemon user to send it. + + .TP +diff -urN dbus-0.11.orig/bus/policy.c dbus-0.11/bus/policy.c +--- dbus-0.11.orig/bus/policy.c 2003-04-28 11:10:54.000000000 -0700 ++++ dbus-0.11/bus/policy.c 2003-05-17 19:16:22.000000000 -0700 +@@ -124,6 +124,9 @@ + { + DBusList **list = data; + ++ if (list == NULL) /* DBusHashTable is on crack */ ++ return; ++ + _dbus_list_foreach (list, free_rule_func, NULL); + + _dbus_list_clear (list); +@@ -509,6 +512,87 @@ + return TRUE; + } + ++static dbus_bool_t ++append_copy_of_policy_list (DBusList **list, ++ DBusList **to_append) ++{ ++ DBusList *link; ++ DBusList *tmp_list; ++ ++ tmp_list = NULL; ++ ++ /* Preallocate all our links */ ++ link = _dbus_list_get_first_link (to_append); ++ while (link != NULL) ++ { ++ if (!_dbus_list_append (&tmp_list, link->data)) ++ { ++ _dbus_list_clear (&tmp_list); ++ return FALSE; ++ } ++ ++ link = _dbus_list_get_next_link (to_append, link); ++ } ++ ++ /* Now append them */ ++ while ((link = _dbus_list_pop_first_link (&tmp_list))) ++ { ++ bus_policy_rule_ref (link->data); ++ _dbus_list_append_link (list, link); ++ } ++ ++ return TRUE; ++} ++ ++static dbus_bool_t ++merge_id_hash (DBusHashTable *dest, ++ DBusHashTable *to_absorb) ++{ ++ DBusHashIter iter; ++ ++ _dbus_hash_iter_init (to_absorb, &iter); ++ while (_dbus_hash_iter_next (&iter)) ++ { ++ unsigned long id = _dbus_hash_iter_get_ulong_key (&iter); ++ DBusList **list = _dbus_hash_iter_get_value (&iter); ++ DBusList **target = get_list (dest, id); ++ ++ if (target == NULL) ++ return FALSE; ++ ++ if (!append_copy_of_policy_list (target, list)) ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ ++dbus_bool_t ++bus_policy_merge (BusPolicy *policy, ++ BusPolicy *to_absorb) ++{ ++ /* Not properly atomic, but as used for configuration files ++ * we don't rely on it. ++ */ ++ if (!append_copy_of_policy_list (&policy->default_rules, ++ &to_absorb->default_rules)) ++ return FALSE; ++ ++ if (!append_copy_of_policy_list (&policy->mandatory_rules, ++ &to_absorb->mandatory_rules)) ++ return FALSE; ++ ++ if (!merge_id_hash (policy->rules_by_uid, ++ to_absorb->rules_by_uid)) ++ return FALSE; ++ ++ if (!merge_id_hash (policy->rules_by_gid, ++ to_absorb->rules_by_gid)) ++ return FALSE; ++ ++ return TRUE; ++} ++ + struct BusClientPolicy + { + int refcount; +diff -urN dbus-0.11.orig/bus/policy.h dbus-0.11/bus/policy.h +--- dbus-0.11.orig/bus/policy.h 2003-04-28 11:10:54.000000000 -0700 ++++ dbus-0.11/bus/policy.h 2003-05-17 19:16:22.000000000 -0700 +@@ -111,7 +111,8 @@ + dbus_bool_t bus_policy_append_group_rule (BusPolicy *policy, + dbus_gid_t gid, + BusPolicyRule *rule); +- ++dbus_bool_t bus_policy_merge (BusPolicy *policy, ++ BusPolicy *to_absorb); + + BusClientPolicy* bus_client_policy_new (void); + void bus_client_policy_ref (BusClientPolicy *policy); +diff -urN dbus-0.11.orig/bus/system.conf.in dbus-0.11/bus/system.conf.in +--- dbus-0.11.orig/bus/system.conf.in 2003-05-02 15:12:23.000000000 -0700 ++++ dbus-0.11/bus/system.conf.in 2003-05-16 13:25:47.000000000 -0700 +@@ -37,6 +37,8 @@ + + + ++ + + + +diff -urN dbus-0.11.orig/config.guess dbus-0.11/config.guess +--- dbus-0.11.orig/config.guess 2003-05-15 12:50:52.000000000 -0700 ++++ dbus-0.11/config.guess 2003-05-28 13:34:06.000000000 -0700 +@@ -1,9 +1,9 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +-timestamp='2002-10-21' ++timestamp='2003-05-19' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -98,14 +98,17 @@ + # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still + # use `HOST_CC' if defined, but it is deprecated. + +-# This shell variable is my proudest work .. or something. --bje ++# Portable tmp directory creation inspired by the Autoconf team. + +-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +-(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) +- || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +-dummy=$tmpdir/dummy ; +-files="$dummy.c $dummy.o $dummy.rel $dummy" ; +-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; ++set_cc_for_build=' ++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ++: ${TMPDIR=/tmp} ; ++ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ++dummy=$tmp/dummy ; ++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; + case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do +@@ -113,15 +116,13 @@ + CC_FOR_BUILD="$c"; break ; + fi ; + done ; +- rm -f $files ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac ; +-unset files' ++esac ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 1994-08-24) +@@ -178,7 +179,18 @@ + ;; + esac + # The OS release +- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ # Debian GNU/NetBSD machines have a different userland, and ++ # thus, need a distinct triplet. However, they do not need ++ # kernel version information, so it can be replaced with a ++ # suitable tag, in the style of linux-gnu. ++ case "${UNAME_VERSION}" in ++ Debian*) ++ release='-gnu' ++ ;; ++ *) ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ ;; ++ esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. +@@ -227,66 +239,47 @@ + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi ++ # According to Compaq, /usr/sbin/psrinfo has been available on ++ # OSF/1 and Tru64 systems produced since 1995. I hope that ++ # covers most systems running today. This code pipes the CPU ++ # types through head -n 1, so we only detect the type of CPU 0. ++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` ++ case "$ALPHA_CPU_TYPE" in ++ "EV4 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "EV4.5 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "LCA4 (21066/21068)") ++ UNAME_MACHINE="alpha" ;; ++ "EV5 (21164)") ++ UNAME_MACHINE="alphaev5" ;; ++ "EV5.6 (21164A)") ++ UNAME_MACHINE="alphaev56" ;; ++ "EV5.6 (21164PC)") ++ UNAME_MACHINE="alphapca56" ;; ++ "EV5.7 (21164PC)") ++ UNAME_MACHINE="alphapca57" ;; ++ "EV6 (21264)") ++ UNAME_MACHINE="alphaev6" ;; ++ "EV6.7 (21264A)") ++ UNAME_MACHINE="alphaev67" ;; ++ "EV6.8CB (21264C)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8AL (21264B)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8CX (21264D)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.9A (21264/EV69A)") ++ UNAME_MACHINE="alphaev69" ;; ++ "EV7 (21364)") ++ UNAME_MACHINE="alphaev7" ;; ++ "EV7.9 (21364A)") ++ UNAME_MACHINE="alphaev79" ;; ++ esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- eval $set_cc_for_build +- cat <$dummy.s +- .data +-\$Lformat: +- .byte 37,100,45,37,120,10,0 # "%d-%x\n" +- +- .text +- .globl main +- .align 4 +- .ent main +-main: +- .frame \$30,16,\$26,0 +- ldgp \$29,0(\$27) +- .prologue 1 +- .long 0x47e03d80 # implver \$0 +- lda \$2,-1 +- .long 0x47e20c21 # amask \$2,\$1 +- lda \$16,\$Lformat +- mov \$0,\$17 +- not \$1,\$18 +- jsr \$26,printf +- ldgp \$29,0(\$26) +- mov 0,\$16 +- jsr \$26,exit +- .end main +-EOF +- $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null +- if test "$?" = 0 ; then +- case `$dummy` in +- 0-0) +- UNAME_MACHINE="alpha" +- ;; +- 1-0) +- UNAME_MACHINE="alphaev5" +- ;; +- 1-1) +- UNAME_MACHINE="alphaev56" +- ;; +- 1-101) +- UNAME_MACHINE="alphapca56" +- ;; +- 2-303) +- UNAME_MACHINE="alphaev6" +- ;; +- 2-307) +- UNAME_MACHINE="alphaev67" +- ;; +- 2-1307) +- UNAME_MACHINE="alphaev68" +- ;; +- 3-1307) +- UNAME_MACHINE="alphaev7" +- ;; +- esac +- fi +- rm -f $dummy.s $dummy && rmdir $tmpdir + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) +@@ -439,8 +432,7 @@ + EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +- rm -f $dummy.c $dummy && rmdir $tmpdir ++ && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) +@@ -449,7 +441,7 @@ + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; +- Night_Hawk:*:*:PowerMAX_OS) ++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) +@@ -524,8 +516,7 @@ + exit(0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +- rm -f $dummy.c $dummy && rmdir $tmpdir ++ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 +@@ -624,10 +615,20 @@ + } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` +- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi +- rm -f $dummy.c $dummy && rmdir $tmpdir ++ test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac ++ if [ ${HP_ARCH} = "hppa2.0w" ] ++ then ++ # avoid double evaluation of $set_cc_for_build ++ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null ++ then ++ HP_ARCH="hppa2.0w" ++ else ++ HP_ARCH="hppa64" ++ fi ++ fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) +@@ -661,8 +662,7 @@ + exit (0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +- rm -f $dummy.c $dummy && rmdir $tmpdir ++ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) +@@ -720,15 +720,15 @@ + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; +- CRAY*T3D:*:*:*) +- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; ++ *:UNICOS/mp:*:*) ++ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +@@ -744,7 +744,7 @@ + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; +- *:FreeBSD:*:*) ++ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -756,7 +756,6 @@ + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) +@@ -769,13 +768,16 @@ + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:3*) +- echo i386-pc-interix3 ++ echo i586-pc-interix3 ++ exit 0 ;; ++ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) ++ echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? +- echo i386-pc-interix ++ echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin +@@ -795,6 +797,9 @@ + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; ++ cris:Linux:*:*) ++ echo cris-axis-linux-gnu ++ exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; +@@ -818,8 +823,26 @@ + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- rm -f $dummy.c && rmdir $tmpdir +- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ++ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ++ ;; ++ mips64:Linux:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #undef CPU ++ #undef mips64 ++ #undef mips64el ++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ++ CPU=mips64el ++ #else ++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ++ CPU=mips64 ++ #else ++ CPU= ++ #endif ++ #endif ++EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ++ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu +@@ -914,7 +937,6 @@ + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- rm -f $dummy.c && rmdir $tmpdir + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; +@@ -932,6 +954,23 @@ + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; ++ i*86:OS/2:*:*) ++ # If we were able to find `uname', then EMX Unix compatibility ++ # is probably installed. ++ echo ${UNAME_MACHINE}-pc-os2-emx ++ exit 0 ;; ++ i*86:XTS-300:*:STOP) ++ echo ${UNAME_MACHINE}-unknown-stop ++ exit 0 ;; ++ i*86:atheos:*:*) ++ echo ${UNAME_MACHINE}-unknown-atheos ++ exit 0 ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ echo i386-unknown-lynxos${UNAME_RELEASE} ++ exit 0 ;; ++ i*86:*DOS:*:*) ++ echo ${UNAME_MACHINE}-pc-msdosdjgpp ++ exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +@@ -966,9 +1005,6 @@ + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; +- i*86:*DOS:*:*) +- echo ${UNAME_MACHINE}-pc-msdosdjgpp +- exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about +@@ -995,9 +1031,12 @@ + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; ++ M680?0:D-NIX:5.3:*) ++ echo m68k-diab-dnix ++ exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; +- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) ++ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` +@@ -1014,9 +1053,6 @@ + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) +- echo i386-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; +@@ -1098,7 +1134,11 @@ + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) +- echo `uname -p`-apple-darwin${UNAME_RELEASE} ++ case `uname -p` in ++ *86) UNAME_PROCESSOR=i686 ;; ++ powerpc) UNAME_PROCESSOR=powerpc ;; ++ esac ++ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` +@@ -1134,11 +1174,6 @@ + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; +- i*86:OS/2:*:*) +- # If we were able to find `uname', then EMX Unix compatibility +- # is probably installed. +- echo ${UNAME_MACHINE}-pc-os2-emx +- exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; +@@ -1157,12 +1192,6 @@ + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +- i*86:XTS-300:*:STOP) +- echo ${UNAME_MACHINE}-unknown-stop +- exit 0 ;; +- i*86:atheos:*:*) +- echo ${UNAME_MACHINE}-unknown-atheos +- exit 0 ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 +@@ -1283,8 +1312,7 @@ + } + EOF + +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +-rm -f $dummy.c $dummy && rmdir $tmpdir ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + + # Apollos put the system type in the environment. + +diff -urN dbus-0.11.orig/config.sub dbus-0.11/config.sub +--- dbus-0.11.orig/config.sub 2003-05-15 12:50:52.000000000 -0700 ++++ dbus-0.11/config.sub 2003-05-28 13:34:06.000000000 -0700 +@@ -1,9 +1,9 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +-timestamp='2002-09-05' ++timestamp='2003-05-09' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -118,7 +118,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -245,17 +245,19 @@ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ ++ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ ++ | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ +@@ -294,7 +296,7 @@ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ +- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ ++ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ +@@ -315,21 +317,25 @@ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ ++ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ +- | mipstx39 | mipstx39el \ +- | none-* | np1-* | ns16k-* | ns32k-* \ ++ | mipstx39-* | mipstx39el-* \ ++ | msp430-* \ ++ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ +- | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ ++ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ +- | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ ++ | tahoe-* | thumb-* \ ++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ++ | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ +@@ -367,6 +373,9 @@ + basic_machine=a29k-none + os=-bsd + ;; ++ amd64) ++ basic_machine=x86_64-pc ++ ;; + amdahl) + basic_machine=580-amdahl + os=-sysv +@@ -716,6 +725,10 @@ + np1) + basic_machine=np1-gould + ;; ++ nv1) ++ basic_machine=nv1-cray ++ os=-unicosmp ++ ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; +@@ -901,10 +914,6 @@ + basic_machine=i386-sequent + os=-dynix + ;; +- t3d) +- basic_machine=alpha-cray +- os=-unicos +- ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos +@@ -921,6 +930,14 @@ + basic_machine=tic54x-unknown + os=-coff + ;; ++ tic55x | c55x*) ++ basic_machine=tic55x-unknown ++ os=-coff ++ ;; ++ tic6x | c6x*) ++ basic_machine=tic6x-unknown ++ os=-coff ++ ;; + tx39) + basic_machine=mipstx39-unknown + ;; +@@ -977,10 +994,6 @@ + basic_machine=hppa1.1-winbond + os=-proelf + ;; +- windows32) +- basic_machine=i386-pc +- os=-windows32-msvcrt +- ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; +@@ -1027,7 +1040,7 @@ + we32k) + basic_machine=we32k-att + ;; +- sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) ++ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) +@@ -1113,11 +1126,12 @@ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ +- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ ++ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ +- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) ++ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ ++ | -powermax* | -dnix*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1129,8 +1143,10 @@ + ;; + esac + ;; ++ -nto-qnx*) ++ ;; + -nto*) +- os=-nto-qnx ++ os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ +@@ -1224,6 +1240,12 @@ + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; ++ -aros*) ++ os=-aros ++ ;; ++ -kaos*) ++ os=-kaos ++ ;; + -none) + ;; + *) +diff -urN dbus-0.11.orig/configure dbus-0.11/configure +--- dbus-0.11.orig/configure 2003-05-15 12:50:59.000000000 -0700 ++++ dbus-0.11/configure 2003-05-28 13:34:15.000000000 -0700 +@@ -2677,12 +2677,12 @@ + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ +- '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ +- 'void exit (int);' ++ 'void exit (int);' \ ++ '#include ' + do + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" +@@ -2782,8 +2782,9 @@ + + am_make=${MAKE-make} + cat > confinc << 'END' +-doit: ++am__doit: + @echo done ++.PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. + echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +@@ -3154,12 +3155,12 @@ + fi + for ac_declaration in \ + ''\ +- '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ +- 'void exit (int);' ++ 'void exit (int);' \ ++ '#include ' + do + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" +@@ -4286,7 +4287,7 @@ + # This must be Linux ELF. + linux-gnu*) + case $host_cpu in +- alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) ++ alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | arm* | m68k) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM +@@ -5099,7 +5100,7 @@ + case $host in + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 5102 "configure"' > conftest.$ac_ext ++ echo '#line 5103 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -5628,7 +5629,7 @@ + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" + compiler_c_o=no +-if { (eval echo configure:5631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then ++if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then +@@ -6025,30 +6026,6 @@ + hardcode_shlibpath_var=no + ;; + +- linux*) +- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- supports_anon_versioning=no +- case `$LD -v 2>/dev/null` in +- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 +- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... +- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... +- *\ 2.11.*) ;; # other 2.11 versions +- *) supports_anon_versioning=yes ;; +- esac +- if test $supports_anon_versioning = yes; then +- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +-$echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' +- else +- $archive_expsym_cmds="$archive_cmds" +- fi +- else +- ld_shlibs=no +- fi +- ;; +- + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +@@ -6187,7 +6164,7 @@ + allow_undefined_flag='${wl}-berok' + # This is a bit strange, but is similar to how AIX traditionally builds + # it's shared libraries. +- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' ++ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; +@@ -6725,6 +6702,18 @@ + dynamic_linker=no + ;; + ++freebsd*-gnu*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ hardcode_into_libs=yes ++ dynamic_linker='GNU/FreeBSD ld.so' ++ ;; ++ + freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat +@@ -6890,6 +6879,7 @@ + osf3* | osf4* | osf5*) + version_type=osf + need_version=no ++ need_lib_prefix=no + soname_spec='${libname}${release}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH +@@ -7484,7 +7474,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext <mutex); \ +diff -urN dbus-0.11.orig/dbus/dbus-sysdeps.c dbus-0.11/dbus/dbus-sysdeps.c +--- dbus-0.11.orig/dbus/dbus-sysdeps.c 2003-05-15 12:19:07.000000000 -0700 ++++ dbus-0.11/dbus/dbus-sysdeps.c 2003-05-15 19:11:02.000000000 -0700 +@@ -1822,11 +1822,10 @@ + #ifdef DBUS_USE_ATOMIC_INT_486 + return atomic_exchange_and_add (atomic, 1); + #else +- dbus_atomic_t res; +- ++ dbus_int32_t res; + _DBUS_LOCK (atomic); +- *atomic += 1; +- res = *atomic; ++ res = atomic->value; ++ atomic->value += 1; + _DBUS_UNLOCK (atomic); + return res; + #endif +@@ -1846,11 +1845,11 @@ + #ifdef DBUS_USE_ATOMIC_INT_486 + return atomic_exchange_and_add (atomic, -1); + #else +- dbus_atomic_t res; ++ dbus_int32_t res; + + _DBUS_LOCK (atomic); +- *atomic -= 1; +- res = *atomic; ++ res = atomic->value; ++ atomic->value -= 1; + _DBUS_UNLOCK (atomic); + return res; + #endif +diff -urN dbus-0.11.orig/dbus/dbus-transport-unix.c dbus-0.11/dbus/dbus-transport-unix.c +--- dbus-0.11.orig/dbus/dbus-transport-unix.c 2003-04-21 11:39:42.000000000 -0700 ++++ dbus-0.11/dbus/dbus-transport-unix.c 2003-05-16 13:25:47.000000000 -0700 +@@ -593,11 +593,9 @@ + total = 0; + + again: +- ++ + /* See if we've exceeded max messages and need to disable reading */ + check_read_watch (transport); +- if (!dbus_watch_get_enabled (unix_transport->read_watch)) +- return TRUE; + + if (total > unix_transport->max_bytes_read_per_iteration) + { +@@ -606,9 +604,15 @@ + goto out; + } + ++ _dbus_assert (unix_transport->read_watch != NULL || ++ transport->disconnected); ++ + if (transport->disconnected) + goto out; + ++ if (!dbus_watch_get_enabled (unix_transport->read_watch)) ++ return TRUE; ++ + if (_dbus_auth_needs_decoding (transport->auth)) + { + if (_dbus_string_get_length (&unix_transport->encoded_incoming) > 0) +diff -urN dbus-0.11.orig/dbus/dbus-watch.c dbus-0.11/dbus/dbus-watch.c +--- dbus-0.11.orig/dbus/dbus-watch.c 2003-05-05 12:10:38.000000000 -0700 ++++ dbus-0.11/dbus/dbus-watch.c 2003-05-16 13:25:47.000000000 -0700 +@@ -535,6 +535,7 @@ + dbus_bool_t + dbus_watch_get_enabled (DBusWatch *watch) + { ++ _dbus_assert (watch != NULL); + return watch->enabled; + } + +diff -urN dbus-0.11.orig/depcomp dbus-0.11/depcomp +--- dbus-0.11.orig/depcomp 2003-01-27 03:03:04.000000000 -0800 ++++ dbus-0.11/depcomp 2003-05-19 11:10:58.000000000 -0700 +@@ -206,6 +206,36 @@ + rm -f "$tmpdepfile" + ;; + ++icc) ++ # Must come before tru64. ++ ++ # Intel's C compiler understands `-MD -MF file'. However ++ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c ++ # will fill foo.d with something like ++ # foo.o: sub/foo.c ++ # foo.o: sub/foo.h ++ # which is wrong. We want: ++ # sub/foo.o: sub/foo.c ++ # sub/foo.o: sub/foo.h ++ # sub/foo.c: ++ # sub/foo.h: ++ ++ "$@" -MD -MF "$tmpdepfile" ++ stat=$? ++ if test $stat -eq 0; then : ++ else ++ rm -f "$tmpdepfile" ++ exit $stat ++ fi ++ rm -f "$depfile" ++ # Each line is of the form `foo.o: dependent.h'. ++ # Do two passes, one to just change these to ++ # `$object: dependent.h' and one to simply `dependent.h:'. ++ sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" ++ sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" ++ rm -f "$tmpdepfile" ++ ;; ++ + tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. +@@ -265,9 +295,7 @@ + shift + fi + +- # Remove `-o $object'. We will use -o /dev/null later, +- # however we can't do the remplacement now because +- # `-o $object' might simply not be used ++ # Remove `-o $object'. + IFS=" " + for arg + do +@@ -287,7 +315,11 @@ + done + + test -z "$dashmflag" && dashmflag=-M +- "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ++ # Require at least two characters before searching for `:' ++ # in the target name. This is to cope with DOS-style filenames: ++ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. ++ "$@" $dashmflag | ++ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +@@ -306,6 +338,13 @@ + + makedepend) + "$@" || exit $? ++ # Remove any Libtool call ++ if test "$libtool" = yes; then ++ while test $1 != '--mode=compile'; do ++ shift ++ done ++ shift ++ fi + # X makedepend + shift + cleared=no +@@ -318,7 +357,9 @@ + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; +- -*) ++ # Strip any option that makedepend may not understand. Remove ++ # the object too, otherwise makedepend will parse it as a source file. ++ -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; +diff -urN dbus-0.11.orig/doc/Makefile.in dbus-0.11/doc/Makefile.in +--- dbus-0.11.orig/doc/Makefile.in 2003-05-15 12:50:57.000000000 -0700 ++++ dbus-0.11/doc/Makefile.in 2003-05-28 13:34:13.000000000 -0700 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.7.3 from Makefile.am. ++# Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +@@ -194,6 +194,7 @@ + file-boilerplate.c + + subdir = doc ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +@@ -260,7 +261,6 @@ + all-am: Makefile all-local + + installdirs: +- + install: install-am + install-exec: install-exec-am + install-data: install-data-am +diff -urN dbus-0.11.orig/doc/TODO dbus-0.11/doc/TODO +--- dbus-0.11.orig/doc/TODO 2003-05-15 12:19:07.000000000 -0700 ++++ dbus-0.11/doc/TODO 2003-05-17 19:16:22.000000000 -0700 +@@ -56,3 +56,18 @@ + will only be right for one of them. Probably need to just write() the serial + number, rather than putting it in the DBusMessage, or something. + ++ - perhaps the bus driver should have properties that reflect attributes ++ of the session, such as hostname, architecture, operating system, ++ etc. Could be useful for code that wants to special-case behavior ++ for a particular host or class of hosts, for example. ++ ++ - currently the security policy stuff for messages to/from ++ the bus driver is kind of strange; basically it's hardcoded that ++ you can always talk to the driver, but the default config file ++ has rules for it anyway, or something. it's conceptually ++ screwy at the moment. ++ ++ - elements are not merged in from included configuration ++ files; they have to be in the toplevel file. when loading ++ a child file, we could just init its DBusLimits from the parent, ++ then after parsing copy its DBusLimits back to the parent +diff -urN dbus-0.11.orig/doc/dbus-specification.html dbus-0.11/doc/dbus-specification.html +--- dbus-0.11.orig/doc/dbus-specification.html 2003-04-28 16:00:56.000000000 -0700 ++++ dbus-0.11/doc/dbus-specification.html 2003-05-15 23:56:43.000000000 -0700 +@@ -1,12 +1,11 @@ +- ++ + D-BUS SpecificationD-BUS SpecificationD-BUS Specification

Havoc Pennington

Red Hat, Inc

    


++   

Anders Carlsson

CodeFactory AB

            


++          

Alexander Larsson

Red Hat, Inc

            


++          


Version 0.7

Table of Contents
1. Introduction
2. Message Protocol
2.1. Header Encoding
2.2. Header Fields
2.3. Header Alignment Padding
2.4. Message Arguments
2.5. Valid names
3. Authentication Protocol
3.1. Protocol Overview
3.2. Special credentials-passing nul byte
3.3. AUTH command
3.4. CANCEL Command
3.5. DATA Command
3.6. BEGIN Command
3.7. REJECTED Command
3.8. OK Command
3.9. ERROR Command
3.10. Authentication examples
3.11. Authentication mechanisms
3.11.1. DBUS_COOKIE_SHA1
4. Server Addresses
5. Message Conventions
5.1. Message Naming
5.2. Method Call Mapping
6. Standard Peer-to-Peer Messages
6.1. org.freedesktop.Peer.Ping
6.2. org.freedesktop.Props.Get
7. Message Bus Specification
7.1. Message Bus Overview
7.2. Message Bus Services
7.3. Message Bus Message Routing
7.4. Message Bus Service Activation
7.5. Well-known Message Bus Instances
7.5.1. Login session message bus
7.5.2. System message bus
7.6. Message Bus Messages
7.6.1. org.freedesktop.DBus.Hello
7.6.2. org.freedesktop.DBus.ListServices
7.6.3. org.freedesktop.DBus.ServiceExists
7.6.4. org.freedesktop.DBus.AcquireService
7.6.5. org.freedesktop.DBus.ServiceAcquired
7.6.6. org.freedesktop.DBus.ServiceLost
7.6.7. org.freedesktop.DBus.ServiceCreated
7.6.8. org.freedesktop.DBus.ServiceDeleted
7.6.9. org.freedesktop.DBus.ActivateService
7.6.10. org.freedesktop.DBus.Error.NoMemory
7.6.11. org.freedesktop.DBus.Error.ServiceDoesNotExist
Introduction1. Introduction

D-BUS is a system for low-latency, low-overhead, easy to use + interprocess communication (IPC). In more detail: +@@ -157,9 +444,12 @@ + >

  • D-BUS is D-BUS is low-latency because it is designed + to avoid round trips and allow asynchronous operation, much like + the X protocol. +@@ -167,9 +457,12 @@ + >

  • D-BUS is D-BUS is low-overhead because it uses a + binary protocol, and does not have to convert to and from a text + format such as XML. Because D-BUS is intended for potentially +@@ -179,9 +472,12 @@ + >

  • D-BUS is D-BUS is easy to use because it works in terms + of the Section called Method Call MappingSection 5.2). +

  • The base D-BUS protocol is a peer-to-peer protocol, specified in the Section called Message ProtocolSection 2. That is, it is a system for one application + to talk to a single other application. However, the primary intended + application of D-BUS is the D-BUS , + specified in the Section called Message Bus SpecificationSection 7. The message bus is a special + application that accepts connections from multiple other applications, and + forwards messages among them. +@@ -236,8 +526,8 @@ + CLASS="SECT1" + >Message Protocol2. Message Protocol

    A Header Encoding2.1. Header Encoding

    Following the mandatory fields, there are zero or more named fields (see + the Section called Header FieldsSection 2.2), and then nul bytes + padding the header such that its total length in bytes is a multiple of + 8. +@@ -287,61 +575,42 @@ + order: +

    SizeDescription
    1 byteEndianness flag; ASCII 'l' for little-endian + or ASCII 'B' for big-endian.
    1 byteBitwise OR of flags. Unknown flags + MUST be ignored. Currently-defined flags are described below. +
    1 byteMajor protocol version of the sending application. If + the major protocol version of the receiving application does not + match, the applications will not be able to communicate and the +@@ -351,24 +620,16 @@ + >
    1 byteA nul byte, reserved for future use. + Any value for this byte MUST be accepted. +
    4 bytesAn unsigned 32-bit integer in the + message's byte order, indicating the total length in bytes of + the header including named fields and any alignment padding. +@@ -377,12 +638,8 @@ + >
    4 bytesAn unsigned 32-bit integer in the + message's byte order, indicating the total length in bytes of + the message body. +@@ -390,12 +647,8 @@ + >
    4 bytesThe message's serial number, an unsigned 32-bit integer in + the message's byte order. Applications MUST NOT reuse the same + serial number for different messages more often than 32-bit +@@ -413,38 +666,27 @@ + > Flags that can appear in the second byte of the header: +

    Header Fields2.2. Header Fields

    In addition to the required header information mentioned + in the Section called Header EncodingSection 2.1, + the header may contain zero or more named + header fields. These fields are named to allow +@@ -486,9 +726,7 @@ + of that type. + See the Section called Message ArgumentsSection 2.4 for a description + of how each type is encoded. If an implementation sees a header + field name that it does not understand, it MUST ignore +@@ -498,102 +736,65 @@ + > Here are the currently-defined named header fields: +

    Hex valueDescription
    0x1This message is an error reply. If the first argument exists and is a string, it is an error message.
    Header Alignment Padding2.3. Header Alignment Padding

    To allow implementations to keep the header and the body in a single + buffer while keeping data types aligned, the total length of the header +@@ -631,8 +832,8 @@ + CLASS="SECT2" + >Message Arguments2.4. Message Arguments

    The message body is made up of arguments. Each argument + is a type code, followed by the value of the argument +@@ -641,217 +842,133 @@ + >

    NameTypeDescription
    nameSTRINGThe name of the message, such as org.freedesktop.Peer.Ping
    rplyUINT32The serial number of the message this message is a reply + to. (The serial number is one of the mandatory header fields, + see the Section called Header EncodingSection 2.1.)
    srvcSTRINGThe name of the service this message should be routed to. + Only used in combination with the message bus, see + the Section called Message Bus SpecificationSection 7.
    sndrSTRINGThe name of the base service that sent this message. + The message bus fills in this field; the field is + only meaningful in combination with the message bus.
    The types are encoded as follows: +

    Type nameCodeDescription
    INVALID0Not a valid type code (error if it appears in a message)
    NIL1Marks an "unset" or "nonexistent" argument
    BYTE28-bit unsigned integer
    BOOLEAN3Boolean value, 0 is FALSE and 1 is TRUE. Everything else is invalid.
    INT32432-bit signed integer
    UINT32532-bit unsigned integer
    INT64664-bit signed integer
    UINT64764-bit unsigned integer
    DOUBLE8IEEE 754 double
    STRING9UTF-8 string (UTF-8 string (must be valid UTF-8). Must be zero terminated.
    NAMED10A named byte array, used for custom types
    ARRAY11Array
    DICT12A dictionary of key/value pairs
    Type nameEncoding
    INVALIDNot applicable; cannot be encoded.
    NILNo data is encoded; the type code is followed immediately + by the type code of the next argument.
    BYTEA byte.
    BOOLEANA byte, with valid values 0 and 1.
    INT3232-bit signed integer in the message's byte order, aligned to 4-byte boundary.
    UINT3232-bit unsigned integer in the message's byte order, aligned to 4-byte boundary.
    INT6464-bit signed integer in the message's byte order, aligned to 8-byte boundary.
    UINT6464-bit unsigned integer in the message's byte order, aligned to 8-byte boundary.
    DOUBLE64-bit IEEE 754 double in the message's byte order, aligned to 8-byte boundary.
    STRINGUINT32 aligned to 4-byte boundary indicating the string's + length in bytes excluding its terminating nul, followed by + string data of the given length, followed by a terminating nul +@@ -996,12 +1066,8 @@ + >
    NAMEDA string (encoded as the STRING type above) giving the + name of the type followed by an UINT32 aligned to 4-byte boundary + indicating the data length in bytes, followed by the data. +@@ -1009,12 +1075,8 @@ + >
    ARRAYA sequence of bytes giving the element type of the array, terminated + by a type different from ARRAY (just one byte for one-dimensional arrays, but + larger for multi-dimensional arrays), followed by an UINT32 (aligned to 4 bytes) +@@ -1026,12 +1088,8 @@ + >
    DICTUINT32 giving the length of the dictionary data in bytes. + This is followed by a number of keyname/value pairs, where the + keyname is encoded as a STRING above, and the value is encoded +@@ -1053,8 +1111,8 @@ + CLASS="SECT2" + >Valid names2.5. Valid names

    Messages and services have names with type STRING, meaning that + they must be valid UTF-8. However, there are also some +@@ -1092,8 +1150,8 @@ + CLASS="SECT1" + >Authentication Protocol3. Authentication Protocol

    Before the flow of messages begins, two applications must + authenticate. A simple plain-text protocol is used for +@@ -1111,8 +1169,8 @@ + CLASS="SECT2" + >Protocol Overview3.1. Protocol Overview

    The protocol is a line-based protocol, where each line ends with + \r\n. Each line begins with an all-caps ASCII command name containing +@@ -1179,8 +1237,8 @@ + CLASS="SECT2" + >Special credentials-passing nul byte3.2. Special credentials-passing nul byte

    Immediately after connecting to the server, the client must send a + single nul byte. This byte may be accompanied by credentials +@@ -1208,8 +1266,8 @@ + CLASS="SECT2" + >AUTH command3.3. AUTH command

    If an AUTH command has no arguments, it is a request to list + available mechanisms. The server SHOULD respond with a REJECTED +@@ -1253,8 +1311,8 @@ + CLASS="SECT2" + >CANCEL Command3.4. CANCEL Command

    At any time up to sending the BEGIN command, the client may send a + CANCEL command. On receiving the CANCEL command, the server MUST +@@ -1268,8 +1326,8 @@ + CLASS="SECT2" + >DATA Command3.5. DATA Command

    The DATA command may come from either client or server, and simply + contains a base64-encoded block of data to be interpreted +@@ -1286,8 +1344,8 @@ + CLASS="SECT2" + >BEGIN Command3.6. BEGIN Command

    The BEGIN command acknowledges that the client has received an + OK command from the server, and that the stream of messages +@@ -1305,8 +1363,8 @@ + CLASS="SECT2" + >REJECTED Command3.7. REJECTED Command

    The REJECTED command indicates that the current authentication + exchange has failed, and further exchange of DATA is inappropriate. +@@ -1327,8 +1385,8 @@ + CLASS="SECT2" + >OK Command3.8. OK Command

    The OK command indicates that the client has been authenticated, + and that further communication will be a stream of D-BUS messages +@@ -1352,8 +1410,8 @@ + CLASS="SECT2" + >ERROR Command3.9. ERROR Command

    The ERROR command indicates that either server or client did not + know a command, does not accept the given command in the current +@@ -1377,20 +1435,18 @@ + CLASS="SECT2" + >Authentication examples3.10. Authentication examples

    Figure 1. Example of successful magic cookie authentication

                (MAGIC_COOKIE is a made up mechanism)
    +@@ -1399,13 +1455,6 @@
    +             S: OK
    +             C: BEGIN
    +           

    Figure 1. Example of successful magic cookie authentication

    +

    Figure 2. Example of finding out mechanisms then picking one

                C: AUTH
    +@@ -1429,13 +1476,6 @@
    +             S: OK
    +             C: BEGIN
    +           

    Figure 2. Example of finding out mechanisms then picking one

    +

    Figure 3. Example of client sends unknown command then falls back to regular auth

                C: FOOBAR
    +@@ -1457,13 +1495,6 @@
    +             S: OK
    +             C: BEGIN
    +           

    Figure 3. Example of client sends unknown command then falls back to regular auth

    +

    Figure 4. Example of server doesn't support initial auth mechanism

                C: AUTH MAGIC_COOKIE BsAY3g4gBNo=
    +@@ -1487,13 +1516,6 @@
    +             S: OK
    +             C: BEGIN
    +           

    Figure 4. Example of server doesn't support initial auth mechanism

    +

    Figure 5. Example of wrong password or the like followed by successful retry

                C: AUTH MAGIC_COOKIE BsAY3g4gBNo=
    +@@ -1521,13 +1541,6 @@
    +             S: OK
    +             C: BEGIN
    +           

    Figure 5. Example of wrong password or the like followed by successful retry

    +

    Figure 6. Example of skey cancelled and restarted

                C: AUTH MAGIC_COOKIE BsAY3g4gBNo=
    +@@ -1555,13 +1566,6 @@
    +             S: OK
    +             C: BEGIN
    +           

    Figure 6. Example of skey cancelled and restarted

    +

    Authentication mechanisms3.11. Authentication mechanisms

    This section describes some new authentication mechanisms. + D-BUS also allows any standard SASL mechanism of course. +@@ -1584,8 +1588,8 @@ + CLASS="SECT3" + >DBUS_COOKIE_SHA13.11.1. DBUS_COOKIE_SHA1

    The DBUS_COOKIE_SHA1 mechanism is designed to establish that a client + has the ability to read a private file owned by the user being +@@ -1692,9 +1696,9 @@ + >

    Create a lockfile name by appending ".lock" to the name of the + cookie file. The server should attempt to create this file +- using O_CREAT | O_EXCLO_CREAT | O_EXCL. If file creation + fails, the lock fails. Servers should retry for a reasonable + period of time, then they may choose to delete an existing lock +@@ -1702,7 +1706,10 @@ + lock. [1][1] +

    Server Addresses4. Server Addresses

    Server addresses consist of a transport name followed by a colon, and + then an optional, comma-separated list of keys and values in the form key=value. +@@ -1754,18 +1761,9 @@ +

    For example: +-
    unix:path=/tmp/dbus-test
    + Which is the address to a unix socket with the path /tmp/dbus-test. +

    unix:path=/tmp/dbus-test;unix:path=/tmp/dbus-test2
    +

    Message Conventions5. Message Conventions

    This section documents conventions that are not essential to D-BUS + functionality, but should generally be followed in order to simplify +@@ -1818,8 +1807,8 @@ + CLASS="SECT2" + >Message Naming5.1. Message Naming

    Messages are normally named in the form + "org.freedesktop.Peer.Ping", which has three +@@ -1830,9 +1819,9 @@ + CLASS="VARIABLELIST" + >

    Namespace e.g. Namespace e.g. org.freedesktoporg.freedesktop

    Package or object e.g. Package or object e.g. PeerPeer

    Method or operation e.g. Method or operation e.g. PingPing

    A reply to a message conventionally has the same name as the message + being replied to. When following method call conventions (see the Section called Method Call MappingSection 5.2), this convention is mandatory, + because a message with multiple possible replies can't be mapped + to method call semantics without special-case code. +@@ -1889,8 +1876,8 @@ + CLASS="SECT2" + >Method Call Mapping5.2. Method Call Mapping

    Some implementations of D-BUS may present an API that translates object + method calls into D-BUS messages. This document does not specify in +@@ -1901,20 +1888,20 @@ + >

    Remember that D-BUS does not have object references or object instances. + So when one application sends the message +- org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping, it sends it to another + application, not to any kind of sub-portion of that application. + However, a convenience API used within the recipient application may + route all messages that start with +- org.freedesktop.Peerorg.freedesktop.Peer to a particular object instance, +- and may invoke the Ping()Ping() method on said instance in + order to handle the message. This is a convenience API based on + method calls. +@@ -1922,13 +1909,13 @@ + >

    A "method call" consists of a message and, optionally, a reply to that + message. The name of the "method" is the last component of the message, +- for example, org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping would map to +- the method Ping()Ping() on some object. +

    the Section called Header EncodingSection 2.1. Error replies have a + name which reflects the type of error that occurred. Error replies would + generally be mapped to exceptions in a programming language. If an +@@ -1980,8 +1965,8 @@ + CLASS="SECT1" + >Standard Peer-to-Peer Messages6. Standard Peer-to-Peer Messages

    In the following message definitions, "method call notation" is presented + in addition to simply listing the message names and arguments. The special +@@ -1996,38 +1981,29 @@ + CLASS="SECT2" + >6.1. org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping

    + As a method: +-
              void Ping ()
    +         
    +

    On receipt of the message On receipt of the message org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping, + an application should reply with +- org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping. Neither the + message nor its reply have any arguments. + [FIXME the messages here are just made up to illustrate the +@@ -2040,70 +2016,46 @@ + CLASS="SECT2" + >6.2. org.freedesktop.Props.Getorg.freedesktop.Props.Get

    As a method: +-
              ANY_OR_NIL Get (in STRING property_name)
    +         
    + Message arguments: +

    ArgumentTypeDescription
    0STRINGName of the property to get
    Message Bus Specification7. Message Bus Specification

    Message Bus Overview

    7.1. Message Bus Overview

    The message bus accepts connections from one or more applications. + Once connected, applications can send and receive messages from +@@ -2198,18 +2135,18 @@ + CLASS="FIRSTTERM" + >services. A service is simply a name, such as +- com.yoyodyne.Screensavercom.yoyodyne.Screensaver, which can be + owned by one or more of the connected + applications. The message bus itself always owns the special service +- org.freedesktop.DBusorg.freedesktop.DBus. +

    Messages may have a Messages may have a srvcsrvc field (see the Section called Header FieldsSection 2.2). When the message bus +- receives a message, if the srvcsrvc field is absent, the + message is taken to be a standard peer-to-peer message and interpreted + by the message bus itself. For example, sending +- an org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping message with no +- srvcsrvc will cause the message bus itself to reply + to the ping immediately; the message bus would never make + this message visible to other applications. +

    If the If the srvcsrvc field is present, then it indicates a + request for the message bus to route the message. In the usual case, + messages are routed to the owner of the named service. +@@ -2260,9 +2195,9 @@ + >broadcast + by sending them to the special service +- org.freedesktop.DBus.Broadcastorg.freedesktop.DBus.Broadcast. Broadcast messages are + sent to all applications with that match the message. +

    Continuing the Continuing the org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping example, if +- the ping message were sent with a srvcsrvc name of +- com.yoyodyne.Screensavercom.yoyodyne.Screensaver, then the ping would be + forwarded, and the Yoyodyne Corporation screensaver application would be + expected to reply to the ping. If +- org.freedesktop.Peer.Pingorg.freedesktop.Peer.Ping were sent to +- org.freedesktop.DBus.Broadcastorg.freedesktop.DBus.Broadcast, then multiple applications + might receive the ping, and all would normally reply to it. +

    Message Bus Services7.2. Message Bus Services

    A service is a name that identifies a certain application. Each + application connected to the message bus has at least one service name + assigned at connection time and returned in response to the +- org.freedesktop.DBus.Helloorg.freedesktop.DBus.Hello message. + This automatically-assigned service name is called + the application's

    An application can request additional service names to be associated + with it using the +- org.freedesktop.DBus.AcquireServiceorg.freedesktop.DBus.AcquireService + message. [FIXME what service names are allowed; ASCII or unicode; + length limit; etc.] +@@ -2348,9 +2283,9 @@ + > [FIXME this needs more detail, and should move the service-related message + descriptions up into this section perhaps] + Service ownership handling can be specified in the flags part +- of the org.freedesktop.DBus.AcquireServiceorg.freedesktop.DBus.AcquireService + message. If an application specifies the + DBUS_SERVICE_FLAGS_PROHIBIT_REPLACEMENT flag, then all applications +@@ -2375,18 +2310,18 @@ + CLASS="SECT2" + >Message Bus Message Routing7.3. Message Bus Message Routing

    When a message is received by the message bus, the message's +- sndrsndr header field MUST be set to the base service of + the application which sent the message. If the service already has +- a sndrsndr field, the pre-existing field is replaced. + This rule means that a replies are always sent to the base service name, + i.e. to the same application that sent the message being replied to. +@@ -2401,8 +2336,8 @@ + CLASS="SECT2" + >Message Bus Service Activation7.4. Message Bus Service Activation

    the Section called Well-known Message Bus InstancesSection 7.5. +

    ArgumentTypeDescription
    0ANY_OR_NILThe value of the property. The type depends on the property.

    Figure 7. Example service description file

                # Sample service description file
    +@@ -2462,13 +2393,6 @@
    +             Name=org.gnome.ConfigurationDatabase
    +             Exec=/usr/libexec/gconfd-2
    +           

    Figure 7. Example service description file

    +

    The executable launched will have the environment variable +- DBUS_ACTIVATION_ADDRESSDBUS_ACTIVATION_ADDRESS set to the address of the + message bus so it can connect and register the appropriate services. +

    The executable being launched may want to know whether the message bus + activating it is one of the well-known message buses (see the Section called Well-known Message Bus InstancesSection 7.5). To facilitate this, the bus MUST also set +- the DBUS_ACTIVATION_BUS_TYPEDBUS_ACTIVATION_BUS_TYPE environment variable if it is one + of the well-known buses. The currently-defined values for this variable +- are systemsystem for the systemwide message bus, +- and sessionsession for the per-login-session message + bus. The activated executable must still connect to the address given +- in DBUS_ACTIVATION_ADDRESSDBUS_ACTIVATION_ADDRESS, but may assume that the + resulting connection is to the well-known bus. +

    Well-known Message Bus Instances7.5. Well-known Message Bus Instances

    Two standard message bus instances are defined here, along with how + to locate them and where their service files live. +@@ -2542,8 +2464,8 @@ + CLASS="SECT3" + >Login session message bus7.5.1. Login session message bus

    Each time a user logs in, a

    The address of the login session message bus is given +- in the DBUS_SESSION_BUS_ADDRESSDBUS_SESSION_BUS_ADDRESS environment + variable. If that variable is not set, applications may + also try to read the address from the X Window System root +- window property _DBUS_SESSION_BUS_ADDRESS_DBUS_SESSION_BUS_ADDRESS. +- The root window property must have type STRINGSTRING. + The environment variable should have precedence over the + root window property. +@@ -2583,8 +2505,8 @@ + CLASS="SECT3" + >System message bus7.5.2. System message bus

    A computer may have a

    The address of the login session message bus is given +- in the DBUS_SYSTEM_BUS_ADDRESSDBUS_SYSTEM_BUS_ADDRESS environment + variable. If that variable is not set, applications should try + to connect to the well-known address +- unix:path=/var/run/dbus/system_bus_socketunix:path=/var/run/dbus/system_bus_socket. + [2][2] +

    Message Bus Messages7.6. Message Bus Messages

    The special message bus service The special message bus service org.freedesktop.DBusorg.freedesktop.DBus + responds to a number of messages, allowing applications to + interact with the message bus. +@@ -2639,70 +2564,46 @@ + CLASS="SECT3" + >7.6.1. org.freedesktop.DBus.Helloorg.freedesktop.DBus.Hello

    As a method: +-
                STRING Hello ()
    +           
    + Reply arguments: +

    Before an application is able to send messages to other + applications it must send the +- org.freedesktop.DBus.Helloorg.freedesktop.DBus.Hello message to the + message bus service. If an application tries to send a + message to another application, or a message to the message + bus service that isn't the +- org.freedesktop.DBus.Helloorg.freedesktop.DBus.Hello message, it + will be disconnected from the bus. If a client wishes to + disconnect from the bus, it just has to disconnect from the +@@ -2740,70 +2641,46 @@ + CLASS="SECT3" + >7.6.2. org.freedesktop.DBus.ListServicesorg.freedesktop.DBus.ListServices

    As a method: +-

    ArgumentTypeDescription
    0STRINGName of the service assigned to the application
                STRING_ARRAY ListServices ()
    +           
    + Reply arguments: +

    7.6.3. org.freedesktop.DBus.ServiceExistsorg.freedesktop.DBus.ServiceExists

    As a method: +-

    ArgumentTypeDescription
    0STRING_ARRAYArray of strings where each string is the name of a service
                BOOLEAN ServiceExists (in STRING service_name)
    +           
    + Message arguments: +

    ArgumentTypeDescription
    0STRINGName of the service
    7.6.4. org.freedesktop.DBus.AcquireServiceorg.freedesktop.DBus.AcquireService

    As a method: +-

    ArgumentTypeDescription
    0BOOLEANReturn value, true if the service exists
                UINT32 AcquireService (in STRING service_name)
    +           
    + Message arguments: +

    ArgumentTypeDescription
    0STRINGName of the service
    1UINT32Flags

    ArgumentTypeDescription
    0UINT32Return value

    IdentifierValueDescription
    DBUS_SERVICE_FLAGS_PROHIBIT_REPLACEMENT0x1 If the application succeeds in being the owner of the specified service, + then ownership of the service can't be transferred until the service + disconnects. If this flag is not set, then any application trying to become + the owner of the service will succeed and the previous owner will be +- sent a org.freedesktop.DBus.ServiceLostorg.freedesktop.DBus.ServiceLost message. +
    DBUS_SERVICE_FLAGS_REPLACE_EXISTING0x2Try to replace the current owner if there is one. If this flag + is not set the application will only become the owner of the service if + there is no current owner.
    7.6.5. org.freedesktop.DBus.ServiceAcquiredorg.freedesktop.DBus.ServiceAcquired

    As a method: +-

    IdentifierValueDescription
    DBUS_SERVICE_REPLY_PRIMARY_OWNER0x1The application is now the primary owner of the service.
    DBUS_SERVICE_REPLY_IN_QUEUE0x2The service already has an owner which do not want to give up ownership and therefore the application has been put in a queue.
    DBUS_SERVICE_REPLY_SERVICE_EXISTS0x4The service does already have a primary owner, and DBUS_SERVICE_FLAG_REPLACE_EXISTING was not specified when trying to acquire the service.
    DBUS_SERVICE_REPLY_ALREADY_OWNER0x8The application trying to request ownership of the service is already the owner of it.
                ServiceAcquired (in STRING service_name)
    +           
    + Message arguments: +

    7.6.6. org.freedesktop.DBus.ServiceLostorg.freedesktop.DBus.ServiceLost

    As a method: +-

    ArgumentTypeDescription
    0STRINGName of the service
    1UINT32Flags
                ServiceLost (in STRING service_name)
    +           
    + Message arguments: +

    7.6.7. org.freedesktop.DBus.ServiceCreatedorg.freedesktop.DBus.ServiceCreated

    As a method: +-

    ArgumentTypeDescription
    0STRINGName of the service
    1UINT32Flags
                ServiceCreated (in STRING service_name)
    +           
    + Message arguments: +

    7.6.8. org.freedesktop.DBus.ServiceDeletedorg.freedesktop.DBus.ServiceDeleted

    As a method: +-

    ArgumentTypeDescription
    0STRINGName of the service
    1UINT32Flags
                ServiceDeleted (in STRING service_name)
    +           
    + Message arguments: +

    7.6.9. org.freedesktop.DBus.ActivateServiceorg.freedesktop.DBus.ActivateService

    As a method: +-

    ArgumentTypeDescription
    0STRINGName of the service
    1UINT32Flags
                UINT32 ActivateService (in STRING service_name, in UINT32 flags)
    +           
    + Message arguments: +

    ArgumentTypeDescription
    0STRINGName of the service to activate
    1UINT32Flags (currently not used)
    ArgumentTypeDescription
    0UINT32Result code; DBUS_ACTIVATION_REPLY_ACTIVATED if + the service was activated successfully or + DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE if the service is +@@ -3818,9 +3392,7 @@ + >

    Tries to launch the executable associated with a service. For more information, see the Section called Message Bus Service ActivationSection 7.4. + + [FIXME need semantics in much more detail here; for example, +@@ -3834,26 +3406,17 @@ + CLASS="SECT3" + >7.6.10. org.freedesktop.DBus.Error.NoMemoryorg.freedesktop.DBus.Error.NoMemory

    As a method: +-
                void NoMemory ()
    +           
    +

    7.6.11. org.freedesktop.DBus.Error.ServiceDoesNotExistorg.freedesktop.DBus.Error.ServiceDoesNotExist

    As a method: +-
                void ServiceDoesNotExist (in STRING error)
    +           
    +

    A message sent to the special A message sent to the special org.freedesktop.DBus.Broadcastorg.freedesktop.DBus.Broadcast + service; the message bus will forward the broadcast message + to all applications that have expressed interest in it. +@@ -4044,9 +3598,9 @@ + >

    A service is simply a named list of applications. For example, the +- hypothetical com.yoyodyne.Screensavercom.yoyodyne.Screensaver service might + accept messages that affect a screensaver from Yoyodyne Corporation. + An application is said to [1][1]

    Lockfiles are used instead of real file +- locking fcntl()fcntl() because real locking + implementations are still flaky on network + filesystems.

    [2][2]

    The D-BUS reference implementation actually honors the +- $(localstatedir)$(localstatedir) configure option + for this address, on both client and server side. +

    ++ + D-BUS Test PlanD-BUS Test PlanD-BUS Test Plan

    Anders Carlsson

    CodeFactory AB



    Introduction1. Introduction

    This document tries to explain the details of the test plan for D-BUS +

    The importance of testing1.1. The importance of testing

    As with any big library or program, testing is important. It + can help find bugs and regressions and make the code better +@@ -114,9 +171,9 @@ +

    D-BUS can be built with support for testing by passing +- --enable-tests--enable-tests. to the configure script. It + is recommended that production systems build without testing + since that reduces the D-BUS client library size. +@@ -129,8 +186,8 @@ + CLASS="SECT1" + >Testing the D-BUS client library2. Testing the D-BUS client library

    The tests for the client library consist of the dbus-test + program which is a unit test for all aspects of the client +@@ -143,8 +200,8 @@ + CLASS="SECT2" + >Data Structures2.1. Data Structures

    The D-BUS client library consists of some data structures that + are used internally; a linked list class, a hashtable class and +@@ -157,17 +214,20 @@ + CLASS="SECT2" + >Message loader2.2. Message loader

    The message loader is the part of D-BUS that takes messages in + raw character form and parses them, turning them into DBusMessages. +

    This is one of the parts of D-BUS that +- must be absolutely bug-free and + robust. The message loader should be able to handle invalid + and incomplete messages without crashing. Not doing so is a +@@ -185,12 +245,10 @@ + >

    Figure 1. Example of a message in string form

              # Standard org.freedesktop.DBus.Hello message
    +@@ -207,13 +265,6 @@
    +           START_LENGTH Body
    +           END_LENGTH Body
    +         

    Figure 1. Example of a message in string form

    The file format of messages in string form is documented in +@@ -228,9 +279,9 @@ +

    There is also a test program called +- break-loaderbreak-loader that loads a message in + string-form into raw character form using the message + builder. It then randomly changes the message, it can for +@@ -246,8 +297,8 @@ + CLASS="SECT2" + >Authentication2.3. Authentication

    For testing authentication, there is a testing feature that + can read authentication sequences from a file and play them +@@ -259,12 +310,10 @@ + >

    Figure 2. Example of an authentication script

              ## this tests a successful auth of type EXTERNAL
    +@@ -276,13 +325,6 @@
    +           SEND 'BEGIN'
    +           EXPECT_STATE AUTHENTICATED
    +         

    Figure 2. Example of an authentication script

    Testing the D-BUS bus daemon3. Testing the D-BUS bus daemon

    Since the D-BUS bus daemon is using the D-BUS client library it + will benefit from all tests done on the client library, but +@@ -307,12 +349,15 @@ + CLASS="SECT2" + >The debug transport3.1. The debug transport

    In D-BUS, a In D-BUS, a transport is a class that + handles sending and receiving raw data over a certain + medium. The transport that is used most in D-BUS is the UNIX +@@ -333,8 +378,8 @@ + CLASS="SECT2" + >The bus-test program3.2. The bus-test program

    The bus-test program is a program that is used to test various + parts of the D-BUS bus daemon; robustness and that it conforms +@@ -360,16 +405,16 @@ + CLASS="SECT1" + >Other tests4. Other tests

    Out-Of-Memory robustness

    4.1. Out-Of-Memory robustness

    Since D-BUS should be able to be used in embedded devices, and + also as a system service, it should be able to cope with +@@ -381,14 +426,14 @@ +

    To test this, two environment variables +- exist. DBUS_MALLOC_FAIL_NTHDBUS_MALLOC_FAIL_NTH will make every + nth call to dbus_malloc return NULL, and +- DBUS_MALLOC_FAIL_GREATER_THANDBUS_MALLOC_FAIL_GREATER_THAN will make any + dbus_malloc call with a request for more than the specified + number of bytes fail. +@@ -400,8 +445,8 @@ + CLASS="SECT2" + >Memory leaks and code robustness4.2. Memory leaks and code robustness

    Naturally there are some things that tests can't be written + for, for example things like memory leaks and out-of-bounds +diff -urN dbus-0.11.orig/glib/Makefile.in dbus-0.11/glib/Makefile.in +--- dbus-0.11.orig/glib/Makefile.in 2003-05-15 12:50:58.000000000 -0700 ++++ dbus-0.11/glib/Makefile.in 2003-05-28 13:34:14.000000000 -0700 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.7.3 from Makefile.am. ++# Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +@@ -236,6 +236,7 @@ + + @HAVE_GLIB_THREADS_TRUE@test_profile_LDADD = $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la + subdir = glib ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +@@ -397,7 +398,7 @@ + .c.o: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -408,7 +409,7 @@ + .c.obj: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -419,7 +420,7 @@ + .c.lo: + @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@@ -546,7 +547,6 @@ + + installdirs: + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(dbusincludedir) +- + install: install-am + install-exec: install-exec-am + install-data: install-data-am +diff -urN dbus-0.11.orig/glib/test-profile.c dbus-0.11/glib/test-profile.c +--- dbus-0.11.orig/glib/test-profile.c 2003-05-11 19:44:45.000000000 -0700 ++++ dbus-0.11/glib/test-profile.c 2003-05-17 19:16:22.000000000 -0700 +@@ -27,8 +27,8 @@ + #include + + #define N_CLIENT_THREADS 1 +-#define N_ITERATIONS 100 +-#define PAYLOAD_SIZE 1000 ++#define N_ITERATIONS 1000 ++#define PAYLOAD_SIZE 30 + #define ECHO_MESSAGE "org.freedesktop.DBus.Test.EchoProfile" + static const char *address; + static unsigned char *payload; +diff -urN dbus-0.11.orig/install-sh dbus-0.11/install-sh +--- dbus-0.11.orig/install-sh 2003-01-27 03:03:04.000000000 -0800 ++++ dbus-0.11/install-sh 2003-05-19 11:10:58.000000000 -0700 +@@ -1,19 +1,37 @@ + #!/bin/sh + # + # install - install a program, script, or datafile +-# This comes from X11R5 (mit/util/scripts/install.sh). + # +-# Copyright 1991 by the Massachusetts Institute of Technology ++# This originates from X11R5 (mit/util/scripts/install.sh), which was ++# later released in X11R6 (xc/config/util/install.sh) with the ++# following copyright and license. + # +-# Permission to use, copy, modify, distribute, and sell this software and its +-# documentation for any purpose is hereby granted without fee, provided that +-# the above copyright notice appear in all copies and that both that +-# copyright notice and this permission notice appear in supporting +-# documentation, and that the name of M.I.T. not be used in advertising or +-# publicity pertaining to distribution of the software without specific, +-# written prior permission. M.I.T. makes no representations about the +-# suitability of this software for any purpose. It is provided "as is" +-# without express or implied warranty. ++# Copyright (C) 1994 X Consortium ++# ++# Permission is hereby granted, free of charge, to any person obtaining a copy ++# of this software and associated documentation files (the "Software"), to ++# deal in the Software without restriction, including without limitation the ++# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or ++# sell copies of the Software, and to permit persons to whom the Software is ++# furnished to do so, subject to the following conditions: ++# ++# The above copyright notice and this permission notice shall be included in ++# all copies or substantial portions of the Software. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- ++# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++# ++# Except as contained in this notice, the name of the X Consortium shall not ++# be used in advertising or otherwise to promote the sale, use or other deal- ++# ings in this Software without prior written authorization from the X Consor- ++# tium. ++# ++# ++# FSF changes to this file are in the public domain. + # + # Calling this script install-sh is preferred over install.sh, to prevent + # `make' implicit rules from creating a file called install from it +@@ -56,7 +74,7 @@ + + while [ x"$1" != x ]; do + case $1 in +- -c) instcmd="$cpprog" ++ -c) instcmd=$cpprog + shift + continue;; + +@@ -79,7 +97,7 @@ + shift + continue;; + +- -s) stripcmd="$stripprog" ++ -s) stripcmd=$stripprog + shift + continue;; + +@@ -106,7 +124,7 @@ + + if [ x"$src" = x ] + then +- echo "install: no input file specified" ++ echo "$0: no input file specified" >&2 + exit 1 + else + : +@@ -115,8 +133,8 @@ + if [ x"$dir_arg" != x ]; then + dst=$src + src="" +- +- if [ -d $dst ]; then ++ ++ if [ -d "$dst" ]; then + instcmd=: + chmodcmd="" + else +@@ -125,20 +143,20 @@ + else + + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command +-# might cause directories to be created, which would be especially bad ++# might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + + if [ -f "$src" ] || [ -d "$src" ] + then + : + else +- echo "install: $src does not exist" ++ echo "$0: $src does not exist" >&2 + exit 1 + fi +- ++ + if [ x"$dst" = x ] + then +- echo "install: no destination specified" ++ echo "$0: no destination specified" >&2 + exit 1 + else + : +@@ -147,16 +165,16 @@ + # If destination is a directory, append the input filename; if your system + # does not like double slashes in filenames, you may need to add some logic + +- if [ -d $dst ] ++ if [ -d "$dst" ] + then +- dst="$dst"/`basename $src` ++ dst=$dst/`basename "$src"` + else + : + fi + fi + + ## this sed command emulates the dirname command +-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` ++dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + # this part is taken from Noah Friedman's mkinstalldirs script +@@ -165,69 +183,73 @@ + if [ ! -d "$dstdir" ]; then + defaultIFS=' + ' +-IFS="${IFS-${defaultIFS}}" ++IFS="${IFS-$defaultIFS}" + +-oIFS="${IFS}" ++oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' +-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +-IFS="${oIFS}" ++set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` ++IFS=$oIFS + + pathcomp='' + + while [ $# -ne 0 ] ; do +- pathcomp="${pathcomp}${1}" ++ pathcomp=$pathcomp$1 + shift + +- if [ ! -d "${pathcomp}" ] ; ++ if [ ! -d "$pathcomp" ] ; + then +- $mkdirprog "${pathcomp}" ++ $mkdirprog "$pathcomp" + else + : + fi + +- pathcomp="${pathcomp}/" ++ pathcomp=$pathcomp/ + done + fi + + if [ x"$dir_arg" != x ] + then +- $doit $instcmd $dst && ++ $doit $instcmd "$dst" && + +- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && +- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && +- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && +- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi ++ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && ++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && ++ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && ++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi + else + + # If we're going to rename the final executable, determine the name now. + +- if [ x"$transformarg" = x ] ++ if [ x"$transformarg" = x ] + then +- dstfile=`basename $dst` ++ dstfile=`basename "$dst"` + else +- dstfile=`basename $dst $transformbasename | ++ dstfile=`basename "$dst" $transformbasename | + sed $transformarg`$transformbasename + fi + + # don't allow the sed command to completely eliminate the filename + +- if [ x"$dstfile" = x ] ++ if [ x"$dstfile" = x ] + then +- dstfile=`basename $dst` ++ dstfile=`basename "$dst"` + else + : + fi + +-# Make a temp file name in the proper directory. ++# Make a couple of temp file names in the proper directory. + + dsttmp=$dstdir/#inst.$$# ++ rmtmp=$dstdir/#rm.$$# + +-# Move or copy the file name to the temp name ++# Trap to clean up temp files at exit. ++ ++ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 ++ trap '(exit $?); exit' 1 2 13 15 + +- $doit $instcmd $src $dsttmp && ++# Move or copy the file name to the temp name + +- trap "rm -f ${dsttmp}" 0 && ++ $doit $instcmd "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits + +@@ -235,17 +257,38 @@ + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. + +- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && +- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && +- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && +- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && ++ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && ++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && ++ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && ++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && ++ ++# Now remove or move aside any old file at destination location. We try this ++# two ways since rm can't unlink itself on some systems and the destination ++# file might be busy for other reasons. In this case, the final cleanup ++# might fail but the new file should still install successfully. ++ ++{ ++ if [ -f "$dstdir/$dstfile" ] ++ then ++ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || ++ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || ++ { ++ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 ++ (exit 1); exit ++ } ++ else ++ : ++ fi ++} && + + # Now rename the file to the real destination. + +- $doit $rmcmd -f $dstdir/$dstfile && +- $doit $mvcmd $dsttmp $dstdir/$dstfile ++ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + + fi && + ++# The final little trick to "correctly" pass the exit status to the exit trap. + +-exit 0 ++{ ++ (exit 0); exit ++} +diff -urN dbus-0.11.orig/ltmain.sh dbus-0.11/ltmain.sh +--- dbus-0.11.orig/ltmain.sh 2003-05-15 12:50:52.000000000 -0700 ++++ dbus-0.11/ltmain.sh 2003-05-28 13:34:06.000000000 -0700 +@@ -226,7 +226,7 @@ + # Infer the operation mode. + if test -z "$mode"; then + case $nonopt in +- *cc | *++ | gcc* | *-gcc* | xlc*) ++ *cc | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do +@@ -899,7 +899,7 @@ + prev= + continue + ;; +- inst_prefix) ++ inst_prefix) + inst_prefix_dir="$arg" + prev= + continue +@@ -1006,9 +1006,9 @@ + ;; + + -inst-prefix-dir) +- prev=inst_prefix +- continue +- ;; ++ prev=inst_prefix ++ continue ++ ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L +@@ -1857,6 +1857,14 @@ + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" ++ # Try looking first in the location we're being installed to. ++ if test -n "$inst_prefix_dir"; then ++ case "$libdir" in ++ [\/]*) ++ add_dir="-L$inst_prefix_dir$libdir $add_dir" ++ ;; ++ esac ++ fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" +@@ -1904,16 +1912,7 @@ + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then +- # Try looking first in the location we're being installed to. +- add_dir= +- if test -n "$inst_prefix_dir"; then +- case "$libdir" in +- [\\/]*) +- add_dir="-L$inst_prefix_dir$libdir" +- ;; +- esac +- fi +- add_dir="$add_dir -L$libdir" ++ add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in +@@ -1923,16 +1922,15 @@ + add="-l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. ++ add_dir="-L$libdir" + # Try looking first in the location we're being installed to. +- add_dir= + if test -n "$inst_prefix_dir"; then + case "$libdir" in +- [\\/]*) +- add_dir="-L$inst_prefix_dir$libdir" ++ [\/]*) ++ add_dir="-L$inst_prefix_dir$libdir $add_dir" + ;; + esac + fi +- add_dir="$add_dir -L$libdir" + add="-l$name" + fi + +@@ -4258,23 +4256,23 @@ + dir="$dir$objdir" + + if test -n "$relink_command"; then +- # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"` +- +- # Don't allow the user to place us outside of our expected +- # location b/c this prevents finding dependent libraries that +- # are installed to the same prefix. +- if test "$inst_prefix_dir" = "$destdir"; then +- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 +- exit 1 +- fi +- +- if test -n "$inst_prefix_dir"; then +- # Stick the inst_prefix_dir data into the link command. +- relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` +- else +- relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"` +- fi ++ # Determine the prefix the user has applied to our future dir. ++ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"` ++ ++ # Don't allow the user to place us outside of our expected ++ # location b/c this prevents finding dependent libraries that ++ # are installed to the same prefix. ++ if test "$inst_prefix_dir" = "$destdir"; then ++ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 ++ exit 1 ++ fi ++ ++ if test -n "$inst_prefix_dir"; then ++ # Stick the inst_prefix_dir data into the link command. ++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` ++ else ++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"` ++ fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" +@@ -4444,11 +4442,7 @@ + if test "$finalize" = yes && test -z "$run"; then + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" +- tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null` +- if test $? = 0 ; then : +- else +- tmpdir="$tmpdir/libtool-$$" +- fi ++ tmpdir="$tmpdir/libtool-$$" + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : + else + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 +diff -urN dbus-0.11.orig/mkinstalldirs dbus-0.11/mkinstalldirs +--- dbus-0.11.orig/mkinstalldirs 2003-01-27 03:03:04.000000000 -0800 ++++ dbus-0.11/mkinstalldirs 2003-05-19 11:10:58.000000000 -0700 +@@ -12,18 +12,29 @@ + + # process command line arguments + while test $# -gt 0 ; do +- case "${1}" in +- -h | --help | --h* ) # -h for help +- echo "${usage}" 1>&2; exit 0 ;; +- -m ) # -m PERM arg +- shift +- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } +- dirmode="${1}" +- shift ;; +- -- ) shift; break ;; # stop option processing +- -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option +- * ) break ;; # first non-opt arg +- esac ++ case $1 in ++ -h | --help | --h*) # -h for help ++ echo "$usage" 1>&2 ++ exit 0 ++ ;; ++ -m) # -m PERM arg ++ shift ++ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } ++ dirmode=$1 ++ shift ++ ;; ++ --) # stop option processing ++ shift ++ break ++ ;; ++ -*) # unknown option ++ echo "$usage" 1>&2 ++ exit 1 ++ ;; ++ *) # first non-opt arg ++ break ++ ;; ++ esac + done + + for file +@@ -36,64 +47,65 @@ + done + + case $# in +-0) exit 0 ;; ++ 0) exit 0 ;; + esac + + case $dirmode in +-'') +- if mkdir -p -- . 2>/dev/null; then +- echo "mkdir -p -- $*" +- exec mkdir -p -- "$@" +- fi ;; +-*) +- if mkdir -m "$dirmode" -p -- . 2>/dev/null; then +- echo "mkdir -m $dirmode -p -- $*" +- exec mkdir -m "$dirmode" -p -- "$@" +- fi ;; ++ '') ++ if mkdir -p -- . 2>/dev/null; then ++ echo "mkdir -p -- $*" ++ exec mkdir -p -- "$@" ++ fi ++ ;; ++ *) ++ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then ++ echo "mkdir -m $dirmode -p -- $*" ++ exec mkdir -m "$dirmode" -p -- "$@" ++ fi ++ ;; + esac + + for file + do +- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` +- shift ++ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` ++ shift + +- pathcomp= +- for d +- do +- pathcomp="$pathcomp$d" +- case "$pathcomp" in +- -* ) pathcomp=./$pathcomp ;; +- esac +- +- if test ! -d "$pathcomp"; then +- echo "mkdir $pathcomp" +- +- mkdir "$pathcomp" || lasterr=$? +- +- if test ! -d "$pathcomp"; then +- errstatus=$lasterr +- else +- if test ! -z "$dirmode"; then +- echo "chmod $dirmode $pathcomp" +- +- lasterr="" +- chmod "$dirmode" "$pathcomp" || lasterr=$? +- +- if test ! -z "$lasterr"; then +- errstatus=$lasterr +- fi +- fi +- fi +- fi ++ pathcomp= ++ for d ++ do ++ pathcomp="$pathcomp$d" ++ case $pathcomp in ++ -*) pathcomp=./$pathcomp ;; ++ esac ++ ++ if test ! -d "$pathcomp"; then ++ echo "mkdir $pathcomp" ++ ++ mkdir "$pathcomp" || lasterr=$? ++ ++ if test ! -d "$pathcomp"; then ++ errstatus=$lasterr ++ else ++ if test ! -z "$dirmode"; then ++ echo "chmod $dirmode $pathcomp" ++ lasterr="" ++ chmod "$dirmode" "$pathcomp" || lasterr=$? ++ ++ if test ! -z "$lasterr"; then ++ errstatus=$lasterr ++ fi ++ fi ++ fi ++ fi + +- pathcomp="$pathcomp/" +- done ++ pathcomp="$pathcomp/" ++ done + done + + exit $errstatus + + # Local Variables: + # mode: shell-script +-# sh-indentation: 3 ++# sh-indentation: 2 + # End: + # mkinstalldirs ends here +diff -urN dbus-0.11.orig/qt/Makefile.in dbus-0.11/qt/Makefile.in +--- dbus-0.11.orig/qt/Makefile.in 2003-05-15 12:50:58.000000000 -0700 ++++ dbus-0.11/qt/Makefile.in 2003-05-28 13:34:14.000000000 -0700 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.7.3 from Makefile.am. ++# Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +@@ -202,6 +202,7 @@ + libdbus_qt_1_la_LIBADD = $(DBUS_QT_LIBS) $(top_builddir)/dbus/libdbus-1.la + libdbus_qt_1_la_LDFLAGS = -version-info 1:0 + subdir = qt ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +@@ -283,7 +284,7 @@ + .cpp.o: + @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCXX_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -294,7 +295,7 @@ + .cpp.obj: + @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +-@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCXX_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -305,7 +306,7 @@ + .cpp.lo: + @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ + @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCXX_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@@ -432,7 +433,6 @@ + + installdirs: + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(dbusincludedir) +- + install: install-am + install-exec: install-exec-am + install-data: install-data-am +diff -urN dbus-0.11.orig/test/Makefile.in dbus-0.11/test/Makefile.in +--- dbus-0.11.orig/test/Makefile.in 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/Makefile.in 2003-05-28 13:54:06.000000000 -0700 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.7.3 from Makefile.am. ++# Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +@@ -255,6 +255,7 @@ + + FIND_TESTS = find -name "*.message" -o -name "*.message-raw" -o -name "*.auth-script" -o -name "*.sha1" -o -name "*.txt" -o -name "*.conf" -o -name "*.service" + subdir = test ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +@@ -403,7 +404,7 @@ + .c.o: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -414,7 +415,7 @@ + .c.obj: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -425,7 +426,7 @@ + .c.lo: + @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@@ -536,7 +537,6 @@ + all-am: Makefile $(PROGRAMS) all-local + + installdirs: +- + install: install-am + install-exec: install-exec-am + install-data: install-data-am +diff -urN dbus-0.11.orig/test/data/invalid-messages/no-name.message dbus-0.11/test/data/invalid-messages/no-name.message +--- dbus-0.11.orig/test/data/invalid-messages/no-name.message 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/data/invalid-messages/no-name.message 1969-12-31 16:00:00.000000000 -0800 +@@ -1,15 +0,0 @@ +-## like simplest-manual.message, but doesn't contain a valid name field +- +-LITTLE_ENDIAN +-BYTE 'l' +-BYTE 0 +-BYTE 0 +-BYTE 0 +-LENGTH Header +-LENGTH Body +-## client serial +-INT32 7 +-ALIGN 8 +-END_LENGTH Header +-START_LENGTH Body +-END_LENGTH Body +diff -urN dbus-0.11.orig/test/data/valid-config-files/debug-allow-all-sha1.conf dbus-0.11/test/data/valid-config-files/debug-allow-all-sha1.conf +--- dbus-0.11.orig/test/data/valid-config-files/debug-allow-all-sha1.conf 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/data/valid-config-files/debug-allow-all-sha1.conf 2003-05-28 13:54:06.000000000 -0700 +@@ -5,7 +5,7 @@ + + debug-pipe:name=test-server + unix:tmpdir=/tmp +- /cvs/fd-cvs/dbus/test/data/valid-service-files ++ /src/cvs/wildstar.community.redhat.com/dbus/test/data/valid-service-files + DBUS_COOKIE_SHA1 + + +diff -urN dbus-0.11.orig/test/data/valid-config-files/debug-allow-all.conf dbus-0.11/test/data/valid-config-files/debug-allow-all.conf +--- dbus-0.11.orig/test/data/valid-config-files/debug-allow-all.conf 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/data/valid-config-files/debug-allow-all.conf 2003-05-28 13:54:06.000000000 -0700 +@@ -5,7 +5,7 @@ + + debug-pipe:name=test-server + unix:tmpdir=/tmp +- /cvs/fd-cvs/dbus/test/data/valid-service-files ++ /src/cvs/wildstar.community.redhat.com/dbus/test/data/valid-service-files + + + +diff -urN dbus-0.11.orig/test/data/valid-config-files/session.conf dbus-0.11/test/data/valid-config-files/session.conf +--- dbus-0.11.orig/test/data/valid-config-files/session.conf 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/data/valid-config-files/session.conf 2003-05-28 13:54:06.000000000 -0700 +@@ -10,6 +10,8 @@ + + unix:tmpdir=/tmp + ++ /build/dbus/lib/dbus-1.0/services ++ + + + +diff -urN dbus-0.11.orig/test/data/valid-config-files/system.conf dbus-0.11/test/data/valid-config-files/system.conf +--- dbus-0.11.orig/test/data/valid-config-files/system.conf 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/data/valid-config-files/system.conf 2003-05-28 13:54:06.000000000 -0700 +@@ -21,13 +21,13 @@ + + + +- /unst/var/run/messagebus.pid ++ /build/dbus/var/run/dbus/pid + + + EXTERNAL + + +- unix:path=/unst/var/run/dbus/system_bus_socket ++ unix:path=/build/dbus/var/run/dbus/system_bus_socket + + + +@@ -37,6 +37,8 @@ + + + ++ + + + +diff -urN dbus-0.11.orig/test/data/valid-service-files/debug-echo.service dbus-0.11/test/data/valid-service-files/debug-echo.service +--- dbus-0.11.orig/test/data/valid-service-files/debug-echo.service 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/data/valid-service-files/debug-echo.service 2003-05-28 13:54:06.000000000 -0700 +@@ -1,3 +1,3 @@ + [D-BUS Service] + Name=org.freedesktop.DBus.TestSuiteEchoService +-Exec=/cvs/fd-cvs/dbus/test/test-service ++Exec=/src/cvs/wildstar.community.redhat.com/dbus/test/test-service +diff -urN dbus-0.11.orig/test/data/valid-service-files/debug-segfault.service dbus-0.11/test/data/valid-service-files/debug-segfault.service +--- dbus-0.11.orig/test/data/valid-service-files/debug-segfault.service 2003-05-15 12:57:07.000000000 -0700 ++++ dbus-0.11/test/data/valid-service-files/debug-segfault.service 2003-05-28 13:54:06.000000000 -0700 +@@ -1,4 +1,4 @@ + [D-BUS Service] + Name=org.freedesktop.DBus.TestSuiteSegfaultService +-Exec=/cvs/fd-cvs/dbus/test/test-segfault ++Exec=/src/cvs/wildstar.community.redhat.com/dbus/test/test-segfault + +diff -urN dbus-0.11.orig/tools/Makefile.am dbus-0.11/tools/Makefile.am +--- dbus-0.11.orig/tools/Makefile.am 2003-05-05 12:10:38.000000000 -0700 ++++ dbus-0.11/tools/Makefile.am 2003-05-16 13:25:47.000000000 -0700 +@@ -9,10 +9,14 @@ + bin_PROGRAMS=dbus-send $(GLIB_TOOLS) dbus-launch + + dbus_send_SOURCES= \ ++ dbus-print-message.c \ ++ dbus-print-message.h \ + dbus-send.c + + dbus_monitor_SOURCES= \ +- dbus-monitor.c ++ dbus-monitor.c \ ++ dbus-print-message.c \ ++ dbus-print-message.h + + dbus_launch_SOURCES= \ + dbus-launch.c +diff -urN dbus-0.11.orig/tools/Makefile.in dbus-0.11/tools/Makefile.in +--- dbus-0.11.orig/tools/Makefile.in 2003-05-15 12:50:58.000000000 -0700 ++++ dbus-0.11/tools/Makefile.in 2003-05-28 13:34:14.000000000 -0700 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.7.3 from Makefile.am. ++# Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +@@ -193,11 +193,15 @@ + bin_PROGRAMS = dbus-send $(GLIB_TOOLS) dbus-launch + + dbus_send_SOURCES = \ ++ dbus-print-message.c \ ++ dbus-print-message.h \ + dbus-send.c + + + dbus_monitor_SOURCES = \ +- dbus-monitor.c ++ dbus-monitor.c \ ++ dbus-print-message.c \ ++ dbus-print-message.h + + + dbus_launch_SOURCES = \ +@@ -211,6 +215,7 @@ + man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 + EXTRA_DIST = $(man_MANS) + subdir = tools ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +@@ -223,11 +228,12 @@ + dbus_launch_OBJECTS = $(am_dbus_launch_OBJECTS) + dbus_launch_DEPENDENCIES = + dbus_launch_LDFLAGS = +-am_dbus_monitor_OBJECTS = dbus-monitor.$(OBJEXT) ++am_dbus_monitor_OBJECTS = dbus-monitor.$(OBJEXT) \ ++ dbus-print-message.$(OBJEXT) + dbus_monitor_OBJECTS = $(am_dbus_monitor_OBJECTS) + dbus_monitor_DEPENDENCIES = $(top_builddir)/glib/libdbus-glib-1.la + dbus_monitor_LDFLAGS = +-am_dbus_send_OBJECTS = dbus-send.$(OBJEXT) ++am_dbus_send_OBJECTS = dbus-print-message.$(OBJEXT) dbus-send.$(OBJEXT) + dbus_send_OBJECTS = $(am_dbus_send_OBJECTS) + dbus_send_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la + dbus_send_LDFLAGS = +@@ -237,6 +243,7 @@ + am__depfiles_maybe = depfiles + @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dbus-launch.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/dbus-monitor.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/dbus-print-message.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/dbus-send.Po + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@@ -309,6 +316,7 @@ + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-launch.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-monitor.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-print-message.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-send.Po@am__quote@ + + distclean-depend: +@@ -317,7 +325,7 @@ + .c.o: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -328,7 +336,7 @@ + .c.obj: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@@ -339,7 +347,7 @@ + .c.lo: + @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ + @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + @am__fastdepCC_TRUE@ fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@@ -495,7 +503,6 @@ + + installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) +- + install: install-am + install-exec: install-exec-am + install-data: install-data-am +diff -urN dbus-0.11.orig/tools/dbus-launch.1 dbus-0.11/tools/dbus-launch.1 +--- dbus-0.11.orig/tools/dbus-launch.1 2003-05-04 01:54:24.000000000 -0700 ++++ dbus-0.11/tools/dbus-launch.1 2003-05-17 19:14:18.000000000 -0700 +@@ -7,7 +7,7 @@ + dbus-launch \- Utility to start a message bus from a shell script + .SH SYNOPSIS + .PP +-.B dbus-launch [\-\-version] [\-\-exit-with-session] ++.B dbus-launch [\-\-version] [\-\-sh-syntax] [\-\-csh-syntax] [\-\-auto-syntax] [\-\-exit-with-session] [PROGRAM] [ARGS...] + + .SH DESCRIPTION + +@@ -15,8 +15,25 @@ + from a shell script. It would normally be called from a user's login + scripts. Unlike the daemon itself, \fIdbus-launch\fP exits, so + backticks or the $() construct can be used to read information from +-\fIdbus-launch\fP. \fIdbus-launch\fP prints information about the +-launched daemon in KEY=VALUE format. ++\fIdbus-launch\fP. ++ ++With no arguments, \fIdbus-launch\fP will simply print the values of ++DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID. ++ ++You may specify a program to be run; in this case, \fIdbus-launch\fP ++will then set the appropriate environment variables and execute the ++specified program, with the specified arguments. See below for ++examples. ++ ++Finally, you may use the \-\-auto-syntax command to cause ++\fIdbus-launch\fP to emit shell code to set up the environment. This ++is useful in shell scripts. With this option, \fIdbus-launch\fP looks ++at the value of the SHELL environment variable to determine which ++shell syntax should be used. If SHELL ends in "csh", then ++csh-compatible code is emitted; otherwise Bourne shell code is ++emitted. Instead of passing \-\-auto-syntax, you may explicity ++specify a particular one by using \-\-sh-syntax for Bourne syntax, or ++\-\-csh-syntax for csh syntax. + + .PP + See http://www.freedesktop.org/software/dbus/ for more information +@@ -30,17 +47,34 @@ + ## test for an existing bus daemon, just to be safe + if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + ## if not found, launch a new one +- eval `dbus-launch --exit-with-session` ++ eval `dbus-launch --auto-syntax --exit-with-session` + echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" +- export DBUS_SESSION_BUS_ADDRESS + fi + + .fi + You might run something like that in your login scripts. + ++.PP ++Another way to use \fIdbus-launch\fP is to run your main session ++program, like so: ++.nf ++ ++dbus-launch gnome-session ++ ++.fi ++The above would likely be appropriate for ~/.xsession. ++ + .SH OPTIONS + The following options are supported: + .TP ++.I "--auto-syntax" ++Attempt to detect the shell in use, and emit compatible code. ++ ++.TP ++.I "--csh-syntax" ++Emit csh compatible code. ++ ++.TP + .I "--exit-with-session" + If this option is provided, a persistent "babysitter" process will be + created that watches stdin for HUP and tries to connect to the X +@@ -48,6 +82,10 @@ + it kills the message bus daemon. + + .TP ++.I "--sh-syntax" ++Emit Bourne-shell compatible code. ++ ++.TP + .I "--version" + Print the version of dbus-launch + +diff -urN dbus-0.11.orig/tools/dbus-launch.c dbus-0.11/tools/dbus-launch.c +--- dbus-0.11.orig/tools/dbus-launch.c 2003-05-04 01:54:24.000000000 -0700 ++++ dbus-0.11/tools/dbus-launch.c 2003-05-17 19:38:33.000000000 -0700 +@@ -77,10 +77,10 @@ + } + + static void +-usage (void) ++usage (int ecode) + { +- fprintf (stderr, "dbus-launch [--version] [--exit-with-session]\n"); +- exit (1); ++ fprintf (stderr, "dbus-launch [--version] [--help] [--sh-syntax] [--csh-syntax] [--auto-syntax] [--exit-with-session]\n"); ++ exit (ecode); + } + + static void +@@ -94,6 +94,26 @@ + exit (0); + } + ++static char * ++xstrdup (const char *str) ++{ ++ int len; ++ char *copy; ++ ++ if (str == NULL) ++ return NULL; ++ ++ len = strlen (str); ++ ++ copy = malloc (len + 1); ++ if (copy == NULL) ++ return NULL; ++ ++ memcpy (copy, str, len + 1); ++ ++ return copy; ++} ++ + typedef enum + { + READ_STATUS_OK, /**< Read succeeded */ +@@ -277,6 +297,7 @@ + { + verbose ("X IO error\n"); + kill_bus_and_exit (); ++ return 0; + } + #endif + +@@ -543,7 +564,13 @@ + main (int argc, char **argv) + { + const char *prev_arg; ++ const char *shname; ++ const char *runprog = NULL; ++ int remaining_args = 0; + int exit_with_session; ++ int c_shell_syntax = FALSE; ++ int bourne_shell_syntax = FALSE; ++ int auto_shell_syntax = FALSE; + int i; + int ret; + int bus_pid_to_launcher_pipe[2]; +@@ -561,20 +588,48 @@ + if (strcmp (arg, "--help") == 0 || + strcmp (arg, "-h") == 0 || + strcmp (arg, "-?") == 0) +- usage (); ++ usage (0); ++ else if (strcmp (arg, "--auto-syntax") == 0) ++ auto_shell_syntax = TRUE; ++ else if (strcmp (arg, "-c") == 0 || ++ strcmp (arg, "--csh-syntax") == 0) ++ c_shell_syntax = TRUE; ++ else if (strcmp (arg, "-s") == 0 || ++ strcmp (arg, "--sh-syntax") == 0) ++ bourne_shell_syntax = TRUE; + else if (strcmp (arg, "--version") == 0) + version (); + else if (strcmp (arg, "--exit-with-session") == 0) + exit_with_session = TRUE; ++ else if (runprog) ++ usage (1); + else +- usage (); ++ { ++ runprog = arg; ++ remaining_args = i+1; ++ break; ++ } + + prev_arg = arg; + + ++i; + } + +- verbose ("--exit-with-session provided\n"); ++ if (exit_with_session) ++ verbose ("--exit-with-session enabled\n"); ++ ++ if (auto_shell_syntax) ++ { ++ if ((shname = getenv ("SHELL")) != NULL) ++ { ++ if (!strncmp (shname + strlen (shname) - 3, "csh", 3)) ++ c_shell_syntax = TRUE; ++ else ++ bourne_shell_syntax = TRUE; ++ } ++ else ++ bourne_shell_syntax = TRUE; ++ } + + if (pipe (bus_pid_to_launcher_pipe) < 0 || + pipe (bus_address_to_launcher_pipe) < 0) +@@ -737,17 +792,62 @@ + } + + close (bus_pid_to_launcher_pipe[READ_END]); +- +- printf ("DBUS_SESSION_BUS_ADDRESS='%s'\n", +- bus_address); +- +- printf ("DBUS_SESSION_BUS_PID=%ld\n", +- (long) bus_pid); +- ++ ++ if (runprog) ++ { ++ char *envvar; ++ char **args; ++ ++ envvar = malloc (strlen ("DBUS_SESSION_BUS_ADDRESS=") + strlen (bus_address) + 1); ++ args = malloc (sizeof (char *) * ((argc-remaining_args)+2)); ++ ++ if (envvar == NULL || args == NULL) ++ goto oom; ++ ++ args[0] = xstrdup (runprog); ++ if (!args[0]) ++ goto oom; ++ for (i = 1; i <= (argc-remaining_args); i++) ++ { ++ size_t len = strlen (argv[remaining_args+i-1])+1; ++ args[i] = malloc (len); ++ if (!args[i]) ++ goto oom; ++ strncpy (args[i], argv[remaining_args+i-1], len); ++ } ++ args[i] = NULL; ++ ++ strcpy (envvar, "DBUS_SESSION_BUS_ADDRESS="); ++ strcat (envvar, bus_address); ++ putenv (envvar); ++ ++ execvp (runprog, args); ++ fprintf (stderr, "Couldn't exec %s: %s\n", runprog, strerror (errno)); ++ exit (1); ++ } ++ else ++ { ++ if (c_shell_syntax) ++ printf ("setenv DBUS_SESSION_BUS_ADDRESS '%s'\n", bus_address); ++ else ++ { ++ printf ("DBUS_SESSION_BUS_ADDRESS='%s'\n", bus_address); ++ if (bourne_shell_syntax) ++ printf ("export DBUS_SESSION_BUS_ADDRESS\n"); ++ } ++ if (c_shell_syntax) ++ printf ("set DBUS_SESSION_BUS_PID=%ld\n", (long) bus_pid); ++ else ++ printf ("DBUS_SESSION_BUS_PID=%ld\n", (long) bus_pid); ++ } ++ + verbose ("dbus-launch exiting\n"); + + exit (0); + } + + return 0; ++ oom: ++ fprintf (stderr, "Out of memory!"); ++ exit (1); + } +diff -urN dbus-0.11.orig/tools/dbus-monitor.1 dbus-0.11/tools/dbus-monitor.1 +--- dbus-0.11.orig/tools/dbus-monitor.1 2003-05-03 15:03:16.000000000 -0700 ++++ dbus-0.11/tools/dbus-monitor.1 2003-05-16 16:13:43.000000000 -0700 +@@ -8,6 +8,7 @@ + .SH SYNOPSIS + .PP + .B dbus-monitor ++[\-\-system] + + .SH DESCRIPTION + +@@ -20,16 +21,17 @@ + There are two well-known message buses: the systemwide message bus + (installed on many systems as the "messagebus" service) and the + per-user-login-session message bus (started each time a user logs in). +-Right now, \fIdbus-monitor\fP is hardcoded to only work with the +-systemwide message bus. It should really be extended to have a +-\-\-session command line option as with \fIdbus-send\fP. ++\fIdbus-monitor\fP by default monitors the session bus; to monitor the ++system bus, specify \-\-system. + + .PP + The message bus configuration may keep \fIdbus-monitor\fP from seeing + all messages, especially if you run the monitor as a non-root user. + + .SH OPTIONS +-No options are currently supported. ++.TP ++.I "--system" ++Use the system message bus instead of the session bus. + + .SH AUTHOR + dbus-monitor was written by Philip Blundell. +diff -urN dbus-0.11.orig/tools/dbus-monitor.c dbus-0.11/tools/dbus-monitor.c +--- dbus-0.11.orig/tools/dbus-monitor.c 2003-04-24 09:35:58.000000000 -0700 ++++ dbus-0.11/tools/dbus-monitor.c 2003-05-16 16:03:38.000000000 -0700 +@@ -27,6 +27,7 @@ + #include + /* Don't copy this, for programs outside the dbus tree it's dbus/dbus-glib.h */ + #include ++#include "dbus-print-message.h" + + static DBusHandlerResult + handler_func (DBusMessageHandler *handler, +@@ -34,69 +35,47 @@ + DBusMessage *message, + void *user_data) + { +- DBusMessageIter iter; +- +- printf ("message name=%s; sender=%s\n", dbus_message_get_name (message), +- dbus_message_get_sender (message)); +- +- dbus_message_iter_init (message, &iter); +- +- do +- { +- int type = dbus_message_iter_get_arg_type (&iter); +- char *str; +- dbus_uint32_t uint32; +- dbus_int32_t int32; +- double d; +- unsigned char byte; +- +- if (type == DBUS_TYPE_INVALID) +- break; +- +- switch (type) +- { +- case DBUS_TYPE_STRING: +- str = dbus_message_iter_get_string (&iter); +- printf ("string:%s\n", str); +- break; +- +- case DBUS_TYPE_INT32: +- int32 = dbus_message_iter_get_int32 (&iter); +- printf ("int32:%d\n", int32); +- break; +- +- case DBUS_TYPE_UINT32: +- uint32 = dbus_message_iter_get_uint32 (&iter); +- printf ("int32:%u\n", uint32); +- break; +- +- case DBUS_TYPE_DOUBLE: +- d = dbus_message_iter_get_double (&iter); +- printf ("double:%f\n", d); +- break; +- +- case DBUS_TYPE_BYTE: +- byte = dbus_message_iter_get_byte (&iter); +- printf ("byte:%d\n", byte); +- break; +- +- default: +- printf ("(unknown arg type %d)\n", type); +- break; +- } +- } while (dbus_message_iter_next (&iter)); +- ++ print_message (message); ++ ++ if (dbus_message_has_name (message, DBUS_MESSAGE_LOCAL_DISCONNECT)) ++ exit (0); ++ + return DBUS_HANDLER_RESULT_ALLOW_MORE_HANDLERS; + } + ++static void ++usage (char *name, int ecode) ++{ ++ fprintf (stderr, "Usage: %s [--system]\n", name); ++ exit (ecode); ++} ++ + int + main (int argc, char *argv[]) + { + DBusConnection *connection; + DBusError error; +- DBusBusType type = DBUS_BUS_SYSTEM; ++ DBusBusType type = DBUS_BUS_SESSION; + DBusMessageHandler *handler; + GMainLoop *loop; ++ int i; ++ ++ for (i = 1; i < argc; i++) ++ { ++ char *arg = argv[i]; ++ ++ if (!strcmp (arg, "--session")) ++ type = DBUS_BUS_SYSTEM; ++ else if (!strcmp (arg, "--help")) ++ usage (argv[0], 0); ++ else if (!strcmp (arg, "--")) ++ break; ++ else if (arg[0] == '-') ++ usage (argv[0], 1); ++ } ++ ++ if (argc > 2) ++ usage (argv[0], 1); + + loop = g_main_loop_new (NULL, FALSE); + +diff -urN dbus-0.11.orig/tools/dbus-print-message.c dbus-0.11/tools/dbus-print-message.c +--- dbus-0.11.orig/tools/dbus-print-message.c 1969-12-31 16:00:00.000000000 -0800 ++++ dbus-0.11/tools/dbus-print-message.c 2003-05-16 13:09:25.000000000 -0700 +@@ -0,0 +1,83 @@ ++/* -*- mode: C; c-file-style: "gnu" -*- */ ++/* dbus-print-message.h Utility function to print out a message ++ * ++ * Copyright (C) 2003 Philip Blundell ++ * Copyright (C) 2003 Red Hat, Inc. ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++#include "dbus-print-message.h" ++ ++void ++print_message (DBusMessage *message) ++{ ++ DBusMessageIter iter; ++ const char *sender; ++ ++ sender = dbus_message_get_sender (message); ++ ++ printf ("message name=%s; sender=%s\n", ++ dbus_message_get_name (message), ++ sender ? sender : "(no sender)"); ++ ++ dbus_message_iter_init (message, &iter); ++ ++ do ++ { ++ int type = dbus_message_iter_get_arg_type (&iter); ++ char *str; ++ dbus_uint32_t uint32; ++ dbus_int32_t int32; ++ double d; ++ unsigned char byte; ++ ++ if (type == DBUS_TYPE_INVALID) ++ break; ++ ++ switch (type) ++ { ++ case DBUS_TYPE_STRING: ++ str = dbus_message_iter_get_string (&iter); ++ printf ("string:%s\n", str); ++ break; ++ ++ case DBUS_TYPE_INT32: ++ int32 = dbus_message_iter_get_int32 (&iter); ++ printf ("int32:%d\n", int32); ++ break; ++ ++ case DBUS_TYPE_UINT32: ++ uint32 = dbus_message_iter_get_uint32 (&iter); ++ printf ("int32:%u\n", uint32); ++ break; ++ ++ case DBUS_TYPE_DOUBLE: ++ d = dbus_message_iter_get_double (&iter); ++ printf ("double:%f\n", d); ++ break; ++ ++ case DBUS_TYPE_BYTE: ++ byte = dbus_message_iter_get_byte (&iter); ++ printf ("byte:%d\n", byte); ++ break; ++ ++ default: ++ printf ("(unknown arg type %d)\n", type); ++ break; ++ } ++ } while (dbus_message_iter_next (&iter)); ++} ++ +diff -urN dbus-0.11.orig/tools/dbus-print-message.h dbus-0.11/tools/dbus-print-message.h +--- dbus-0.11.orig/tools/dbus-print-message.h 1969-12-31 16:00:00.000000000 -0800 ++++ dbus-0.11/tools/dbus-print-message.h 2003-05-16 13:09:25.000000000 -0700 +@@ -0,0 +1,31 @@ ++/* -*- mode: C; c-file-style: "gnu" -*- */ ++/* dbus-print-message.h Utility function to print out a message ++ * ++ * Copyright (C) 2003 Philip Blundell ++ * Copyright (C) 2003 Red Hat, Inc. ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++#ifndef DBUS_PRINT_MESSAGE_H ++#define DBUS_PRINT_MESSAGE_H ++ ++#include ++#include ++#include ++ ++void print_message (DBusMessage *message); ++ ++#endif /* DBUS_PRINT_MESSAGE_H */ +diff -urN dbus-0.11.orig/tools/dbus-send.1 dbus-0.11/tools/dbus-send.1 +--- dbus-0.11.orig/tools/dbus-send.1 2003-05-03 15:03:16.000000000 -0700 ++++ dbus-0.11/tools/dbus-send.1 2003-05-16 16:13:32.000000000 -0700 +@@ -8,7 +8,7 @@ + .SH SYNOPSIS + .PP + .B dbus-send +-[\-\-session] [\-\-dest=SERVICE] [contents ...] ++[\-\-system] [\-\-dest=SERVICE] [\-\-print-reply] [contents ...] + + .SH DESCRIPTION + +@@ -20,8 +20,8 @@ + There are two well-known message buses: the systemwide message bus + (installed on many systems as the "messagebus" service) and the + per-user-login-session message bus (started each time a user logs in). +-\fIdbus-send\fP sends messages to the system bus by default, and +-to the per-session bus if you specify \-\-session. ++\fIdbus-send\fP sends messages to the session bus by default, and ++to the system bus if you specify \-\-system. + + .PP + Nearly all uses of \fIdbus-send\fP must provide the \-\-dest +@@ -50,11 +50,14 @@ + .SH OPTIONS + The following options are supported: + .TP +-.I "--session" +-Use the per-login-session message bus instead of the systemwide bus. +-.TP + .I "--dest=SERVICE" + Specify the service to receive the message. ++.TP ++.I "--print-reply" ++Block for a reply to the message sent, and print any reply received. ++.TP ++.I "--system" ++Use the system message bus instead of the session bus. + + .SH AUTHOR + dbus-send was written by Philip Blundell. +diff -urN dbus-0.11.orig/tools/dbus-send.c dbus-0.11/tools/dbus-send.c +--- dbus-0.11.orig/tools/dbus-send.c 2003-04-24 11:18:38.000000000 -0700 ++++ dbus-0.11/tools/dbus-send.c 2003-05-16 16:04:04.000000000 -0700 +@@ -25,11 +25,13 @@ + + #include + ++#include "dbus-print-message.h" ++ + static void +-usage (char *name) ++usage (char *name, int ecode) + { +- fprintf (stderr, "Usage: %s [--session] [--dest=SERVICE] [contents ...]\n", name); +- exit (1); ++ fprintf (stderr, "Usage: %s [--help] [--session] [--dest=SERVICE] [--print-reply] [contents ...]\n", name); ++ exit (ecode); + } + + int +@@ -38,31 +40,38 @@ + DBusConnection *connection; + DBusError error; + DBusMessage *message; ++ int print_reply; + DBusMessageIter iter; + int i; +- DBusBusType type = DBUS_BUS_SYSTEM; ++ DBusBusType type = DBUS_BUS_SESSION; + char *dest = DBUS_SERVICE_BROADCAST; + char *name = NULL; + + if (argc < 2) +- usage (argv[0]); ++ usage (argv[0], 1); + ++ print_reply = FALSE; ++ + for (i = 1; i < argc && name == NULL; i++) + { + char *arg = argv[i]; + +- if (!strcmp (arg, "--session")) +- type = DBUS_BUS_SESSION; ++ if (strcmp (arg, "--system") == 0) ++ type = DBUS_BUS_SYSTEM; ++ else if (strcmp (arg, "--print-reply") == 0) ++ print_reply = TRUE; + else if (strstr (arg, "--dest=") == arg) + dest = strchr (arg, '=') + 1; ++ else if (!strcmp(arg, "--help")) ++ usage (argv[0], 0); + else if (arg[0] == '-') +- usage (argv[0]); ++ usage (argv[0], 1); + else + name = arg; + } + + if (name == NULL) +- usage (argv[0]); ++ usage (argv[0], 1); + + dbus_error_init (&error); + connection = dbus_bus_get (type, &error); +@@ -156,9 +165,32 @@ + } + } + +- dbus_connection_send (connection, message, NULL); ++ if (print_reply) ++ { ++ DBusMessage *reply; + +- dbus_connection_flush (connection); ++ dbus_error_init (&error); ++ reply = dbus_connection_send_with_reply_and_block (connection, ++ message, -1, ++ &error); ++ if (dbus_error_is_set (&error)) ++ { ++ fprintf (stderr, "Error: %s\n", ++ error.message); ++ exit (1); ++ } ++ ++ if (reply) ++ { ++ print_message (reply); ++ dbus_message_unref (reply); ++ } ++ } ++ else ++ { ++ dbus_connection_send (connection, message, NULL); ++ dbus_connection_flush (connection); ++ } + + dbus_message_unref (message); + diff --git a/sys-apps/dbus/files/digest-dbus-0.11 b/sys-apps/dbus/files/digest-dbus-0.11 new file mode 100644 index 000000000000..e1d602545411 --- /dev/null +++ b/sys-apps/dbus/files/digest-dbus-0.11 @@ -0,0 +1 @@ +MD5 87f8cf7ffd114846d577e454ef3129aa dbus-0.11.tar.gz 875660 -- cgit v1.2.3-65-gdbad