-
Notifications
You must be signed in to change notification settings - Fork 570
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
private-etc breaks with 'net none' and 'dns=foo' #5650
Labels
Comments
Closed
7 tasks
glitsj16
changed the title
private-etc sometimes breaks with 'net none'
private-etc breaks with 'net none' and 'dns=foo'
Mar 15, 2023
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
During testing of the recent private-etc refactoring (mostly in 5d0822c) I think there's a bug under specific conditions. I'll keep digging to try to pinpoint it as accurate as I can, but the below might already be a reproducer.
Relates to #5610 (see this comment).
This works as expected:
These (and similar) variations however keeps failing for me:
Note that the actual value of
private-etc
doesn't matter. Whendns
is there it will alway fail in my tests.Current code logic in
fs_etc.c
always tries to create a new /etc/resolv.conf, even when networking is disabled via --net=none:firejail/src/firejail/fs_etc.c
Lines 113 to 121 in 45a641d
If I understand the relevant code there, I think it would make sense to create /etc/resolv.conf in a more conditional way, something like:
Can anyone reproduce this? Thoughts on how to fix this in a safer way (if indeed this is a bug)?
UPDATE: I've made a small patch that seems to work for me. Here it is if anyone wants to test it:
Do note that this needs to go on top of current git master.
The text was updated successfully, but these errors were encountered: