diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-07-14 19:19:49 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-07-22 15:53:45 +0200 |
commit | 409093fe10685ed55915ef256f09cdf144b6528b (patch) | |
tree | a1cf99e3f7bece318f7c12e53c2703938d8a8178 /src/core | |
parent | 6f3e79859d91aecb3a75097b69fb9cba086b2cb1 (diff) |
nss: add new "nss-systemd" NSS module for mapping dynamic users
With this NSS module all dynamic service users will be resolvable via NSS like
any real user.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/execute.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index c186f2a705..26e9cd5339 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1670,6 +1670,12 @@ static int exec_child( if (context->dynamic_user && dcreds) { + /* Make sure we bypass our own NSS module for any NSS checks */ + if (putenv((char*) "SYSTEMD_NSS_DYNAMIC_BYPASS=1") != 0) { + *exit_status = EXIT_USER; + return -errno; + } + r = dynamic_creds_realize(dcreds, &uid, &gid); if (r < 0) { *exit_status = EXIT_USER; |