Re: [patch] Avoid change of permissions in /etc/resolv.conf

2023-04-22 Thread Juan Picca
Hi Stuart > I'd suggest targetting the umask setting, either by giving all users > class 'staff' or adding a new one which inherits from default. Thanks for your explanations. > This is a sensitive file. Keep a root shell open when modifying and > don't close it until tested, there are various w

Re: [patch] Avoid change of permissions in /etc/resolv.conf

2023-04-21 Thread Juan Picca
> I'm saying you will find this "problem" in 100 places, because the real > problem is your own change. Yes, you are right. The change that gives the error correctly infered by you and Stuart: --- /etc/login.conf.orig +++ /etc/login.conf @@ -40,7 +40,7 @@ # default:\ :path=/usr/bin /bin

Re: [patch] Avoid change of permissions in /etc/resolv.conf

2023-04-20 Thread Juan Picca
On Thu, Apr 20, 2023 at 11:33:30PM -0600, Theo de Raadt wrote: > But this situation does not arise, not in this program, and not in 20 other > daemons. > > You changed something to cause this problem. Yes. I found a similar case in https://cvsweb.openbsd.org/src/usr.sbin/pkg_add/OpenBSD/AddDelete

[patch] Avoid change of permissions in /etc/resolv.conf

2023-04-20 Thread Juan Picca
Force a standard umask in /sbin/resolvd/resolvd.c. If not done and the default mask is a restrictive one, /etc/resolv.conf ends up not readable. Regards, JMPC diff --git sbin/resolvd/resolvd.c sbin/resolvd/resolvd.c index 2ffdfc6ddb4..133559819f6 100644 --- sbin/resolvd/resolvd.c +++ sbin/resolvd/