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

Re: setuid system() calls on Solaris 11

by dave_the_m (Monsignor)
on Jul 25, 2018 at 08:16 UTC ( [id://1219232]=note: print w/replies, xml ) Need Help??


in reply to setuid system() calls on Solaris 11

system() only invokes the shell if it has a single arg containing metachars (so it's relying on the shell to parse the command line). If you do that processing yourself, perl will execute the command directly. For example, change this first line to the second line:
system "foo -x 'a b' -y bar"; system "foo", "-x", "a b", "-y", "bar";

Dave.

Replies are listed 'Best First'.
Re^2: setuid system() calls on Solaris 11
by afoken (Chancellor) on Jul 25, 2018 at 16:27 UTC

    See also The problem of "the" default shell for the interactions of system and its friends with the default shell.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-18 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found