HomePhorge

(#8662) Break circular feature dependency
ccdd043ab309Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#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.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU384302af6dec: Merge branch 'backport-windows-work-to-2.7' into 2.7.x
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUccdd043ab309: (#8662) Break circular feature dependency (authored by Josh Cooper <josh@puppetlabs.com>).Aug 22 2011, 11:35 PM