Bug 647

Summary: Crash after reloading unbound 1.5.2
Product: unbound Reporter: Artem <artem>
Component: serverAssignee: unbound team <unbound-team>
Status: RESOLVED FIXED    
Severity: enhancement CC: brebs, wouter
Priority: P5    
Version: 1.5.2   
Hardware: Other   
OS: FreeBSD   

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. ***