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 Eugene Crosser

--- manu@... wrote:

> 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? 

Remember my patch for seteuid?  Here again, I think
that setregid is more portable than setegid.  And only
setgid exists on absolutely any system.  I think that
configure check should be added for setregid, setegid
and initgroups existence.

Eugene


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

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.