[systemd-devel] Are Pathnames in /tmp/systemd-private-foo predictable?
Tomasz Torcz
tomek at pipebreaker.pl
Sun Jun 13 19:37:35 UTC 2021
Dnia Sun, Jun 13, 2021 at 09:04:04PM +0200, Marc Haber napisał(a):
> Hi,
>
> I am wondering where the 32 xdigit number in pathnames like
>
> systemd-private-27aa635a15cf4da0a7ebda10f25c3950-chrony.service-9DShFi/
>
> comes from. I always had the impression that it's the systemd/dbus
> machine id, but that does not seem to be the case. Is that just an
> arbitrary random number, or can it be predicted in a way?
Come, the source code is here! src/core/namespace.c to be precise.
The long nuber is boot_id
(https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#random),
a number changing for every boot.
The last few (9DShFi) characters are random.
--
Tomasz Torcz There exists no separation between gods and men:
tomek at pipebreaker.pl one blends softly casual into the other. — Frank Herbert
More information about the systemd-devel
mailing list