Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: setuid system() calls on Solaris 11

by dave_the_m (Monsignor)
on Jul 25, 2018 at 08:16 UTC ( #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 (Canon) 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
Node Status?
node history
Node Type: note [id://1219232]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2019-08-19 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (137 votes). Check out past polls.

    Notices?