Skip to content

Commit 5bb61ac

Browse files
trefzerekohl
andcommitted
use File.chown, instead of File.send
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
1 parent 0f2d864 commit 5bb61ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/puppet/provider/openssl.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def owner
1313
end
1414

1515
def owner=(should)
16-
File.send(:chown, uid(should), nil, resource[:path])
16+
File.chown(uid(should), nil, resource[:path])
1717
rescue => detail
1818
raise Puppet::Error, _("Failed to set owner to '%{should}': %{detail}") % { should: should, detail: detail }, detail.backtrace
1919
end
@@ -27,7 +27,7 @@ def group
2727
end
2828

2929
def group=(should)
30-
File.send(:chown, nil, gid(should), resource[:path])
30+
File.chown(nil, gid(should), resource[:path])
3131
rescue => detail
3232
raise Puppet::Error, _("Failed to set group to '%{should}': %{detail}") % { should: should, detail: detail }, detail.backtrace
3333
end
@@ -47,8 +47,8 @@ def mode=(should)
4747
end
4848

4949
def set_file_perm(filename, owner = nil, group = nil, mode = nil)
50-
File.send(:chown, uid(owner), nil, filename) if owner
51-
File.send(:chown, nil, gid(group), filename) if group
50+
File.chown(uid(owner), nil, resource[:path]) if owner
51+
File.chown(nil, gid(group), resource[:path]) if group
5252
File.chmod(Integer('0' + mode), filename) if mode
5353
end
5454
end

0 commit comments

Comments
 (0)