@@ -40,12 +40,11 @@ def retrieve
40
40
end
41
41
42
42
def retrieve_default_context ( property )
43
- return nil if Puppet ::Util ::Platform . windows?
44
43
if @resource [ :selinux_ignore_defaults ] == :true
45
44
return nil
46
45
end
47
46
48
- context = get_selinux_default_context_with_handle ( @resource [ :path ] , provider . class . selinux_handle )
47
+ context = get_selinux_default_context ( @resource [ :path ] , @resource [ :ensure ] )
49
48
unless context
50
49
return nil
51
50
end
@@ -86,7 +85,7 @@ def sync
86
85
end
87
86
88
87
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
90
89
supply defaults for the SELinux attributes (seluser, selrole,
91
90
seltype, and selrange). In general, you should leave this set at its
92
91
default and only set it to true when you need Puppet to not try to fix
@@ -99,7 +98,7 @@ def sync
99
98
Puppet ::Type . type ( :file ) . newproperty ( :seluser , :parent => Puppet ::SELFileContext ) do
100
99
desc "What the SELinux user component of the context of the file should be.
101
100
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
103
102
the file, if any exists. Only valid on systems with SELinux support
104
103
enabled."
105
104
@@ -110,7 +109,7 @@ def sync
110
109
Puppet ::Type . type ( :file ) . newproperty ( :selrole , :parent => Puppet ::SELFileContext ) do
111
110
desc "What the SELinux role component of the context of the file should be.
112
111
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
114
113
the file, if any exists. Only valid on systems with SELinux support
115
114
enabled."
116
115
@@ -121,7 +120,7 @@ def sync
121
120
Puppet ::Type . type ( :file ) . newproperty ( :seltype , :parent => Puppet ::SELFileContext ) do
122
121
desc "What the SELinux type component of the context of the file should be.
123
122
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
125
124
the file, if any exists. Only valid on systems with SELinux support
126
125
enabled."
127
126
@@ -133,7 +132,7 @@ def sync
133
132
desc "What the SELinux range component of the context of the file should be.
134
133
Any valid SELinux range component is accepted. For example `s0` or
135
134
`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
137
136
SELinux support enabled and that have support for MCS (Multi-Category
138
137
Security)."
139
138
0 commit comments