ribasushi has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,
I need to make a program of mine suid root. The reason being Net::Ping's icmp ping requires root privs, so the justifications are all there. When about to install the perl-suid debian package I saw the following annotation:

Usage of this program is now strongly deprecated upstream and support (along with this package) will probably be removed in 5.10.

It confused me and I searched more on the subject, but could not find any mention of alternatives to perl-suid. So my question is - what is the right way to do this kind of thing in this day and age?

Replies are listed 'Best First'.
Re: Question about suid root perl programs
by sgt (Deacon) on Feb 05, 2007 at 21:52 UTC

    You could use sudo. Sometimes a C wrapper can help too. In your case can you use the system ping?

    hth --stephan
Re: Question about suid root perl programs
by shmem (Chancellor) on Feb 06, 2007 at 07:38 UTC
    I have given advice on how to make a C warpper in a previous post. Perhaps that suits you.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}