From 9329d9cba0f05557783226539a081f003d63c734 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Tue, 16 Mar 2010 07:34:16 -0500 Subject: checked that there are no users named defaults --- lib/puppet/type/sudoers.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3