Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Question about suid root perl programs

by ribasushi (Pilgrim)
on Feb 05, 2007 at 21:36 UTC ( [id://598418]=perlquestion: print w/replies, xml ) Need Help??

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}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://598418]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-24 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found