From: Erik Faye-Lund Date: Thu, 21 Oct 2010 22:04:32 GMT Subject: Re: [PATCH v4 15/15] daemon: opt-out on features that require posix Message-ID: In-Reply-To: On Fri, Oct 22, 2010 at 12:00 AM, Erik Faye-Lund wrote: >        if (user_name) { > -               pass = getpwnam(user_name); > -               if (!pass) > +               struct credentials c; > +               cred = &c; > + > +               c->pass = getpwnam(user_name); > +               if (!c->pass) >                        die("user not found - %s", user_name); > >                if (!group_name) > -                       gid = pass->pw_gid; > +                       c->gid = pass->pw_gid; >                else { > -                       group = getgrnam(group_name); > +                       struct group *group = getgrnam(group_name); >                        if (!group) >                                die("group not found - %s", group_name); > > -                       gid = group->gr_gid; > +                       c->gid = group->gr_gid; >                } >        } Sorry for the noise, but this is clearly incorrect and won't compile. I guess replacing "c->" with "c." should do the trick :) If I got this way, I'll obviously make sure it compiles! ;)