]> git.ipfire.org Git - thirdparty/systemd.git/commit
tmpfiles: optionally, read /etc/passwd + /etc/group without NSS
authorLennart Poettering <lennart@poettering.net>
Tue, 5 May 2020 20:45:54 +0000 (22:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 May 2020 14:35:20 +0000 (16:35 +0200)
commita3451c2c4ce7d3c02451f6ace4ee9f873880f78f
treec70382fd767603558dbf90e1b0fd19e6f18b82b1
parent6bae4b905ccf512aadb66e357a845079b8b41f53
tmpfiles: optionally, read /etc/passwd + /etc/group without NSS

There are two libc APIs for accessing the user database: NSS/getpwuid(),
and fgetpwent(). if we run in --root= mode (i.e. "offline" mode), let's
use the latter. Otherwise the former. This means tmpfiles can use the
database included in the root environment for chowning, which is a lot
more appropriate.

Fixes: #14806
meson.build
src/tmpfiles/offline-passwd.c [new file with mode: 0644]
src/tmpfiles/offline-passwd.h [new file with mode: 0644]
src/tmpfiles/tmpfiles.c