Enrico Scholz <greylist-milter@...> wrote:
> + if (initgroups(conf.c_user, pw->pw_gid) != 0) {
> + syslog(LOG_ERR, "%s: can not change supplementary groups: %s\n",
> + argv[0], strerror(errno));
> + exit(EX_OSERR);
> + }
> +
> + if (setgid(pw->pw_gid) != 0 ||
> + setegid(pw->pw_gid) != 0) {
> + syslog(LOG_ERR, "%s: cannot change GID: %s\n",
> + argv[0], strerror(errno));
> + exit(EX_OSERR);
> + }
> +
I'm ready to commit that, but I'm concerned about initgroups() not being
portable. Any input on that? How should it work on systems without
initgroups?
--
Emmanuel Dreyfus
Un bouquin en français sur BSD:
http://www.eyrolles.com/Informatique/Livre/9782212114638/livre-bsd.php
manu@netbsd.orgMessage
Re: [milter-greylist] RH initscript issues
2005-02-03 by manu@netbsd.org
Attachments
- No local attachments were found for this message.