Skip to content

Commit

Permalink
fix #3478
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 committed Oct 19, 2020
1 parent 227e1b5 commit 35e4761
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/firejail/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,10 +1633,11 @@ void profile_read(const char *fname) {
exit(1);
}
if (access(fname, R_OK)) {
int errsv = errno;
// if the file ends in ".local", do not exit
const char *base = gnu_basename(fname);
char *ptr = strstr(base, ".local");
if (ptr && strlen(ptr) == 6)
if (ptr && strlen(ptr) == 6 && errsv != EACCES)
return;

fprintf(stderr, "Error: cannot access profile file: %s\n", fname);
Expand Down

0 comments on commit 35e4761

Please sign in to comment.