mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
sandbox.c: print the dir on failed chdir(cfg.homedir)
Just like the other nearby error messages for `chdir`. Relates to #5510. Suggested-by: @gitsteff
This commit is contained in:
parent
e52f5e0028
commit
f24a49a2c9
1 changed files with 4 additions and 2 deletions
|
|
@ -1127,8 +1127,10 @@ int sandbox(void* sandbox_arg) {
|
|||
struct stat s;
|
||||
if (stat(cfg.homedir, &s) == 0) {
|
||||
/* coverity[toctou] */
|
||||
if (chdir(cfg.homedir) < 0)
|
||||
errExit("chdir");
|
||||
if (chdir(cfg.homedir) < 0) {
|
||||
fprintf(stderr, "Error: unable to enter home directory: %s: %s\n", cfg.homedir, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue