Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-13 23:57 UTC

Message

Re: [milter-greylist] RH initscript issues

2005-02-03 by manu@netbsd.org

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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.