summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schulte <stefan.schulte@taunusstein.net>2011-04-23 10:30:09 +0200
committerNick Lewis <nick@puppetlabs.com>2011-05-16 15:55:03 -0700
commit551cb3e5ee6c1ef4218adcebf04004c50fe4119f (patch)
treebef11569de95a59cec4b6e80486ef6c8960b9204
parent15c6fc789494f93823bf566562b8da654a28a65e (diff)
downloadpuppet-551cb3e5ee6c1ef4218adcebf04004c50fe4119f.tar.gz
puppet-551cb3e5ee6c1ef4218adcebf04004c50fe4119f.tar.xz
puppet-551cb3e5ee6c1ef4218adcebf04004c50fe4119f.zip
(#7114) Target returns correct value
Fix the ssh_authorized_key parsedfile provider to return the current target value instead of the should value. Without this change puppet always thinks that the target property is in sync and thus will never move one key to the correct file. Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
-rw-r--r--lib/puppet/provider/ssh_authorized_key/parsed.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/puppet/provider/ssh_authorized_key/parsed.rb b/lib/puppet/provider/ssh_authorized_key/parsed.rb
index 6a3855c0e..81b1fbcfa 100644
--- a/lib/puppet/provider/ssh_authorized_key/parsed.rb
+++ b/lib/puppet/provider/ssh_authorized_key/parsed.rb
@@ -42,12 +42,6 @@ require 'puppet/provider/parsedfile'
0600
end
- def target
- @resource.should(:target) || File.expand_path("~#{@resource.should(:user)}/.ssh/authorized_keys")
- rescue
- raise Puppet::Error, "Target not defined and/or specified user does not exist yet"
- end
-
def user
uid = File.stat(target).uid
Etc.getpwuid(uid).name