Issue #1630 has been reported by emerose.

----------------------------------------
Feature #1630: exec type should allow passing of arguments as an array rather 
than a string
http://projects.reductivelabs.com/issues/show/1630

Author: emerose
Status: Unreviewed
Priority: Normal
Assigned to: 
Category: 
Target version: 
Complexity: Unknown
Affected version: 0.24.4
Keywords: 


The exec type takes commands and arguments as a string, (@"echo foo"@) which 
will then get passed to /bin/sh (@sh -c "echo foo"@) by Kernel#system.

This can make things pretty awkward if the command you're trying to execute 
contains shell metacharacters or quotes of its own, and under appropriately 
pathological conditions could even be a security problem...  (username '"&&rm 
-rf /' or something?  *shrug*)

It'd be grand if the exec type would support passing things around as arrays.  
eg:
<pre>
exec {"example":
  command => "/bin/echo",
  arguments => ["*", "yay", "*"],
}
</pre>
(Passing an array to Kernel#system bypasses the shell completely: 
http://www.ruby-doc.org/core/classes/Kernel.html#M005982)

-sq


----------------------------------------
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to