diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-05-06 16:38:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-05-10 14:58:39 +0200 |
commit | 8fbb1941f1a8c3d9eda920891b2b51a67f2a2375 (patch) | |
tree | 0426b5e4474292d5d02a6d749b1eeb9f4ed09379 /src/userdb/userdbd.c | |
parent | userdb: optionally read user/group/membership "dropins", too (diff) | |
download | systemd-8fbb1941f1a8c3d9eda920891b2b51a67f2a2375.tar.xz systemd-8fbb1941f1a8c3d9eda920891b2b51a67f2a2375.zip |
userdbd: also listen on a varlink socket io.systemd.DropIn
Let's explicitly support looking things up via dropin as a varlink
service.
Diffstat (limited to 'src/userdb/userdbd.c')
-rw-r--r-- | src/userdb/userdbd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/userdb/userdbd.c b/src/userdb/userdbd.c index 6b28dd0a08..d469411eb8 100644 --- a/src/userdb/userdbd.c +++ b/src/userdb/userdbd.c @@ -17,6 +17,9 @@ * → io.systemd.Multiplexer: this multiplexes lookup requests to all Varlink services that have a * socket in /run/systemd/userdb/. It's supposed to simplify clients that don't want to implement * the full iterative logic on their own. + * + * → io.systemd.DropIn: this makes JSON user/group records dropped into /run/userdb/ available as + * regular users. */ static int run(int argc, char *argv[]) { @@ -31,8 +34,8 @@ static int run(int argc, char *argv[]) { if (argc != 1) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments."); - if (setenv("SYSTEMD_BYPASS_USERDB", "io.systemd.NameServiceSwitch:io.systemd.Multiplexer", 1) < 0) - return log_error_errno(errno, "Failed to se $SYSTEMD_BYPASS_USERDB: %m"); + if (setenv("SYSTEMD_BYPASS_USERDB", "io.systemd.NameServiceSwitch:io.systemd.Multiplexer:io.systemd.DropIn", 1) < 0) + return log_error_errno(errno, "Failed to set $SYSTEMD_BYPASS_USERDB: %m"); assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGUSR2, -1) >= 0); |