Issue #4224 has been updated by Andrew  Parker.

Target version deleted (2.7.x)


----------------------------------------
Bug #4224: vardir and confdir should be in ~/.puppet if not run as root
https://projects.puppetlabs.com/issues/4224#change-73327

Author: Matt Robinson
Status: Closed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: defaults settings
Branch: 


There's currently logic (which_dir) in lib/puppet/util/run_mode.rb that uses 
/var/lib/puppet and /etc/puppet if you're running puppetmaster regardless of if 
you're running it as root.  James agrees this is not correct behavior.  I guess 
the logic at some point was that if you're running puppetmaster you must need 
root.  That seems backwards to me since master doesn't really need root, except 
to maybe switch to run as the puppet user, and if anything this logic should 
apply to the agent, but perhaps not even then.

      def var_dir
        which_dir(
          (Puppet.features.microsoft_windows? ? File.join(Dir::WINDOWS, 
"puppet", "var") : "/var/lib/puppet"),
          "~/.puppet/var"
        )
      end

      def which_dir( global, user )
        #FIXME: we should test if we're user "puppet"
        #       there's a comment that suggests that we do that
        #       and we currently don't.
        expand_path case
          when name == :master; global
          when Puppet.features.root?; global
          else user
        end
      end



-- 
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