diff options
Diffstat (limited to 'daemon/unbound.c')
-rw-r--r-- | daemon/unbound.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/unbound.c b/daemon/unbound.c index cd08c9c3f1854..28ea17355bf10 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -521,7 +521,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode, /* setusercontext does initgroups, setuid, setgid, and * also resource limits from login config, but we * still call setresuid, setresgid to be sure to set all uid*/ - if(setusercontext(NULL, pwd, uid, + if(setusercontext(NULL, pwd, uid, (unsigned) LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0) log_warn("unable to setusercontext %s: %s", cfg->username, strerror(errno)); @@ -714,6 +714,7 @@ main(int argc, char* argv[]) #endif log_init(NULL, 0, NULL); + log_ident_set(strrchr(argv[0],'/')?strrchr(argv[0],'/')+1:argv[0]); /* parse the options */ while( (c=getopt(argc, argv, "c:dhvw:")) != -1) { switch(c) { |