Fixed like Maciej did.

git-svn-id: file:///svn/unbound/trunk@3376 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2015-03-23 20:42:47 +00:00
parent bd404f5fd3
commit e3994c1273

View file

@ -1218,9 +1218,7 @@ void config_lookup_uid(struct config_file* cfg)
/* translate username into uid and gid */
if(cfg->username && cfg->username[0]) {
struct passwd *pwd;
if((pwd = getpwnam(cfg->username)) == NULL)
log_err("user '%s' does not exist.", cfg->username);
else {
if((pwd = getpwnam(cfg->username)) != NULL) {
cfg_uid = pwd->pw_uid;
cfg_gid = pwd->pw_gid;
}