Feature #327
closedpaths and inconsistent sudo usage
Description
vendor/plugins/proxy/lib/proxy.rb is the file that provides some (minimal) sudo support, as well as puppetrun support.
For the puppetrun support, there is no way I can see to pass in either an explicit path, or a search path. For those of us running Solaris and using the ruby that comes with Sun's webstack, puppetrun is /var/opt/webstack/ruby/1.8/gem_home/bin/puppetrun. That's not going to work with the current code.
Further, sudo in my case is in /usr/local/bin, which is not searched.
Also, a little farther down in there, Foreman has a hard-coded "/usr/bin/sudo -S #{@sbin}/puppetca --clean #{fqdn}< /dev/null", which is inconsistent.
I would propose that sudo be a configurable setting that takes "true", "false", or an explicit path to sudo (which would be equivalent to true). If "false" is used, no attempt to use sudo would be made (for those of us running foreman as the puppet user).
Likewise, I would suggest that the puppetrun configuration setting be extended to take a full path as well as the current true/false.
Updated by Ohad Levy over 13 years ago
- Status changed from New to Closed
this part has been rewritten and moved to the smart proxy code.
it can search for multiple paths, and respect the ENV path.
the legacy code (within vendor/proxy) still exists but will be removed within the next major version.