run: when automatically generating names for transient units, use unique bus ID,...
authorLennart Poettering <lennart@poettering.net>
Tue, 17 Nov 2015 13:11:12 +0000 (14:11 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Nov 2015 19:41:52 +0000 (20:41 +0100)
commit9c8d1e1a712d443c456147e15ee906035b5fa0f7
treefc0d687d889efcfb6284b3ecc38d0194f98d3d4c
parent7c65093ae351d82a04a3e03582e8faedee798adc
run: when automatically generating names for transient units, use unique bus ID, fallback to random

Previously we used the process ID to generate transient unit names.
However, that is problematic as PIDs get reused easily, and applying
them to remote systems makes little sense.

Fortunately, each bus peer gets a unique, non-reusable ID assigned when
attaching to a bus, hence let's use that, if we can. In some cases we
cannot however, because we connect directly to PID's private socket, and
thus are not a proper bus peer with a unique ID. In that case generate a
random UUID to name the unit after.
src/run/run.c