Issue #14123 has been updated by Daniel Pittman.

Category set to Doh!
Status changed from Unreviewed to In Topic Branch Pending Review
Target version set to 2.7.x
Branch set to https://github.com/puppetlabs/puppet/pull/700

https://github.com/puppetlabs/puppet/pull/700 fixes this - instead of 
exploding, which is Ruby's default behaviour, we just skip over that failing 
bit of the path and carry on.  That seems, to me, the most sane scenario.  I 
honestly don't think the interpolation is well defined anywhere, but if Ruby is 
going to do it, and we support that, we should fail well.

Thanks to everyone involved for the quick response.  I don't expect this to 
make 2.7.14, but it should be in 2.7.15 unless something unexpected crops up.
----------------------------------------
Bug #14123: Crash and bad error message for subcommands if PATH includes 
components with tilde expansion of missing users
https://projects.puppetlabs.com/issues/14123#change-61261

Author: Stig Sandbeck Mathisen
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: 
Category: Doh!
Target version: 2.7.x
Affected Puppet version: 
Keywords: 
Branch: https://github.com/puppetlabs/puppet/pull/700


If path contains an entry where tilde expansion refers to a missing user, 
puppet subcommands crash.  

The original bug report at http://bugs.debian.org/669650 refers to "puppet 
help", but it also applies to "puppet agent", "puppet master", "puppet 
resource", etc...

To reproduce (ensure that user "foobar" does not exist):
<pre>
$ env PATH=~foobar/:$PATH puppet agent
/usr/lib/ruby/1.8/puppet/util.rb:173:in `expand_path': user foobar doesn't 
exist (ArgumentError)
        from /usr/lib/ruby/1.8/puppet/util.rb:173:in `which'
        from /usr/lib/ruby/1.8/puppet/util.rb:172:in `each'
        from /usr/lib/ruby/1.8/puppet/util.rb:172:in `which'
        from /usr/lib/ruby/1.8/puppet/defaults.rb:783
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in 
`gem_original_require'
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in 
`require'
        from /usr/lib/ruby/1.8/puppet.rb:99
        from /usr/lib/ruby/1.8/puppet/application.rb:272:in `require'
        from /usr/lib/ruby/1.8/puppet/application.rb:272:in `initialize'
        from /usr/lib/ruby/1.8/puppet/util/command_line.rb:60:in `new'
        from /usr/lib/ruby/1.8/puppet/util/command_line.rb:60:in `execute'
        from /usr/bin/puppet:4
</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to