Mercurial > masqmail
diff src/listen.c @ 332:63efd381e27b
refactoring, partly also related to set_euidgid()
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 27 Aug 2011 16:21:17 +0200 |
parents | fc1c6425c024 |
children | 41958685480d |
line wrap: on
line diff
--- a/src/listen.c Sat Aug 27 16:19:07 2011 +0200 +++ b/src/listen.c Sat Aug 27 16:21:17 2011 +0200 @@ -131,14 +131,7 @@ /* now that we have our socket(s), we can give up root privileges */ if (!conf.run_as_user) { - if (setegid(conf.mail_gid) != 0) { - logwrite(LOG_ALERT, "could not change gid to %d: %s\n", conf.mail_gid, strerror(errno)); - exit(1); - } - if (seteuid(conf.mail_uid) != 0) { - logwrite(LOG_ALERT, "could not change uid to %d: %s\n", conf.mail_uid, strerror(errno)); - exit(1); - } + set_euidgid(conf.mail_uid, conf.mail_gid, NULL, NULL); } /* sel_ret = 0; */