figueroa wrote:No, best I can tell, /var/lib/dbus/machine-id comes from dbus. If not, show me.
Code: Select all
ls -lh /var/lib/dbus/machine-id
lrwxrwxrwx 1 root root 15 Feb 26 20:08 /var/lib/dbus/machine-id -> /etc/machine-idfigueroa wrote:No, best I can tell, /var/lib/dbus/machine-id comes from dbus. If not, show me.
Code: Select all
ls -lh /var/lib/dbus/machine-id
lrwxrwxrwx 1 root root 15 Feb 26 20:08 /var/lib/dbus/machine-id -> /etc/machine-idI agree. Why is dbus-uuidgen --ensure invoked with a non-default machine-id destination? The default destination is /var/lib/dbus. /etc/machine-id belongs to systemd. ADDED: see man dbus-uuidgenAnt P. wrote:/etc/init.d/dbus
Because several programs need the file, as was already pointed out for LVM. Avahi and pulseaudio do too.figueroa wrote:Why is dbus-uuidgen --ensure invoked with a non-default machine-id destination?
I don't think you see the big picture. Why the verbal hostility? Following the documentation, dbus should put machine-id in /var/lib/dbus/ then making a symlink /etc/machine-id to /var/lib/dbus/machine-id for those programs that need it makes the most sense in a system that does not run systemd, not the other way around having dbus use a non-default location for it's machine-id file and symlinking back to that.Ant P. wrote:Less devuan/phoronix stereotypical religious rhetoric, more hard facts please. I've yet to see any evidence of this wild "spying" claim.
LVM _may_ use it, but will do without.Ant P. wrote:Because several programs need the file, as was already pointed out for LVM. Avahi and pulseaudio do too.
Code: Select all
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
# Volume Groups can also be given a system ID (by vgcreate, vgchange,
# or vgimport.) A VG on shared storage devices is accessible only to
# the host with a matching system ID. See 'man lvmsystemid' for
# information on limitations and correct usage.
#
# Accepted values:
# none
# The host has no system ID.
# lvmlocal
# Obtain the system ID from the system_id setting in the 'local'
# section of an lvm configuration file, e.g. lvmlocal.conf.
# uname
# Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
# machineid
# Use the contents of the machine-id file to set the system ID.
# Some systems create this file at installation time.
# See 'man machine-id' and global/etc.
# file
# Use the contents of another file (system_id_file) to set the
# system ID.dbus-1.10.24.ebuild wrote: # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
# dependencies with hardcoded paths (although the known ones got fixed already)
#370451 wrote:I'd appreciate if along with this bump, we could switch to using /etc/machine-id for D-Bus machine id (either by moving /var/lib/dbus/machine-id to that or removing the old one and getting a new one). That would simplify the systemd ebuild a little.
Code: Select all
--- old/dbus-1.10.24.ebuild 2019-03-15 22:02:42.929391869 -0000
+++ new/dbus-1.10.24.ebuild 2019-03-15 22:01:26.137392931 -0000
@@ -234,8 +234,13 @@
# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
# dependencies with hardcoded paths (although the known ones got fixed already)
- dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
- ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
+ if use systemd ; then
+ dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
+ ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
+ else
+ dbus-uuidgen --ensure="${EROOT}"/var/lib/dbus/machine-id
+ ln -sf "${EROOT}"/var/lib/dbus/machine-id "${EPREFIX}"/etc/machine-id
+ fi
if [[ ${CHOST} == *-darwin* ]]; then
local plist="org.freedesktop.dbus-session.plist"
Thanks for the details. Sounds like a great opportunity to make that optional for those who actually use it in a cluster (or optional for those who don't, depending on your pov).eccerr0r wrote:The ID is for having shared storage space.
Temp files in machine unique /tmp have notoriously been security issues. So it's best to store temp files in user accounts.
However if you have multiple machine sharing the same directory with multiple logins...collision city! So what do you do? Unique machine ID. Granted a hostname usually is sufficient, but I suspect the machine ID is used in case dynamic IP is used and changes from time to time.
Dbus can be used over network, it has always been for IPC and well, processes can be running on different computers too. Yes these features were designed for clustering in mind, us with single PCs it's kind of useless...

I think the trust issue is separate. Although, despite making the statement "you need to trust your software," it sounds like you might not trust Chrome?eccerr0r wrote:Well, if you want to workaround this by randomly select a host id, that's probably the finest workaround; but really you need to trust your software. I'd think Pulseaudio is exempt because it's necessary to keep track of these sessions. Likewise Avahi, to keep machines from stepping on each other if IP address changes from DHCP so other machines can keep track of services available. LVM is reasonable too if you move disks around between machines, makes it easier for the subsystem to ensure similarly configured disks aren't accidentally swapped between machines.
Chrome however should have no right to this information, at least to the non-hash version. It's explicitly improper usage if the purpose is to upload it to the mothership. I don't see a reason why it would need the ID to detect collisions between multiple instances, this was a problem solved without machine id just fine for years.
IMHO I'm just going to leave it. Unfortunately I am a bit alarmed about the Chrome usage of this id. The other software above I have no problems with, even journald which also uses it. Fortunately I don't use Chrome much (it's in its own VM that I use for only one specific website), so hopefully this limits exposure.
For the time being, I like my solution:eccerr0r wrote:Well, if you want to workaround this by randomly select a host id, that's probably the finest workaround;
This is now tested on two systems, works fine, and is compliant with dbus documentation that indicated that machine-id should not be changed while running. I have created a similar but slightly more convoluted fix in two MX Linux systems that also works fine and tested on two systems.Deleting the file /etc/machine-id at shutdown via /etc/local.d/ *.stop file works as expected and a new one is created upon reboot by the dbus init file. That works without error. I've done it, and I like it, even though I don't reboot very often (months).

Indeed I do not trust the chrome binary, hence it's in a VM.pjp wrote:I think the trust issue is separate. Although, despite making the statement "you need to trust your software," it sounds like you might not trust Chrome?
And of course the problem of having to maintain more than one version of ensuring no temp file collisions. Yes it's a cop out, but in this case the same code stream works regardless if you're on a cluster or single computer. Just needs to be better protected from programs that have no need for unique ID.My suggestion was related to software allowing the ability to choose whether or not to configure support for various features such as audio, dhcp, lvm. /usr/portage/profiles/use.desc has 371 entries.
Effectively you are choosing a random host ID as it creates a new one each time. However I'd suggest you reboot your machine more often to get a different ID more frequently, at least that's what I'd do if I had to deal with a program leaking this information out onto the network like chrome. For my use of chrome, as long as I look like I am a robot doing the same single repetitive task over and over again and nothing else -- no searches, no website reading, nothing else --- I doubt the mothership can glean much information from that.figueroa wrote:For the time being, I like my solution:eccerr0r wrote:Well, if you want to workaround this by randomly select a host id, that's probably the finest workaround;Deleting the file /etc/machine-id at shutdown via /etc/local.d/ *.stop file works as expected and a new one is created upon reboot by the dbus init file. That works without error. I've done it, and I like it, even though I don't reboot very often (months).
What about the MAC address(es) of your network interface(s)? How do you change them? And what about the UUID of your boot, root and data partitions? And what about the serial number of your mainboard/BIOS?This is now tested on two systems, works fine, and is compliant with dbus documentation that indicated that machine-id should not be changed while running. I have created a similar but slightly more convoluted fix in two MX Linux systems that also works fine and tested on two systems.
One hole at a time. machine-id has been shown to be abused. What evidence can you demonstrate that these other markers are being abused?mike155 wrote: What about the MAC address(es) of your network interface(s)? How do you change them? And what about the UUID of your boot, root and data partitions? And what about the serial number of your mainboard/BIOS?
Probably not going increase booting. I'm not using Chrome or Chromium. The "Chrome call Home" baloney is outrageous.eccerr0r wrote: However I'd suggest you reboot your machine more often to get a different ID more frequently, at least that's what I'd do if I had to deal with a program leaking this information out onto the network like chrome.
where?figueroa wrote:One hole at a time. machine-id has been shown to be abused. What evidence can you demonstrate that these other markers are being abused?mike155 wrote: What about the MAC address(es) of your network interface(s)? How do you change them? And what about the UUID of your boot, root and data partitions? And what about the serial number of your mainboard/BIOS?
I mostly agree, just not with the sole solution of some definition for "better" protected. Better works until it doesn't. -no-machineid solves the problem. And if security is the reason to "better protect" the id, then security is also the reason to not require one. So for me, as long as it is required, it is as trustworthy to me as Chrome is to you. For now, I'm stuck with it. But I think I can recompile without dbus and maybe remove anything that requires it.eccerr0r wrote:And of course the problem of having to maintain more than one version of ensuring no temp file collisions. Yes it's a cop out, but in this case the same code stream works regardless if you're on a cluster or single computer. Just needs to be better protected from programs that have no need for unique ID.
In the documentation for machine-id " It should be considered "confidential", and must not be exposed in untrusted environments, in particular on the network." Chromium (and Chrome?) reads it and throw and error if it's not there.Naib wrote:where?
I had watched in dismay the migration of temp files to the user's home in response to possible security issues. The main problem, as I understand it, is the possibility that a different user's malicious program could create a file (or a symlink) by the same name in /tmp, and then your program goes to open and use it but the different owner/permissions allow the other program to access the contents. By moving temporaries to the user's home, it was reasoned, would prevent this attack because others wouldn't be able to write into another's home. Of course, if you were tricked into running the malicious program in the first place, this doesn't help. It is only to mitigate damage if some daemon or something were somehow compromised. A reasonable goal, but it seems they used a unnecessarily heavy hammer to reach it.eccerr0r wrote:The ID is for having shared storage space.
Temp files in machine unique /tmp have notoriously been security issues. So it's best to store temp files in user accounts.
