@@ -40,12 +40,11 @@ def retrieve
4040 end
4141
4242 def retrieve_default_context ( property )
43- return nil if Puppet ::Util ::Platform . windows?
4443 if @resource [ :selinux_ignore_defaults ] == :true
4544 return nil
4645 end
4746
48- context = get_selinux_default_context_with_handle ( @resource [ :path ] , provider . class . selinux_handle )
47+ context = get_selinux_default_context ( @resource [ :path ] , @resource [ :ensure ] )
4948 unless context
5049 return nil
5150 end
@@ -86,7 +85,7 @@ def sync
8685 end
8786
8887 Puppet ::Type . type ( :file ) . newparam ( :selinux_ignore_defaults ) do
89- desc "If this is set then Puppet will not ask SELinux (via selabel_lookup ) to
88+ desc "If this is set then Puppet will not ask SELinux (via matchpathcon ) to
9089 supply defaults for the SELinux attributes (seluser, selrole,
9190 seltype, and selrange). In general, you should leave this set at its
9291 default and only set it to true when you need Puppet to not try to fix
@@ -99,7 +98,7 @@ def sync
9998 Puppet ::Type . type ( :file ) . newproperty ( :seluser , :parent => Puppet ::SELFileContext ) do
10099 desc "What the SELinux user component of the context of the file should be.
101100 Any valid SELinux user component is accepted. For example `user_u`.
102- If not specified it defaults to the value returned by selabel_lookup for
101+ If not specified it defaults to the value returned by matchpathcon for
103102 the file, if any exists. Only valid on systems with SELinux support
104103 enabled."
105104
@@ -110,7 +109,7 @@ def sync
110109 Puppet ::Type . type ( :file ) . newproperty ( :selrole , :parent => Puppet ::SELFileContext ) do
111110 desc "What the SELinux role component of the context of the file should be.
112111 Any valid SELinux role component is accepted. For example `role_r`.
113- If not specified it defaults to the value returned by selabel_lookup for
112+ If not specified it defaults to the value returned by matchpathcon for
114113 the file, if any exists. Only valid on systems with SELinux support
115114 enabled."
116115
@@ -121,7 +120,7 @@ def sync
121120 Puppet ::Type . type ( :file ) . newproperty ( :seltype , :parent => Puppet ::SELFileContext ) do
122121 desc "What the SELinux type component of the context of the file should be.
123122 Any valid SELinux type component is accepted. For example `tmp_t`.
124- If not specified it defaults to the value returned by selabel_lookup for
123+ If not specified it defaults to the value returned by matchpathcon for
125124 the file, if any exists. Only valid on systems with SELinux support
126125 enabled."
127126
@@ -133,7 +132,7 @@ def sync
133132 desc "What the SELinux range component of the context of the file should be.
134133 Any valid SELinux range component is accepted. For example `s0` or
135134 `SystemHigh`. If not specified it defaults to the value returned by
136- selabel_lookup for the file, if any exists. Only valid on systems with
135+ matchpathcon for the file, if any exists. Only valid on systems with
137136 SELinux support enabled and that have support for MCS (Multi-Category
138137 Security)."
139138
0 commit comments