Bug 647 - Crash after reloading unbound 1.5.2
Crash after reloading unbound 1.5.2
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
1.5.2
Other FreeBSD
: P5 enhancement
Assigned To: unbound team
: 651 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-20 15:39 CET by Artem
Modified: 2015-03-09 09:07 CET (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artem 2015-02-20 15:39:03 CET
Unbound crashes when try to send SIGHUP
Problem occurs in util/config_file.c (1213):

1207 #ifdef HAVE_GETPWNAM
1208         /* translate username into uid and gid */
1209         if(cfg->username && cfg->username[0]) {
1210                 struct passwd *pwd;
1211                 if((pwd = getpwnam(cfg->username)) == NULL)
1212                         log_err("user '%s' does not exist.", cfg->username);
1213                 cfg->uid = pwd->pw_uid;
1214                 cfg->gid = pwd->pw_gid;
1215         }

If a copy of /etc/pwd.db is placed in working directory, the crash does not happen
Comment 1 Wouter Wijngaards 2015-02-20 15:49:06 CET
Hi Artem,

Thank you for the bug report.  I have fixed this in svn trunk, it looks up the values once at startup like it did before. (the chroot is causing the issue, with chroot: "" it would workaround the issue).

Best regards,
   Wouter
Comment 2 Wouter Wijngaards 2015-03-09 09:07:46 CET
*** Bug 651 has been marked as a duplicate of this bug. ***