On Wed, Aug 5, 2009 at 4:10 AM, Toni Mueller<openbsd-m...@oeko.net> wrote: > On Sat, 01.08.2009 at 17:13:43 +0300, Jussi Peltola <pe...@pelzi.net> wrote: >> Why should fork touch user id's? > > I was under the impression that only the effective userid should be > inherited by a forked process, not the real user id.
Make a note that whatever source of information you got that from was wrong and should not be trusted. I suggest you read W. Richard Stevens's "Advanced Programming in the UNIX Environment". >> http://search.cpan.org/~tlbdk/Privileges-Drop-1.01/lib/Privileges/Drop.pm > > Thanks for the hint. Not knowing about that, I so far assigned to both > uid and gid variables, and that seemed to do the trick. Did you set $) to a string containing more than one number? If not, you're still wrong and should strongly consider using the module, which has been tested by others. Philip Guenther