Re: [Puppet-dev] Facter path to external executables

2012-05-18 Thread Chris Price
Just as a heads up--there have been some minor changes to that code in puppet over the last few months. (Particularly, some special handling of the case where the "~" character appears in the user's PATH.) I am not sure if these changes are relevant to facter (because I don't think Facter is doin

Re: [Puppet-dev] Facter path to external executables

2012-05-18 Thread Ken Barber
Yeah - I think it was based on your advice KW. Stephen is awesome when it comes to this kind of stuff. On Fri, May 18, 2012 at 11:29 AM, Krzysztof Wilczynski wrote: > Hi, > > > On Friday, May 18, 2012 10:30:18 AM UTC+1, Ken Barber wrote: >> >> Did you see the re-implementation of 'which' that Ste

Re: [Puppet-dev] Facter path to external executables

2012-05-18 Thread Krzysztof Wilczynski
Hi, On Friday, May 18, 2012 10:30:18 AM UTC+1, Ken Barber wrote: > > Did you see the re-implementation of 'which' that Stephen Schulte is > working on here? > > https://github.com/puppetlabs/facter/pull/189 > Nice one Ken! Stephen's implementation looks really nice! Definitely, a +1 :) KW

Re: [Puppet-dev] Facter path to external executables

2012-05-18 Thread Ken Barber
Did you see the re-implementation of 'which' that Stephen Schulte is working on here? https://github.com/puppetlabs/facter/pull/189 Its taken from Puppet to a certain extent I believe, with some backwards compatible handling that we thought we might need as well to handle existing custom fact ass

Re: [Puppet-dev] Facter path to external executables

2012-05-17 Thread Jeff Weiss
I think the argument against 'which' is that we are implicitly trusting the users' $PATH, which may be a security vulnerability. We could certainly sanitize $PATH by removing relative directories (the same way we have for the fact search path), and that gets us part of the way there, but I'm not c

Re: [Puppet-dev] Facter path to external executables

2012-05-17 Thread Chris Price
We have an implementation of "which" in puppet, and, IMO, it would make sense for both projects to share the same code and logic for this. However, our project structure doesn't currently lend itself to that. If you do decide to implement a 'which', you might just copy the one from puppet. I'm n

[Puppet-dev] Facter path to external executables

2012-05-17 Thread Hailee Kenney
There seems to be a lot of Facter tickets that stem from a similar issue: finding the correct executable. Here are just a few examples: https://projects.puppetlabs.com/issues/5013 https://projects.puppetlabs.com/issues/13396 https://projects.puppetlabs.com/issues/13678 https://projects.puppetlabs.