diff options
author | Josh Cooper <josh@puppetlabs.com> | 2011-08-18 10:30:29 -0700 |
---|---|---|
committer | Josh Cooper <josh@puppetlabs.com> | 2011-08-22 14:35:31 -0700 |
commit | ccdd043ab309ca382dc949612d7efe3562adf5c5 (patch) | |
tree | 15c259016aa9c169adad06108a03137ab210ae78 /lib/puppet/parser/functions/generate.rb | |
parent | 384302af6dec8c51442f2f29a4c7c555379cd297 (diff) | |
download | puppet-ccdd043ab309ca382dc949612d7efe3562adf5c5.tar.gz puppet-ccdd043ab309ca382dc949612d7efe3562adf5c5.tar.xz puppet-ccdd043ab309ca382dc949612d7efe3562adf5c5.zip |
(#8662) Break circular feature dependency
The root feature was being evaluated prior to the microsoft_windows
feature being defined. On Windows, this had the side-effect of calling
Process.uid prior to the win32 sys/admin gem being loaded. And the
default ruby implementation of Process.uid always returns 0, which
caused Puppet.features.root? to always return true.
This commit reorders the syslog, posix, microsoft_windows, and root
features due to dependencies among them. This ensures the
microsoft_windows feature is defined prior to evaluating the root
feature.
As a result of this commit, the SUIDManager now calls the win32
sys/admin version of the Process.uid method, which returns the RID
component of the user's SID. As this is not 0, Puppet.features.root?
will now always return false on Windows. A future commit will fix
this, so that Puppet.feature.root? only returns true when running as
the Windows-equivalent of root.
Diffstat (limited to 'lib/puppet/parser/functions/generate.rb')
0 files changed, 0 insertions, 0 deletions