Issue #11968 has been updated by Daniel Pittman.

Subject changed from Errors from Exec resources when source param of a File 
resource is a softlink to Potentially unsafe CWD handling in Puppet, from 
various sources
Description updated
Status changed from Unreviewed to Needs Decision

More thinking is needed about what this means, but I agree that it is a 
problem, and if we have shown it in several places we should look further to 
fixing it globally.
----------------------------------------
Bug #11968: Potentially unsafe CWD handling in Puppet, from various sources
https://projects.puppetlabs.com/issues/11968

Author: Steve Shipway
Status: Needs Decision
Priority: Normal
Assignee: 
Category: file
Target version: 
Affected Puppet version: 2.7.6
Keywords: 
Branch: 


If the location pointed to by source=> in a file{} resource is a softlink, and 
you do not have links=>follow, then you get some wierd errors relating to 
getcwd appearing.  This is understandable but it should probably give a more 
helpful error message.

I have reliably duplicated this with 
    
    file { "/usr/local/nrpe":
    ensure=>present, replace=>yes, recurse=>true, recurselimit=>2,
    backup=>false, force=>true,
    ignore=>'.svn', 
    owner=>root, group=>root, mode=>0755,
    sourceselect=>all,
    source=>[
    "puppet:///modules/nrpe/plugins/$operatingsystem.$architecture",
    ],
    }

If the puppet: link points to a softlink you get all the Exec errors about 
getcwd.  Replacing with a real directory, or using links=>follow, and all is OK.

    err: /Stage[main]/Nrpe/File[/usr/local/nrpe]/ensure: change from directory 
to link failed: Could not set 'link on ensure:
    No such file or directory - getcwd at 
/etc/puppet/dev/modules/nrpe/manifests/init.pp:92
    err: /Stage[main]/Nrpe/Exec[etc-services-nrpe]: Could not evaluate: No such 
file or directory - getcwd
    
All the additional errors are with Exec resources.

The body includes more details about how to reproduce.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to