5858N/A--- puppet-3.8.6/lib/puppet/provider/user/user_role_add.rb.orig 2016-04-19 14:32:54.606087591 -0700
5858N/A+++ puppet-3.8.6/lib/puppet/provider/user/user_role_add.rb 2016-04-19 14:34:04.451831050 -0700
5858N/A@@ -1,3 +1,7 @@
5858N/A+#######################################################################
5858N/A+# Oracle has modified the originally distributed contents of this file.
5858N/A+#######################################################################
5858N/A+
5858N/A require 'puppet/util'
5858N/A require 'puppet/util/user_attr'
5858N/A require 'date'
5858N/A@@ -12,6 +16,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"
5858N/A@@ -26,7 +31,22 @@
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+
5726N/A has_features :manages_homedir, :allows_duplicates, :manages_solaris_rbac, :manages_passwords, :manages_password_age, :manages_shell
5726N/A+
5726N/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
5726N/A
4856N/A #must override this to hand the keyvalue pairs
4856N/A def add_properties