summaryrefslogtreecommitdiff
path: root/lib/chef/file_access_control
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-03-23 13:05:13 +0000
committerTim Smith <tsmith@chef.io>2018-03-26 10:34:39 -0700
commit97c1dd6f1cac6d97e85d05039cad8b28596141ba (patch)
treed8a97c0f7016986a2cc264aa50ae345638ed026c /lib/chef/file_access_control
parent1b81f35e023bcdc87e410c641545e849298de5c3 (diff)
downloadchef-97c1dd6f1cac6d97e85d05039cad8b28596141ba.tar.gz
mechanical conversion of most debug log statements to trace
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/file_access_control')
-rw-r--r--lib/chef/file_access_control/unix.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/chef/file_access_control/unix.rb b/lib/chef/file_access_control/unix.rb
index ee96bf5045..5d674c2c32 100644
--- a/lib/chef/file_access_control/unix.rb
+++ b/lib/chef/file_access_control/unix.rb
@@ -79,18 +79,18 @@ class Chef
def should_update_owner?
if target_uid.nil?
# the user has not specified a permission on the new resource, so we never manage it with FAC
- Chef::Log.debug("Found target_uid == nil, so no owner was specified on resource, not managing owner")
+ Chef::Log.trace("Found target_uid == nil, so no owner was specified on resource, not managing owner")
false
elsif current_uid.nil?
# the user has specified a permission, and we are creating a file, so always enforce permissions
- Chef::Log.debug("Found current_uid == nil, so we are creating a new file, updating owner")
+ Chef::Log.trace("Found current_uid == nil, so we are creating a new file, updating owner")
true
elsif target_uid != current_uid
# the user has specified a permission, and it does not match the file, so fix the permission
- Chef::Log.debug("Found target_uid != current_uid, updating owner")
+ Chef::Log.trace("Found target_uid != current_uid, updating owner")
true
else
- Chef::Log.debug("Found target_uid == current_uid, not updating owner")
+ Chef::Log.trace("Found target_uid == current_uid, not updating owner")
# the user has specified a permission, but it matches the file, so behave idempotently
false
end
@@ -138,18 +138,18 @@ class Chef
def should_update_group?
if target_gid.nil?
# the user has not specified a permission on the new resource, so we never manage it with FAC
- Chef::Log.debug("Found target_gid == nil, so no group was specified on resource, not managing group")
+ Chef::Log.trace("Found target_gid == nil, so no group was specified on resource, not managing group")
false
elsif current_gid.nil?
# the user has specified a permission, and we are creating a file, so always enforce permissions
- Chef::Log.debug("Found current_gid == nil, so we are creating a new file, updating group")
+ Chef::Log.trace("Found current_gid == nil, so we are creating a new file, updating group")
true
elsif target_gid != current_gid
# the user has specified a permission, and it does not match the file, so fix the permission
- Chef::Log.debug("Found target_gid != current_gid, updating group")
+ Chef::Log.trace("Found target_gid != current_gid, updating group")
true
else
- Chef::Log.debug("Found target_gid == current_gid, not updating group")
+ Chef::Log.trace("Found target_gid == current_gid, not updating group")
# the user has specified a permission, but it matches the file, so behave idempotently
false
end
@@ -187,20 +187,20 @@ class Chef
def should_update_mode?
if target_mode.nil?
# the user has not specified a permission on the new resource, so we never manage it with FAC
- Chef::Log.debug("Found target_mode == nil, so no mode was specified on resource, not managing mode")
+ Chef::Log.trace("Found target_mode == nil, so no mode was specified on resource, not managing mode")
false
elsif current_mode.nil?
# the user has specified a permission, and we are creating a file, so always enforce permissions
- Chef::Log.debug("Found current_mode == nil, so we are creating a new file, updating mode")
+ Chef::Log.trace("Found current_mode == nil, so we are creating a new file, updating mode")
true
elsif target_mode != current_mode
# the user has specified a permission, and it does not match the file, so fix the permission
- Chef::Log.debug("Found target_mode != current_mode, updating mode")
+ Chef::Log.trace("Found target_mode != current_mode, updating mode")
true
elsif suid_bit_set? && (should_update_group? || should_update_owner?)
true
else
- Chef::Log.debug("Found target_mode == current_mode, not updating mode")
+ Chef::Log.trace("Found target_mode == current_mode, not updating mode")
# the user has specified a permission, but it matches the file, so behave idempotently
false
end