redhat-openstack / puppet-pacemaker

Puppet modules to manage pacemaker with corosync
9 stars 25 forks source link

Unescaped password passed as argument to /bin/echo #43

Open jrusnack opened 9 years ago

jrusnack commented 9 years ago

https://github.com/redhat-openstack/puppet-pacemaker/blob/5d91343c80f65b64be604f4a61558ff408c0f863/manifests/corosync.pp#L56

exec {"Set password for hacluster user on $cluster_name":
  command => "/bin/echo ${::pacemaker::hacluster_pwd} | /usr/bin/passwd --stdin hacluster",

The value of ::pacemaker::hacluster_pwd is passed as command line argument to /bin/echo. This has 2 unintended consequences:

Acknowledgement: this issue was found by Florian Weimer of Red Hat.