Hello,

I hope I don't ask somtething too stupid,
but I'm trying to port a C-program to Perl
and for the drop privileges part of it I'd
need to call setresuid().

The following test at 4.3 returns a failure though:

$ perl -M'POSIX qw(setresuid)' -e 1
"setresuid" is not exported by the POSIX module
Can't continue after import errors at
/usr/libdata/perl5/i386-openbsd/5.8.8/POSIX.pm line 19
BEGIN failed--compilation aborted.

The perl config script does find
the setresuid during a "make build":
...
setpwent() found.
setpwent_r() NOT found.
setregid() found.
setresgid() found.
setreuid() found.
setresuid() found.
setrgid() NOT found.
...

So why isn't it used by perl then?

Is there a safe way to drop root
privileges in a Perl-script at OpenBSD?

Several resources at the net tell
that $< and $> can't be used for the
purpose because they are cached

Regards
Alex

Reply via email to