BSD/OS with privsep

Markus Friedl markus at openbsd.org
Wed Jun 26 04:49:32 EST 2002


On Tue, Jun 25, 2002 at 10:17:24AM -0700, Kevin Steves wrote:
> On Tue, Jun 25, 2002 at 12:40:24PM +0200, Markus Friedl wrote:
> > +#if 0
> > +	/* XXX not ready, to heavy after chroot */
> >  	do_setusercontext(pw);
> > +#else
> > +	{
> > +		gid_t gidset[2];
> > +
> > +		gidset[0] = pw->pw_gid;
> > +		if (setgid(pw->pw_gid) < 0)
> > +			fatal("setgid failed for %u", pw->pw_gid );
> > +		if (setgroups(1, gidset) < 0)
> > +			fatal("setgroups: %.100s", strerror(errno));
> > +		permanently_set_uid(pw);
> > +	}
> > +#endif
> 
> this looks fine to me.

ok, i'm going to commit this.



More information about the openssh-unix-dev mailing list