diff options
-rw-r--r-- | src/firejail/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 6b5f97779..75ad69ce4 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1932,14 +1932,14 @@ int main(int argc, char **argv) { | |||
1932 | 1932 | ||
1933 | // access call checks as real UID/GID, not as effective UID/GID | 1933 | // access call checks as real UID/GID, not as effective UID/GID |
1934 | if(cfg.chrootdir) { | 1934 | if(cfg.chrootdir) { |
1935 | char *shellpath; | 1935 | char *shellpath; |
1936 | if (asprintf(&shellpath, "%s%s", cfg.chrootdir, cfg.shell) == -1) | 1936 | if (asprintf(&shellpath, "%s%s", cfg.chrootdir, cfg.shell) == -1) |
1937 | errExit("asprintf"); | 1937 | errExit("asprintf"); |
1938 | if (access(shellpath, R_OK)) { | 1938 | if (access(shellpath, R_OK)) { |
1939 | fprintf(stderr, "Error: cannot access shell file in chroot\n"); | 1939 | fprintf(stderr, "Error: cannot access shell file in chroot\n"); |
1940 | exit(1); | 1940 | exit(1); |
1941 | } | 1941 | } |
1942 | free(shellpath); | 1942 | free(shellpath); |
1943 | } else if (access(cfg.shell, R_OK)) { | 1943 | } else if (access(cfg.shell, R_OK)) { |
1944 | fprintf(stderr, "Error: cannot access shell file\n"); | 1944 | fprintf(stderr, "Error: cannot access shell file\n"); |
1945 | exit(1); | 1945 | exit(1); |