From: Lennart Poettering Date: Thu, 14 Jul 2016 10:37:28 +0000 (+0200) Subject: core: add a concept of "dynamic" user ids, that are allocated as long as a service... X-Git-Tag: v232.2~113 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=c1d93f2a0a009a95440778c53d89aa693bc6787e;hp=c1d93f2a0a009a95440778c53d89aa693bc6787e core: add a concept of "dynamic" user ids, that are allocated as long as a service is running This adds a new boolean setting DynamicUser= to service files. If set, a new user will be allocated dynamically when the unit is started, and released when it is stopped. The user ID is allocated from the range 61184..65519. The user will not be added to /etc/passwd (but an NSS module to be added later should make it show up in getent passwd). For now, care should be taken that the service writes no files to disk, since this might result in files owned by UIDs that might get assigned dynamically to a different service later on. Later patches will tighten sandboxing in order to ensure that this cannot happen, except for a few selected directories. A simple way to test this is: elogind-run -p DynamicUser=1 /bin/sleep 99999 ---