~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to lib/puppet/provider/ssh_authorized_key/parsed.rb

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-22 14:08:22 UTC
  • mfrom: (1.1.25) (3.1.32 sid)
  • Revision ID: package-import@ubuntu.com-20111022140822-odxde5lohc45yhuz
Tags: 2.7.6-1
* New upstream release (CVE-2011-3872)
* Remove cherry-picked "groupadd_aix_warning" patch
* Install all new manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    0600
43
43
  end
44
44
 
45
 
  def target
46
 
      @resource.should(:target) || File.expand_path("~#{@resource.should(:user)}/.ssh/authorized_keys")
47
 
  rescue
48
 
      raise Puppet::Error, "Target not defined and/or specified user does not exist yet"
49
 
  end
50
 
 
51
45
  def user
52
46
    uid = File.stat(target).uid
53
47
    Etc.getpwuid(uid).name