-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evolution: cannot modify/create lock file on Unix mbox spool files #3478
Comments
Hi, thanks for reporting this. Looks like a bug in the profile. Can you try adding |
@glitsj16 that does not solve it. Is |
That's possible. To test if AppArmor is involved you can either use the
|
Yes, try with both Referring to thunderbird and mutt, you need to |
@rusty-snake , running with both Edit: I also tried the |
If you run |
@rusty-snake you got me wrong, I meant the default profile for evolution i.e.
debug outputAutoselecting /bin/bash as shell
debug outputAutoselecting /bin/bash as shell |
Hmm, I think I accidentality found something out. I realized that I could
So I assume that firejail cannot read the local profile with these permissions, but why? Should not it belong to root, why the FYI, in my system |
A file with 640 root:root can not be readed by a user (as you expect). So if you start firejail as user (not root or sudo) it can not read this profile. If you now wonder why firejail can not read it although it is a SUID, firejail drops it EUID to non-root for things like profile-parsing, ... . (Or better: it has only a EUID=0 for things which need it). |
If Changing the later one to emit warnings for e.g. EPERM sounds reasonable. |
Maybe something like this: diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index a8722282..81534809 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -1620,11 +1620,15 @@ 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) {
+ if (errsv == EACCES)
+ fprintf(stderr, "Warn: %s permission denied\n", base);
return;
+ }
fprintf(stderr, "Error: cannot access profile file: %s\n", fname);
exit(1); |
@rusty-snake If I can see it correctly, everytime an error message is printed, firejail exits afterwards. --- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -1626,10 +1626,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); |
Went with @reinerh code above, thanks. |
Evolution mail client can be used to read local mails (Standard Unix mbox spool file). Most commonly, these files are stored in /var/mail/.
Bug and expected behavior
When you try to open the local mailbox in
/var/mail/<USERNAME>
, it shows the following under the toolbar (not the message specific part of the window):If you try to open a message from the problematic mailbox, it shows the following instead of the message contents.
Please pay attention that it does not show the message contents at all.
Note: There is no
evolution.local
, and there is nothing related inglobals.local
.To be able to read Unix mbox spool files that belongs to the current user, without any error.
No profile or disabling firejail
What changed calling
firejail --noprofile PROGRAM
in a shell?The error did not change.
What changed calling the program by path=without firejail (check
whereis PROGRAM
,firejail --list
,stat $programpath
)?Evolution works as expected.
Reproduce
Steps to reproduce the behavior:
firejail evolution
And
Environment
lsb_release -a
)firejail --version
) exclusive or used git commit (git rev-parse HEAD
)What other programs interact with the affected program for the functionality?
None.
Are these listed in the profile?
N/A
Additional context
Other context about the problem like related errors to understand the problem.
Checklist
find / -name 'firejail' 2>/dev/null
/fd firejail
to locate profiles ie in/usr/local/etc/firejail/PROGRAM.profile
)debug output
The text was updated successfully, but these errors were encountered: