diff options
author | Prajakta Purohit <prajakta@chef.io> | 2022-09-27 10:44:28 -0700 |
---|---|---|
committer | Prajakta Purohit <prajakta@chef.io> | 2022-09-27 10:44:28 -0700 |
commit | aa5116217da7e0dbe7ecf021cdf2c35bda8dbe9e (patch) | |
tree | 0327cc9b6ac66e995376bb34fef31e996f28d61e | |
parent | 3dde0a01269c97bf53095fc4e610d26e8813a65d (diff) | |
download | chef-neha-p6/INFC-178-fix-aix-ruby-shadow.tar.gz |
why_run framework expects that the libraries that should not run on a platform will never be loaded onto the platform. Adding some details related to require shadow to the user provider for the AIX platform.neha-p6/INFC-178-fix-aix-ruby-shadow
Signed-off-by: Prajakta Purohit <prajakta@chef.io>
-rw-r--r-- | lib/chef/provider/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user.rb b/lib/chef/provider/user.rb index 44cdca5553..6a4bfc1225 100644 --- a/lib/chef/provider/user.rb +++ b/lib/chef/provider/user.rb @@ -66,7 +66,7 @@ class Chef end current_resource.comment(user_info.gecos) - # NOTE: The if condition `new_resource.password && current_resource.password == "x"` needs to be checked first so that `require "shadow"`` is not run on AIX, which will result in spec failures. + # NOTE: The if condition `new_resource.password && current_resource.password == "x"` needs to be checked first so that `require "shadow"`` is not run on AIX, which will result in spec failures in why_run. define_resource_requirements assumes that the libraries not supported on a platform will never load on it. i.e: ruby_shadow should never be loaded on AIX platform. Ref error: https://buildkite.com/chef/chef-chef-main-omnibus-release/builds/1667#51867452-352c-45ff-b402-9518d88c7d8d # On AIX platforms ruby_shadow does not work as it does not store encrypted passwords in the /etc/passwd file but in /etc/security/passwd file. # Ruby's ETC.getpwnam also makes use of /etc/passwd file (https://github.com/ruby/etc/blob/master/ext/etc/etc.c), which returns "x" for a nil password, whereas # on AIX it returns a "*" (https://www.ibm.com/docs/bg/aix/7.2?topic=passwords-using-etcpasswd-file) |