diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-11-01 12:13:23 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-11-01 12:30:46 -0400 |
commit | 9a0ab16793a8388b2c3d3909fd3a087c5b6296d4 (patch) | |
tree | 2e0592a0a7db1ff9e1fd41393f8ba19761175454 | |
parent | f276d6ac51eefaf9d2e37300f11a7d397f48f957 (diff) | |
download | sos-9a0ab16793a8388b2c3d3909fd3a087c5b6296d4.tar.gz |
[Plugin] remove invalid {strip/join}_sysroot()
Do not strip the sysroot path prefix when calling _do_copy_path()
for a symlink target and do not add the sysroot prefix when
testing for a forbidden path.
Related: #1842
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index e75ec82e..4f1b73ce 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -731,7 +731,7 @@ class Plugin(object): # skip recursive copying of symlink pointing to itself. if (absdest != srcpath): - self._do_copy_path(self.strip_sysroot(absdest)) + self._do_copy_path(absdest) else: self._log_debug("link '%s' points to itself, skipping target..." % linkdest) @@ -758,8 +758,6 @@ class Plugin(object): return None def _is_forbidden_path(self, path): - if self.use_sysroot(): - path = self.join_sysroot(path) return _path_in_path_list(path, self.forbidden_paths) def _copy_node(self, path, st): |