Bug 530385 - sosreport copies all files from a relative directory link, possibly copying unwanted directories
Summary: sosreport copies all files from a relative directory link, possibly copying u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.5
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-22 15:26 UTC by Tim Boyer
Modified: 2010-03-30 08:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:07:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0201 0 normal SHIPPED_LIVE sosreport bug fix and enhancement update 2010-03-29 12:26:44 UTC

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


Note You need to log in before you can comment on or make changes to this bug.