resolvconf: use correct output files when used with dnsmasq#349320
resolvconf: use correct output files when used with dnsmasq#349320corngood merged 1 commit intoNixOS:masterfrom
Conversation
nixos/modules/config/resolvconf.nix
Outdated
There was a problem hiding this comment.
I did this instead of a default, so it would be merged with the other values.
There was a problem hiding this comment.
Perhaps we should expose the full list of required read/write paths (including /run/resolvconf)? Either by renaming subscriberFiles or by adding a new option?
This may end up needing to be used in other places (e.g. VPN client).
There was a problem hiding this comment.
Uhm, let's try to keep it simple, for now: there's not much that interacts with resolvconf and it seems the only module using this subscriber mechanism is dnsmasq.
Before worrying about other unprivileged clients invoking resolvconf, I should deal with the fact it doesn't set the right group on the generated files.
There was a problem hiding this comment.
Before worrying about other unprivileged clients invoking resolvconf, I should deal with the fact it doesn't set the right group on the generated files.
Are you talking about something other than what this PR is fixing? The files all have resolvconf as the group for me.
There was a problem hiding this comment.
Yes, unrelated to dnsmasq: the ownership of files in /run/resolvconf seem to use the wrong group.
There was a problem hiding this comment.
Ah, okay. Just in case it's useful, this is what I see:
-rw-r----- 1 dhcpcd dhcpcd 115 Oct 17 13:24 /run/resolvconf/interfaces/enp4s0.dhcp
-rw-rw-r-- 1 root resolvconf 23 Oct 15 23:23 /run/resolvconf/interfaces/static
-rw-rw-r-- 1 root resolvconf 151 Oct 17 08:32 /run/resolvconf/interfaces/tun0
-rw-rw-r-- 1 root resolvconf 2 Oct 15 23:23 '/run/resolvconf/metrics/0000001 static'
-rw-r----- 1 dhcpcd dhcpcd 2 Oct 17 13:24 '/run/resolvconf/metrics/0001002 enp4s0.dhcp'
There was a problem hiding this comment.
Yes, exactly: those written by dhcpcd have dhcpcd's own uid/gid.
4db8f42 to
403604c
Compare
|
@GrahamcOfBorg build dhcpcd.tests |
|
@corngood This change means the resolvconf service additionally needs a |
|
@Shados can you share what's in your |
Ahhh, I see, my bad, I'd mis-understood from dnsmasq's pre-start script touching them. This is just an issue with my specific setup after all. |
Fixes the issue described at #336988 (comment)
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.