mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1621] NetworkManager DNS update overrides --dns option #1085
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1085
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @matthew-nichols on GitHub (Oct 28, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1621
If you run
firejail --dns=8.8.8.8you create a jail with that DNS info. If you then cause NetworkManager to update DNS information (i.e., (dis)connect from WiFi/Ethernet/VPN) the jail will now have theresolv.conffrom NetworkManager, not from the--dnsoption.On my system (Debian 9, KDE)
/etc/resolv.confis a symbolic link to/var/run/NetworkManager/resolv.conf(/var/runis a symbolic link to/run/).Running
sudo firejail --dns=8.8.8.8 --noprofilecreates a mount namespace with a tmpfs on/run/NetworkManager/resolv.conf. If you then edit/run/NetworkManger/resolv.confin the default namespace with vi (which does an atomic replace that changes the inode, which NetworkManager appears to do) the jail loses that tmpfs mount (mount | grep resolv.conf). If you edit with nano the same does not happen.My firejail version is that from the Debian repositories, 0.9.44.8. I also tried it with the version from backports, 0.9.50, and this behavior appears there as well.
@netblue30 commented on GitHub (Oct 29, 2017):
I've been able to reproduce it on Debian 9. In vim you need to set:
before saving the file. nano, echo command and anything else does not generate the problem. I'll have to look what exactly vim does. Thanks for the bug!
@matthew-nichols commented on GitHub (Oct 29, 2017):
vim (and NetworkManager) writes a file with a slightly different name and then rename's over the old file. If you change settings in NetworkManager (say, disconnect or reconnect) you will see the inode number change.
@netblue30 commented on GitHub (Nov 1, 2017):
Fixed, let me know if there are still problems.