FS#56966 - [ndisc6] 1.0.3 rdnssd: Cannot write /var/run/rdnssd/resolv.conf.tmp: Permission denied
Attached to Project:
Arch Linux
Opened by Sascha Wilde (swilde) - Friday, 05 January 2018, 18:14 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:22 GMT
Opened by Sascha Wilde (swilde) - Friday, 05 January 2018, 18:14 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:22 GMT
|
Details
Description:
rdnssd can't write /var/run/rdnssd/resolv.conf.tmp so that DNS setup via IPv6 Router Advertisement isn't possible. The reason is a problem related to systemd: - /var/run/rdnssd is created by systemd-tmpfiles based on: the information in /usr/lib/tmpfiles.d/ndisc6.conf: d /run/rdnssd 0755 nobody root - BUT the directory is not created with the UID 99 for nobody as owner (as configured for arch linux in /etc/passwd) but with the UID 65534 (which seems to be some defacto standard for 'nobody' on some other distros). - This mismatch is hard to detect, as `ls -l' shows 65534 and 99 _both_ as "nobody". Additional info: * upstream systemd problem report: https://github.com/systemd/systemd/issues/7032 Steps to reproduce: * Check ownership with: ls -lnd /var/run/rdnssd * for a full reproduction it is necessary to setup a radvd with RDNSS configured and install rdnssd (via ndisc6) ion the client. |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:22 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/ndisc6/issues/1
Saturday, 25 November 2023, 20:22 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/ndisc6/issues/1
d /run/rdnssd 0755 99 root
In passwd nobody=99, but in /usr/lib/sysusers/basic.conf nobody=65534
systemd-tmpfiles uses basic.conf and ignores password. May be it can be fixed in nss switch.
A service running as "nobody" should not own nor write private files. Everything else is just broken. So if the service writes file... Fix it. Create a dedicated (or dynamic) user and use that.
$ cat /etc/tmpfiles.d/test.conf
f /tmp/demo - nobody nobody
$ getent passwd nobody
nobody:x:65530:65534:Nobody:/:/sbin/nologin
$ grep nobody /usr/lib/sysusers.d/basic.conf
# The nobody user for NFS file systems
u nobody 64534 "Nobody" -
So if it uses passwd it should set it to 65530 if it uses basic it should use 64534
$ ls -lan /tmp/demo
ls: cannot access '/tmp/demo': No such file or directory
# systemd-tmpfiles --create test.conf
$ ls -lan /tmp/demo
-rw-r--r-- 1 65534 65534 0 Jan 9 22:58 /tmp/demo
65534 so the value did not come from passwd or basic.conf
also causes issues such as this and
FS#56828