X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fnspawn%2Fnspawn.c;h=5cac32cd8c84312ce28b97cfd515ecab1c2a7dba;hp=959df4e0d836f79cbd4fb7fa955f1ac4ae2a57bd;hb=963ddb917de3140308ee62fb642b2307a577a39e;hpb=77e63fafa5736c235920b8deef73afbf733a7fda diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 959df4e0d..5cac32cd8 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1307,6 +1307,12 @@ int main(int argc, char *argv[]) { if (arg_user) { + /* Note that this resolves user names + * inside the container, and hence + * accesses the NSS modules from the + * container and not the host. This is + * a bit weird... */ + if (get_user_creds((const char**)&arg_user, &uid, &gid, &home, NULL) < 0) { log_error("get_user_creds() failed: %m"); goto child_fail;