puppet-09-role-shell.patch revision 4856
4856N/AIn-house patch to fix upstream bug PUP-5234 which adds attrible "shell" to the user provider.
4856N/Ahttps://tickets.puppetlabs.com/browse/PUP-5234
4856N/AThe patch has been submitted upstream but not yet accepted.
4856N/A
4856N/A--- puppet-3.6.2/lib/puppet/provider/user/user_role_add.rb.orig Thu Jul 30 22:51:24 2015
4856N/A+++ puppet-3.6.2/lib/puppet/provider/user/user_role_add.rb Mon Aug 3 23:22:44 2015
4856N/A@@ -12,6 +12,7 @@
4856N/A options :home, :flag => "-d", :method => :dir
4856N/A options :comment, :method => :gecos
4856N/A options :groups, :flag => "-G"
4856N/A+ options :shell, :flag => "-s"
4856N/A options :roles, :flag => "-R"
4856N/A options :auths, :flag => "-A"
4856N/A options :profiles, :flag => "-P"
4856N/A@@ -26,8 +27,23 @@
4856N/A value !~ /\s/
4856N/A end
4856N/A
4856N/A+ def shell=(value)
4856N/A+ check_valid_shell
4856N/A+ set("shell", value)
4856N/A+ end
4856N/A+
4856N/A has_features :manages_homedir, :allows_duplicates, :manages_solaris_rbac, :manages_passwords, :manages_password_age
4856N/A+ has_features :manages_shell
4856N/A
4856N/A+ def check_valid_shell
4856N/A+ unless File.exists?(@resource.should(:shell))
4856N/A+ raise(Puppet::Error, "Shell #{@resource.should(:shell)} must exist")
4856N/A+ end
4856N/A+ unless File.executable?(@resource.should(:shell).to_s)
4856N/A+ raise(Puppet::Error, "Shell #{@resource.should(:shell)} must be executable")
4856N/A+ end
4856N/A+ end
4856N/A+
4856N/A #must override this to hand the keyvalue pairs
4856N/A def add_properties
4856N/A cmd = []