EvanKrall / puppet-initscript

Defined type for creating init scripts for a command
Apache License 2.0
6 stars 5 forks source link

Double-escape command for sysv_redhat? #9

Open EvanKrall opened 8 years ago

EvanKrall commented 8 years ago

The daemon function in redhat's /etc/init.d/functions apparently passes its arguments into a shell:

        # And start it up.
        if [ -z "$user" ]; then
           $cgroup $nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*"
        else
           $cgroup $nice runuser -s /bin/bash $user -c "$corelimit >/dev/null 2>&1 ; $*"
        fi

Yikes. We should probably be shellquoting twice.

EvanKrall commented 8 years ago

@hashbrowncipher I don't think this one is actually closed by #10