sos/sos-pick-up-symlink-targets.patch
Bryn M. Reeves 89b86368f8 Update spec file for sos-3.2-1
Update sos in rawhide to the upstream 3.2 release and additional
patches including the fix for CVE-2015-7529.
2015-12-16 15:53:30 +00:00

27 lines
811 B
Diff

From 4d8b5418b1cf218ef9746674ca5935a7f4f3983e Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Fri, 31 Jul 2015 10:21:17 +0100
Subject: [PATCH] [Plugin] fix handling of symlinks in non-sysroot environments
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/__init__.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index aed7496..6731b28 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -163,6 +163,8 @@ class Plugin(object):
return os.path.join(self.sysroot, path)
def strip_sysroot(self, path):
+ if not self.use_sysroot():
+ return path
if path.startswith(self.sysroot):
return path[len(self.sysroot):]
return path
--
1.8.3.1