aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/firejail/profile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index ed736521a..5d83e6a73 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -1633,10 +1633,11 @@ void profile_read(const char *fname) {
1633 exit(1); 1633 exit(1);
1634 } 1634 }
1635 if (access(fname, R_OK)) { 1635 if (access(fname, R_OK)) {
1636 int errsv = errno;
1636 // if the file ends in ".local", do not exit 1637 // if the file ends in ".local", do not exit
1637 const char *base = gnu_basename(fname); 1638 const char *base = gnu_basename(fname);
1638 char *ptr = strstr(base, ".local"); 1639 char *ptr = strstr(base, ".local");
1639 if (ptr && strlen(ptr) == 6) 1640 if (ptr && strlen(ptr) == 6 && errsv != EACCES)
1640 return; 1641 return;
1641 1642
1642 fprintf(stderr, "Error: cannot access profile file: %s\n", fname); 1643 fprintf(stderr, "Error: cannot access profile file: %s\n", fname);