Re: unveil error - src/usr.bin/passwd/local_passwd.c (-current)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: unveil error - src/usr.bin/passwd/local_passwd.c (-current)

Ricardo Mestre-2
Hi Mark,

Thanks for the report, don't know how I missed it but it's now fixed.

On 16:20 Thu 08 Nov     , Mark Patruck wrote:

> Hi Ricardo,
>
> when running
>
> $ passwd
>
> with src/usr.bin/passwd/local_passwd.c v1.54
>
> i see the following error in /var/log/messages
>
> passwd: cannot stat /etc/login.conf: No such file or directory
>
> With the following diff, the error disappears
>
> Index: local_passwd.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/passwd/local_passwd.c,v
> retrieving revision 1.54
> diff -u -p -r1.54 local_passwd.c
> --- local_passwd.c      25 Oct 2018 06:41:38 -0000      1.54
> +++ local_passwd.c      8 Nov 2018 15:17:40 -0000
> @@ -76,6 +76,8 @@ local_passwd(char *uname, int authentica
> err(1, "unveil");
> if (unveil(_PATH_MASTERPASSWD, "r") == -1)
> err(1, "unveil");
> + if (unveil(_PATH_LOGIN_CONF, "r") == -1)
> + err(1, "unveil");
> if (unveil(_PATH_BSHELL, "x") == -1)
> err(1, "unveil");
> if (unveil(_PATH_PWD_MKDB, "x") == -1)
>
>
>
> --
> Mark Patruck ( mark at wrapped.cx )
> GPG key 0xF2865E51 / 187F F6D3 EE04 1DCE 1C74  F644 0D3C F66F F286 5E51
>
> http://www.wrapped.cx