[Bug 729536] New: dbus machine IDs are not unique
https://bugzilla.novell.com/show_bug.cgi?id=729536 https://bugzilla.novell.com/show_bug.cgi?id=729536#c0 Summary: dbus machine IDs are not unique Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: x86-64 OS/Version: openSUSE 11.4 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: R.Vickers@cs.rhul.ac.uk QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 The machine IDs used by dbus are not unique, i.e. different machines frequently share the same ID. As a result, if you ssh from one such machine to another any application which requires a session dbus will fail. It seems that /var/lib/dbus/machine-id is never regenerated after system installation. Some of the ones on our network are 4 years old, so it seems to survive operating system upgrades as well. Here is one that appears on more than one of our machines: $ ls -l /var/lib/dbus/machine-id -rw-r--r-- 1 root root 33 Nov 2 2009 /var/lib/dbus/machine-id $ cat /var/lib/dbus/machine-id bb8a098b5d04224d403dcb714aef6f78 Here is what happens after you ssh from one to the other: $ emacs GConf Error: Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Error connecting: Connection refused) $uuid=$(dbus-uuidgen --get) $export DBUS_VERBOSE=1 # be verbose $dbus-launch --autolaunch $uuid --close-stderr 29391: Autolaunch enabled (using X11). 29391: --exit-with-session automatically enabled 29391: Connected to X11 display 'localhost:10.0' 29391: dbus-daemon is already running. Returning existing parameters. DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-RaQbghWqzw,guid=2859ef82794cb0ed65631c490000005f DBUS_SESSION_BUS_PID=5257 DBUS_SESSION_BUS_WINDOWID=8388609 29391: dbus-launch exiting (The process with PID 5257 is actually running on the other machine). I believe the machine ID should be regenerated very early in the boot process, but it should not be regenerated by /etc/init.d/dbus because you do not want it to change if the system dbus is restarted. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=729536 https://bugzilla.novell.com/show_bug.cgi?id=729536#c zj jia <zjjia@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@suse.com AssignedTo|bnc-team-screening@forge.pr |thoenig@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=729536 https://bugzilla.novell.com/show_bug.cgi?id=729536#c1 Ned Ulbricht <nedu@netscape.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nedu@netscape.net --- Comment #1 from Ned Ulbricht <nedu@netscape.net> 2011-12-17 23:56:45 UTC --- I just discovered this same bug on machines which were orginally fresh installs of 11.4, over newly formatted partitions. Machines were installed on different dates: one in April 2011, other was installed in July 2011. -rw-r--r-- 1 root root 33 Mar 2 2011 /var/lib/dbus/machine-id $ cat /var/lib/dbus/machine-id 01da54966dc3ee84136d398500000391 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=729536 https://bugzilla.novell.com/show_bug.cgi?id=729536#c2 Bob Vickers <R.Vickers@cs.rhul.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Basesystem |Basesystem AssignedTo|thoenig@novell.com |bnc-team-screening@forge.pr | |ovo.novell.com Product|openSUSE 11.4 |openSUSE 12.1 --- Comment #2 from Bob Vickers <R.Vickers@cs.rhul.ac.uk> 2012-09-11 13:35:07 UTC --- This bug is present in Opensuse 12.1 too, so I have changed the product name. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=729536 https://bugzilla.novell.com/show_bug.cgi?id=729536#c3 kk zhang <kkzhang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkzhang@suse.com AssignedTo|bnc-team-screening@forge.pr |mvidner@suse.com |ovo.novell.com | --- Comment #3 from kk zhang <kkzhang@suse.com> 2012-09-12 15:36:11 UTC --- Hi,could you please help to have a look at this? I am not very sure whether it is right to assign it to you. Feel free to reassign it.Thanks -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=729536 https://bugzilla.novell.com/show_bug.cgi?id=729536#c4 --- Comment #4 from Bob Vickers <R.Vickers@cs.rhul.ac.uk> 2012-10-08 13:22:56 UTC --- There are two parts to fixing this bug. The first is to ensure that the file /var/lib/dbus/machine-id is not distributed in future RPM packages. But you also need to fix existing systems, and to do that I suggest that the following code is included in /etc/init.d/dbus: DBUS_MACHINE_ID_DIR="/var/lib/dbus" DBUS_MACHINE_ID=$DBUS_MACHINE_ID_DIR/machine-id DBUS_UUIIDGEN_BIN=/bin/dbus-uuidgen host=$(hostname --fqdn) if [[ -d $DBUS_MACHINE_ID_DIR && ! ( -e $DBUS_MACHINE_ID.$host ) ]] then dbus-uuidgen --ensure=$DBUS_MACHINE_ID.$host cp -p $DBUS_MACHINE_ID.$host $DBUS_MACHINE_ID fi What this code does is to ensure that whenever dbus is first run on a machine (identified by FQDN) then a new uuid is generated and saved in a specially named file to record the fact. Once this file exists the uuid can be assumed to be unique. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com