Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 530385

Summary: sosreport copies all files from a relative directory link, possibly copying unwanted directories
Product: Red Hat Enterprise Linux 5 Reporter: Tim Boyer <timothy.boyer>
Component: sosAssignee: Adam Stokes <astokes>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: high    
Version: 5.5CC: agk, ahecox, azelinka, bmr
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:07:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Boyer 2009-10-22 15:26:25 UTC
Description of problem:

sosreport's xen module copies all files in /etc/xen, including subdirectories and links.  There are links in the /etc/xen/auto directory linking up one level to the xen configuration files in /etc/xen, like so:

[root@defiant ~]# ls -la /etc/xen/auto/dg
lrwxrwxrwx 1 root root 5 Oct 22 08:57 /etc/xen/auto/dg -> ../dg

If sosreport is executed from /root, the python routine self.addCopySpec("/etc/xen") will attempt to copy anything in the ../dg directory, relative to where the command is executed.  So if, for instance, you had a xen config file called usr in /etc/xen, and a link to ../usr in /etc/xen/auto, sosreport executed in /root will attempt to copy all of /usr into /tmp.  With unwanted results.

Version-Release number of selected component (if applicable):


How reproducible:

Consistent.

Steps to Reproduce:
1.  touch /etc/xen/usr 
2.  cd /etc/xen/auto
3.  ln -s ../usr .
4.  cd
5.  sosreport --no-multithread -o xen -vvv
  
Actual results:

copying file ../usr/local/lib/libol.a
copying file ../usr/local/lib/pkgconfig/eventlog.pc
copying file ../usr/local/lib/libevtlog.a
copying file ../usr/local/lib/libol.la
copying file ../usr/local/lib/libevtlog.so.0.0.0
copying file ../usr/local/lib/libol.so.0.0.0

etc.

Expected results:


Additional info:

Comment 1 Adam Stokes 2009-10-22 17:55:01 UTC
Hi Tim,

This is with latest RHEL 5.4 sosreport correct?

Thanks,
Adam

Comment 2 Tim Boyer 2009-10-22 18:26:21 UTC
Correct.  I've also verified that all works well if you do an absolute link entry, i.e.,

ln -s /etc/xen/usr /etc/xen/auto/usr

so that's my current workaround.

Comment 4 Adam Stokes 2009-11-19 16:04:59 UTC
Hi Tim,

Could you give these test packages a quick run and see if problem persists?

http://astokes.fedorapeople.org/rhbz530385/

Thanks,
Adam

Comment 5 Tim Boyer 2009-11-19 16:53:11 UTC
Worked perfectly.  Thanks much!

Comment 6 Adam Stokes 2009-11-19 16:56:39 UTC
Thanks Tim,

This will get pushed out in RHEL 5.5

-Adam

Comment 10 errata-xmlrpc 2010-03-30 08:07:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0201.html