Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2015 19:06:04 +0100
From:      =?windows-1252?Q?Jean-S=E9bastien_P=E9dron?= <dumbbell@FreeBSD.org>
To:        freebsd-current@freebsd.org
Subject:   Re: unbound crashes on bootup
Message-ID:  <54DB9A0C.1010806@FreeBSD.org>
In-Reply-To: <1264.1423227963@critter.freebsd.dk>
References:  <1264.1423227963@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--gBsnx3NctEGr71F9p6j2N52KkERfEUbMp
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 06.02.2015 14:06, Poul-Henning Kamp wrote:
> I just updated my -current to r278283, and unbound (still) croaks
> during bootup:

Hi!

I have a similar problem. Also, unbound crashes each time I start/stop
OpenVPN. I suppose the problem is the same in both cases.

The crash happens in the config_lookup_uid() in
contrib/unbound/util/config_file.c. Here's the code:

    struct passwd *pwd;
    if((pwd =3D getpwnam(cfg->username)) =3D=3D NULL)
        log_err("user '%s' does not exist.", cfg->username);
    cfg->uid =3D pwd->pw_uid;

getpwnam(3) returns NULL: an error message is logged but the function
doesn't return. Therefore, the program segfaults on "pwd->pw_uid" on the
next line.

But why did getpwnam(3) return NULL in the first place? It looks for the
"unbound" user which exists. getpwnam() calls _nsdispatch() which fails.

I have the default nsswitch.conf. I didn't look at the problem more
deeply yet, but could getpwnam()/_nsdispatch() be unhappy with the
absence of a working DNS resolver (unbound is being (re)started)?

--=20
Jean-S=E9bastien P=E9dron


--gBsnx3NctEGr71F9p6j2N52KkERfEUbMp
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJU25oUXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz
OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMLusP/3LeUB1r1tsTtCeCriyckQ0d
HQQBD+ixL4tyhrcqB2PSxNP7f+zQaPxu5bDhBGxtZj8l5yD3Kf2gXw0TaKqK+sAW
WpStLDbGOLUDqdR3h9jvtpOTWmfAXHsISflndks1xXQaJuGrtscyEis2QpGfQNHP
ptR2s44MOEUZRW6Uu7Yk+YGa740PWcmJRTNUkeIv8s9gLURodZrOddT7PVBcdHUc
qjhQ/5TMHGxVrtnQHu8ty2acQq8ZWsKKmIE9ybhAgoMg/r4MOP8DSxs2ZgkrKUlp
Vvok55MVnR/TShGwTuxxNaTxGWrb9sS+zG1n4YR3PBQgGUEjPTnjo3ER9xh+oRIO
W3enqq0vjEacQA9BRz0IqMKfc8EV1+zfeGZEjNuRObwIQJmibpXZ5jXb0za2MccM
PFFGnbEuWivZ7H72unSIWyKCEZ/BZwNVACPj/CzuSxtrgoo8wJTtfdEzi0GALSLS
WQaIwj8wxWMtMlpLpDzFmJtxafLZhu5XywaSELn9V6mgVy6Tni+IEPcRoKrvfWGY
hVZRQrcZu86VFdR5+JpY7Q9btZT5SXoazcTrKdew5n0C+svEcShnw89+vkp5faRX
Mzyl6zvKr41P223EVqtaR9es7O2pnFc/ZhaImE/sp2ieG5zZHtOJboJRGvEjuOpe
ltIesC50BPwCszM6mOHu
=jToW
-----END PGP SIGNATURE-----

--gBsnx3NctEGr71F9p6j2N52KkERfEUbMp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54DB9A0C.1010806>