Issue #11988 has been updated by Nick Lewis.

Status changed from Accepted to In Topic Branch Pending Review

[Pull request #546](https://github.com/puppetlabs/puppet/pull/546) addresses 
this.

The fix I implemented was to first run Augeas in SAVE_NEWFILE mode to generate 
the diff and check if changes are needed, but to always delete the created 
.augnew file, and reload/run Augeas again in SAVE_OVERWRITE mode to actually 
enact the changes. My understanding is this shouldn't be a performance concern 
because Augeas isn't closed, and so shouldn't need to reparse anything. With 
this change, all the behavior around creating and overwriting files is handled 
by Augeas, so we don't duplicate any effort or bugs.
----------------------------------------
Bug #11988: Augeas provider can clobber symlinks
https://projects.puppetlabs.com/issues/11988#change-55969

Author: Nathan Huff
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Deepak Giridharagopal
Category: augeas
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords: augeas
Branch: 


If the augeas resource is fed a symlink as the target file and it
makes changes it will overwrite it with a regular file.  It creates
and .augnew file and just blindly moves it into place without checking
if the target file was a symlink.

The provider should either check whether the target was a symlink and 
dereference it or it should rerun augeas in overwrite mode since augeas does
take care to dereference if necessary. 


-- 
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