History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RHQ-597
Type: Code Change Code Change
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jay Shaughnessy
Reporter: Jay Shaughnessy
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RHQ Project

Ensure purge operations handle symbolic link following, if necessary

Created: 18/Jun/08 10:45 AM   Updated: 18/Jul/08 08:02 AM
Component/s: None
Affects Version/s: 1.0.1
Fix Version/s: 1.1

Time Tracking:
Not Specified

Environment: unix, linux

Resolution Date: 09/Jul/08 02:41 PM
VCS Revision: 1,075


 Description  « Hide
From RHQ-586

Other tree-walking:

* org.rhq.core.pluginapi.util.FileUtils.purge() may also need symlink protection. In this case we probably don't want to follow symlinks, just delete them.

* org.rhq.enterprise.server.plugin.content.ContentSourcePluginClassLoader may need it for its (near duplicate) purge method.

* ServerInformation in the installer also recursively walks dir trees but I think this is safe since we're under control of the file structure being worked on.

I don't want to make changes here given the proximity of the 2.0.1 release and the fact that this code is not tied to any reported issues. It should be addressed soon after release.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jay Shaughnessy - 09/Jul/08 02:41 PM
r1075
No code change, updated FileUtils.purge() jdoc to mention that it does not provide protection against symbolic links. This should be ok for all of the uses I see in our code. It is dangerous for recursive delete/purge/other operations to follow symbolic links on unix, so if working on an uncontrolled/unknown directory, symbolic links handling should be performed. Probably most likely in plugin code.

Jay Shaughnessy - 09/Jul/08 02:42 PM
No code change, visual inspection shows no risk of the symlink issue in remaining code. Can be closed.