Hi!

> I had a look in the code lately and it seems like this part is very
> much abstracted.

Indeed. Before submitting this bug report, I tried to follow the
function calls from theĀ puppet/lib/puppet/provider/exec/posix.rb file,
but got lost at some point.

> I expect this to be the culprit:
> https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/execution.rb#L273

I can't really say if this is the source of the bug, but it highlights
an important problem: The "posix" provider should really require the
value of the "command" parameter to be an array, or at the very least
have (very!) clear semantics on how a string value will be split up
into its components.

> It seems like this behavior broke at some point without anyone
> noticing.

Yeah. BTW: I guess that the "shell" provider is also currently broken,
since theĀ puppet/lib/puppet/provider/exec/shell.rb file
simply uses this

        super(['/bin/sh', '-c', command], check)

If there's another shell further down the function stack, this means
that the command string has to be escaped twice...

> I also bet it hasn't been fixed in Puppet 4 either. Have you already
> forwarded that bug to Puppetlabs?

No, I haven't, since I wasn't sure if this is Debian-specific (or maybe
just me not understanding the documentation correctly).

Best regards

Alexander Kurtz

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to