unbound crashes on bootup
Jean-Sébastien Pédron
dumbbell at FreeBSD.org
Wed Feb 11 18:06:14 UTC 2015
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 = getpwnam(cfg->username)) == NULL)
log_err("user '%s' does not exist.", cfg->username);
cfg->uid = 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)?
--
Jean-Sébastien Pédron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20150211/371c91af/attachment.sig>
More information about the freebsd-current
mailing list