Use other machine-id files as alternatives to D-Bus file

Bug #1384859 reported by Barry Warsaw on 2014-10-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu system image
High
Barry Warsaw

Bug Description

Phased percentage updates use the contents of /var/lib/dbus/machine-id as the device specific input into the random number generator seed.

There is also a "whoopsie id" in /var/lib/whoopsie/whoopsie-id which is derived from the device's hardware, e.g. it's MAC address, serial number, etc. It has been suggested that we switch to the whoopsie-id instead of the machine-id as input to the random number generator.

Question: is it possible for the whoopsie-id to be missing? In that case, we'd probably have to fall back to the machine-id.

NB: there is currently no fallback if the machine-id is missing.

I'm not sure what the advantages are for one file or the other.

Related branches

Loïc Minier (lool) wrote :

I believe you don't want to read /var/lib/whoopsie/whoopsie-id directly; instead you want to query it over DBus.

sudo dbus-send --system --print-reply --dest=com.ubuntu.WhoopsiePreferences /com/ubuntu/WhoopsiePreferences com.ubuntu.WhoopsiePreferences.GetIdentifier

The only reason for whoopsie id is if you want a stable id across reinstalls; this might not be needed here.

If you do start from whoopsie id, it's probably best to combine it with something else (e.g. SHA1(whoopsieid + 'system-image') so as to not share it publicly (this would allow finding the error reports from that whoopsie id)

Barry Warsaw (barry) wrote :

mvo submitted a branch to use /etc/machine-id but as a fallback if /var/lib/dbus/machine-id could not be found. These files are identical on my vivid machine, but the former is a systemd file. Right now the order is the dbus file first, then the systemd file. It would not be difficult to add other files to the list, or re-order them, but I think mvo's branch resolves the spirit of this bug.

summary: - Use whoopsie id instead of D-Bus machine-id?
+ Use other machine-id files as alternatives to D-Bus file
Changed in ubuntu-system-image:
assignee: nobody → Barry Warsaw (barry)
importance: Wishlist → High
status: Triaged → In Progress
Barry Warsaw (barry) on 2014-12-02
Changed in ubuntu-system-image:
status: In Progress → Fix Committed
Barry Warsaw (barry) on 2015-05-08
Changed in ubuntu-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers