diff options
author | Dan Bode <dan@bodepd.com> | 2010-03-16 07:34:16 -0500 |
---|---|---|
committer | Dan Bode <dan@bodepd.com> | 2010-03-16 07:34:16 -0500 |
commit | 9329d9cba0f05557783226539a081f003d63c734 (patch) | |
tree | 1fcf87263c26fb64b951fa9b47aa9f01695b5778 /lib/puppet | |
parent | be21deec85ab9579844dc18240fe35b30308ae0f (diff) |
checked that there are no users named defaults
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type/sudoers.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/type/sudoers.rb b/lib/puppet/type/sudoers.rb index dcb4cfe..e9805b9 100644 --- a/lib/puppet/type/sudoers.rb +++ b/lib/puppet/type/sudoers.rb @@ -9,6 +9,10 @@ License:: GPL3 The sudoers type supports managing individual lines from the sudoers file. +Supports present/absent. + +supports purging. + = Record Types There are 3 types of records that are supported: @@ -117,6 +121,11 @@ Defaults@host x=y,one=1,two=2 # single user is namevar newproperty(:users, :array_matching => :all) do desc "list of users for user spec" + validate do |value| + if value =~ /^\s*Defaults/ + raise Puppet::Error, 'Cannot specify user named Defaults in sudoers' + end + end end newproperty(:hosts, :array_matching => :all) do |