diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-04-11 11:19:27 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-04-11 11:19:27 +0200 |
commit | 14b662590144571985897855f9973f16e386e0ce (patch) | |
tree | 1bd53b773f592dc583aff4635537a10a6f89fcaa /src/nspawn/nspawn.c | |
parent | cbe22206143a04f573e5cfbc8c839ddf2fd8c5dc (diff) | |
parent | 7236ce6e9e379948217c31f38b48de6448521162 (diff) |
Merge pull request #2996 from keszybz/coverity-fixes
Coverity fixes
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r-- | src/nspawn/nspawn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index eb89916b7e..c96a04cd5e 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2648,7 +2648,8 @@ static int inner_child( execvpe(arg_parameters[0], arg_parameters, env_use); else { if (!arg_chdir) - chdir(home ?: "/root"); + /* If we cannot change the directory, we'll end up in /, that is expected. */ + (void) chdir(home ?: "/root"); execle("/bin/bash", "-bash", NULL, env_use); execle("/bin/sh", "-sh", NULL, env_use); |