gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / ruby / puppet / patches / puppet-09-role-shell.patch
blobc422e87d3a77997c27f339f33277e2e5be94f9b2
1 --- puppet-3.8.6/lib/puppet/provider/user/user_role_add.rb.orig 2016-04-19 14:32:54.606087591 -0700
2 +++ puppet-3.8.6/lib/puppet/provider/user/user_role_add.rb 2016-04-19 14:34:04.451831050 -0700
3 @@ -1,3 +1,7 @@
4 +#######################################################################
5 +# Oracle has modified the originally distributed contents of this file.
6 +#######################################################################
8 require 'puppet/util'
9 require 'puppet/util/user_attr'
10 require 'date'
11 @@ -12,6 +16,7 @@
12 options :home, :flag => "-d", :method => :dir
13 options :comment, :method => :gecos
14 options :groups, :flag => "-G"
15 + options :shell, :flag => "-s"
16 options :roles, :flag => "-R"
17 options :auths, :flag => "-A"
18 options :profiles, :flag => "-P"
19 @@ -26,7 +31,22 @@
20 value !~ /\s/
21 end
23 + def shell=(value)
24 + check_valid_shell
25 + set("shell", value)
26 + end
28 has_features :manages_homedir, :allows_duplicates, :manages_solaris_rbac, :manages_passwords, :manages_password_age, :manages_shell
31 + def check_valid_shell
32 + unless File.exists?(@resource.should(:shell))
33 + raise(Puppet::Error, "Shell #{@resource.should(:shell)} must exist")
34 + end
35 + unless File.executable?(@resource.should(:shell).to_s)
36 + raise(Puppet::Error, "Shell #{@resource.should(:shell)} must be executable")
37 + end
38 + end
40 #must override this to hand the keyvalue pairs
41 def add_properties