debian/0000775000000000000000000000000012634642533007200 5ustar debian/compat0000664000000000000000000000000212254061770010372 0ustar 9 debian/watch0000664000000000000000000000015512254061770010226 0ustar version=3 https://github.com/sosreport/sosreport/releases/tag/r3.0 /sosreport/sosreport/archive/r(.+).tar.gz debian/patches/0000775000000000000000000000000012634642721010626 5ustar debian/patches/0009-fix-ceilometer-stack.patch0000664000000000000000000000230512410473520016243 0ustar From 8c1c48d30d8508d23f06db10ec1c9ece989133f9 Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Thu, 28 Aug 2014 10:06:31 +0200 Subject: fix ceilometer stack Description: fix ceilometer stack Remove error in execution of the ceilometer plugin Author: Louis Bouchard Bug-Ubuntu: http://bugs.launchpad.net/bugs/1355279 Signed-off-by: Louis Bouchard --- sos/plugins/openstack_ceilometer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py index 524b68b..7cd9091 100644 --- a/sos/plugins/openstack_ceilometer.py +++ b/sos/plugins/openstack_ceilometer.py @@ -27,7 +27,10 @@ class OpenStackCeilometer(plugins.Plugin): def setup(self): # Ceilometer - self.add_copy_spec("/etc/ceilometer/", "/var/log/ceilometer") + self.add_copy_specs([ + "/etc/ceilometer/", + "/var/log/ceilometer" + ]) class DebianOpenStackCeilometer(OpenStackCeilometer, plugins.DebianPlugin, plugins.UbuntuPlugin): """OpenStackCeilometer related information for Debian based distributions.""" debian/patches/0005-get-interfaces.d.patch0000664000000000000000000000212112410473520015336 0ustar From 9d84259812d10ca52bdba6400376f77f0057e175 Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Wed, 27 Aug 2014 15:00:59 +0200 Subject: get-interfaces.d Add collection of /etc/network/interfaces.d for Ubuntu Since 14.04 Trusty, ubuntu uses config scripts in /etc/network/interfaces.d. Collect those. Closes: #264 Author: Louis Bouchard Bug-Ubuntu: https://bugs.launchpad.net/bugs/1303723 Origin: upstream, https://github.com/sosreport/sos/commit/f4dc6422e3008ae7ba060a0d469284dff5c5daad --- sos/plugins/networking.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py index 598d375..d33a45c 100644 --- a/sos/plugins/networking.py +++ b/sos/plugins/networking.py @@ -145,6 +145,7 @@ class UbuntuNetworking(Networking, UbuntuPlugin): self.add_copy_specs([ "/etc/resolvconf", "/etc/network/interfaces", + "/etc/network/interfaces.d", "/etc/ufw", "/var/log/ufw.Log", "/etc/resolv.conf"]) debian/patches/series0000664000000000000000000000057512634641673012057 0ustar 0001-Use-input-method-from-python-six.patch 0002-do_not_collect_isos_in_cobbler_plugin.patch 0003-collect-cloud-init-log.patch 0004-fix-command-not-found.patch 0005-get-interfaces.d.patch 0006-Add-rabbitmq-log-collection.patch 0007-Collect-upstart-logs.patch 0008-Collect-squid-deb-proxy-info.patch 0009-fix-ceilometer-stack.patch 0010-CVE-2014-0246.patch 0011-CVE-2015-7529.patch debian/patches/0001-Use-input-method-from-python-six.patch0000664000000000000000000000714312410473520020451 0ustar From e19884c7d5f945a800f2d457b20084181614e5c3 Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Wed, 27 Aug 2014 15:00:55 +0200 Subject: Use input method from python six Something our unittests didnt catch which is more functional than anything. Using raw_input fails on python3 because it was renamed to input. Six provides an alias that handles both cases. Author: Adam Stokes Bug-Ubuntu: https://bugs.launchpad.net/bugs/1302808 Origin: upstream, https://github.com/sosreport/sos/commit/65d8fb5d30682dffffab1daf06662dafb9e303f2.patch --- sos/plugins/emc.py | 5 ++++- sos/policies/__init__.py | 7 ++++--- sos/sosreport.py | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sos/plugins/emc.py b/sos/plugins/emc.py index 6eac7d0..80d0177 100644 --- a/sos/plugins/emc.py +++ b/sos/plugins/emc.py @@ -18,6 +18,9 @@ from sos.plugins import Plugin, RedHatPlugin, os +# Just for completeness sake. +from six.moves import input + class Emc(Plugin, RedHatPlugin): """EMC related information (PowerPath, Solutions Enabler CLI and Navisphere CLI) """ @@ -194,7 +197,7 @@ class Emc(Plugin, RedHatPlugin): CLARiiON_IP_address_list = [] CLARiiON_IP_loop = "stay_in" while CLARiiON_IP_loop == "stay_in": - ans = raw_input("CLARiiON SP IP Address or [Enter] to exit: ") + ans = input("CLARiiON SP IP Address or [Enter] to exit: ") ## Check to make sure the CLARiiON SP IP address provided is valid p = Popen("navicli -h %s getsptime" % (ans,), shell=True, stdout=PIPE, stderr=PIPE) out, err = p.communicate() diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index c272e5c..5715113 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -18,6 +18,7 @@ from sos import _sos as _ import hashlib from textwrap import fill from six import print_ +from six.moves import input def import_policy(name): policy_fqname = "sos.policies.%s" % name @@ -383,9 +384,9 @@ class LinuxPolicy(Policy): if not self.commons['cmdlineopts'].batch and not self.commons['cmdlineopts'].quiet: try: - self.report_name = raw_input(_("Please enter your first initial and last name [%s]: ") % localname) + self.report_name = input(_("Please enter your first initial and last name [%s]: ") % localname) - self.ticket_number = raw_input(_("Please enter the case number that you are generating this report for: ")) + self.ticket_number = input(_("Please enter the case number that you are generating this report for: ")) self._print() except: self._print() @@ -406,6 +407,6 @@ class LinuxPolicy(Policy): if (self.report_name == ""): self.report_name = "default" - + return diff --git a/sos/sosreport.py b/sos/sosreport.py index 4b52572..073b28a 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -53,7 +53,7 @@ from sos.reporting import Report, Section, Command, CopiedFile, CreatedFile, Ale # PYCOMPAT import six -from six.moves import zip +from six.moves import zip, input if six.PY3: from configparser import ConfigParser else: @@ -923,7 +923,7 @@ class SoSReport(object): msg = self.policy.get_msg() msg += _("Press ENTER to continue, or CTRL-C to quit.\n") try: - raw_input(msg) + input(msg) except: self.ui_log.info("") self._exit() debian/patches/0011-CVE-2015-7529.patch0000664000000000000000000002376512634642716013655 0ustar Description: CVE-2015-7529 Avoid predictable tmp files usage Upstream commits : 4a9b919, 19e2bbc, 7f27277, 6038fdf, 08121d8 Author: "Bryn M. Reeves" Origin: Upstream Bug: https://github.com/sosreport/sos/issues/696 --- Index: sosreport-3.1/sos/policies/__init__.py =================================================================== --- sosreport-3.1.orig/sos/policies/__init__.py 2015-12-14 14:46:46.000000000 +0100 +++ sosreport-3.1/sos/policies/__init__.py 2015-12-14 15:52:35.345462524 +0100 @@ -11,11 +11,9 @@ from sos.utilities import ImporterHelper, \ import_module, \ - get_hash_name, \ shell_out from sos.plugins import IndependentPlugin from sos import _sos as _ -import hashlib from textwrap import fill from six import print_ from six.moves import input @@ -244,41 +242,29 @@ considered to be a superuser""" return (os.getuid() == 0) - def _create_checksum(self, final_filename=None): - if not final_filename: - return False - - archive_fp = open(final_filename, 'rb') - digest = hashlib.new(get_hash_name()) - digest.update(archive_fp.read()) - archive_fp.close() - return digest.hexdigest() - - def get_preferred_hash_algorithm(self): + def get_preferred_hash_name(self): """Returns the string name of the hashlib-supported checksum algorithm to use""" return "md5" - def display_results(self, final_filename=None, build=False): + def display_results(self, archive, directory, checksum): + # Display results is called from the tail of SoSReport.final_work() + # + # Logging is already shutdown and all terminal output must use the + # print() call. # make sure a report exists - if not final_filename: + if not archive and not directory: return False self._print() - if not build: - # store checksum into file - fp = open(final_filename + "." + get_hash_name(), "w") - checksum = self._create_checksum(final_filename) - if checksum: - fp.write(checksum + "\n") - fp.close() - - self._print(_("Your sosreport has been generated and saved in:\n %s") % final_filename) + if archive: + self._print(_("Your sosreport has been generated and saved " + "in:\n %s") % archive) else: - checksum = None - self._print(_("sosreport build tree is located at : %s" % final_filename)) + self._print(_("sosreport build tree is located at : %s" % + directory)) self._print() if checksum: @@ -330,20 +316,28 @@ vendor = "None" PATH = "/bin:/sbin:/usr/bin:/usr/sbin" + _preferred_hash_name = None + def __init__(self): super(LinuxPolicy, self).__init__() - def get_preferred_hash_algorithm(self): + def get_preferred_hash_name(self): + + if self._preferred_hash_name: + return self._preferred_hash_name + checksum = "md5" try: fp = open("/proc/sys/crypto/fips_enabled", "r") except: + self._preferred_hash_name = checksum return checksum fips_enabled = fp.read() if fips_enabled.find("1") >= 0: checksum = "sha256" fp.close() + self._preferred_hash_name = checksum return checksum def default_runlevel(self): Index: sosreport-3.1/sos/sosreport.py =================================================================== --- sosreport-3.1.orig/sos/sosreport.py 2015-12-14 14:46:46.000000000 +0100 +++ sosreport-3.1/sos/sosreport.py 2015-12-14 16:15:12.317101634 +0100 @@ -42,7 +42,9 @@ from stat import ST_UID, ST_GID, ST_MODE, ST_CTIME, ST_ATIME, ST_MTIME, S_IMODE from time import strftime, localtime from collections import deque +from shutil import rmtree import textwrap +import hashlib import tempfile from sos import _sos as _ @@ -528,6 +530,7 @@ self.global_plugin_options = {} self.archive = None self.tempfile_util = None + self.sys_tmp = None try: import signal @@ -542,14 +545,20 @@ self._read_config() self.policy = sos.policies.load() self._is_root = self.policy.is_root() - self.tmpdir = os.path.abspath( - self.policy.get_tmp_dir(self.opts.tmp_dir)) - if not os.path.isdir(self.tmpdir) \ - or not os.access(self.tmpdir, os.W_OK): + # system temporary directory to use + tmp = os.path.abspath(self.policy.get_tmp_dir(self.opts.tmp_dir)) + + if not os.path.isdir(tmp) \ + or not os.access(tmp, os.W_OK): # write directly to stderr as logging is not initialised yet - sys.stderr.write("temporary directory %s " % self.tmpdir \ + sys.stderr.write("temporary directory %s " % tmp \ + "does not exist or is not writable\n") self._exit(1) + + self.sys_tmp = tmp + + # our (private) temporary directory + self.tmpdir = tempfile.mkdtemp(prefix="sos.", dir=self.sys_tmp) self.tempfile_util = TempFileUtil(self.tmpdir) self._set_directories() @@ -1103,16 +1112,38 @@ if self.raise_plugins: raise + def _create_checksum(self, archive, hash_name): + if not archive: + return False + + archive_fp = open(archive, 'rb') + digest = hashlib.new(hash_name) + digest.update(archive_fp.read()) + archive_fp.close() + return digest.hexdigest() + + def _write_checksum(self, archive, hash_name, checksum): + # store checksum into file + fp = open(archive + "." + hash_name, "w") + if checksum: + fp.write(checksum + "\n") + fp.close() + def final_work(self): - # this must come before archive creation to ensure that log + # This must come before archive creation to ensure that log # files are closed and cleaned up at exit. + # + # All subsequent terminal output must use print(). self._finish_logging() - # package up the results for the support organization + archive = None # archive path + directory = None # report directory path (--build) + + # package up and compress the results if not self.opts.build: print (_("Creating compressed archive...")) # compression could fail for a number of reasons try: - final_filename = self.archive.finalize(self.opts.compression_type) + archive = self.archive.finalize(self.opts.compression_type) except: if self.opts.debug: raise @@ -1120,10 +1151,63 @@ return False else: - final_filename = self.archive.get_archive_path() + # move the archive root out of the private tmp directory. + directory = self.archive.get_archive_path() + dir_name = os.path.basename(directory) + try: + os.rename(directory, os.path.join(self.sys_tmp, dir_name)) + except (OSError, IOError): + print(_("Error moving directory: %s" % directory)) + return False + + checksum = None + + if not self.opts.build: + # compute and store the archive checksum + hash_name = self.policy.get_preferred_hash_name() + checksum = self._create_checksum(archive, hash_name) + self._write_checksum(archive, hash_name, checksum) + + # output filename is in the private tmpdir - move it to the + # containing directory. + final_name = os.path.join(self.sys_tmp, os.path.basename(archive)) + + archive_hash = archive + "." + hash_name + final_hash = final_name + "." + hash_name + + # move the archive and checksum file + try: + os.rename(archive, final_name) + archive = final_name + except (OSError, IOError): + print(_("Error moving archive file: %s" % archive)) + return False + + # There is a race in the creation of the final checksum file: + # since the archive has already been published and the checksum + # file name is predictable once the archive name is known a + # malicious user could attempt to create a symbolic link in order + # to misdirect writes to a file of the attacker's choosing. + # + # To mitigate this we write the checksum inside the private tmp + # directory and use an atomic rename that is guaranteed to either + # succeed or fail: at worst the move will fail and be reported to + # the user. The correct checksum value is still written to the + # terminal and nothing is written to a location under the control + # of the user creating the link. + try: + os.rename(archive_hash, final_hash) + except (OSError, IOError): + print(_("Error moving checksum file: %s" % archive_hash)) + return False + + self.policy.display_results(archive, directory, checksum) - self.policy.display_results(final_filename, build = self.opts.build) - self.tempfile_util.clean() + # clean up + if self.tempfile_util: + self.tempfile_util.clean() + if self.tmpdir: + rmtree(self.tmpdir) return True @@ -1175,6 +1259,8 @@ self.archive.cleanup() if self.tempfile_util: self.tempfile_util.clean() + if self.tmpdir: + rmtree(self.tmpdir) return False def main(args): debian/patches/0007-Collect-upstart-logs.patch0000664000000000000000000000267012410473520016256 0ustar From 7b941c76f289595936c33e5f69d0c1191987dd3f Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Thu, 28 Aug 2014 12:41:32 +0200 Subject: Collect upstart logs Description: Collect upstart logs Author: Louis Bouchard Bug-Ubuntu: http://bugs.launchpad.net/bugs/1309679 Origin: upstream, https://github.com/sosreport/sos/commit/8aed05343ae69931adf823d093f16c1d247f2908 --- sos/plugins/upstart.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sos/plugins/upstart.py b/sos/plugins/upstart.py index 5aa0e1d..db49730 100644 --- a/sos/plugins/upstart.py +++ b/sos/plugins/upstart.py @@ -23,6 +23,9 @@ class Upstart(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): plugin_name = 'upstart' packages = ('upstart',) + option_list = [("logsize", "maximum size (MiB) of logs to collect", + "", 15)] + def setup(self): self.add_cmd_output('initctl --system list') self.add_cmd_output('initctl --system version') @@ -36,6 +39,9 @@ class Upstart(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): # State file self.add_copy_spec('/var/log/upstart/upstart.state') + # Log files + self.add_copy_spec_limit('/var/log/upstart/*', + sizelimit=self.get_option('logsize')) # Session Jobs (running Upstart as a Session Init) self.add_copy_spec('/usr/share/upstart/') debian/patches/0004-fix-command-not-found.patch0000664000000000000000000000350312410473520016331 0ustar From 4263b493459c59b0a7a886a640d87ceace3c052b Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Wed, 27 Aug 2014 15:00:58 +0200 Subject: fix-command-not-found Fix verbose file logging Prior versions of sos enable debug logging to the embedded log file (sos_logs/sos.log) when a single '-v' is given. Restore this behaviour and ensure that command-not-found messages are reported at 'info' rather than 'warning' level. Author: Bryn M. Reeves Bug-Ubuntu: https://bugs.launchpad.net/bugs/1303745 Origin: upstream, https://github.com/sosreport/sos/commit/commit 0338a955a930286beaa7b66c5167be9b15d34d78 --- sos/plugins/__init__.py | 2 +- sos/sosreport.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 7c63631..8df430d 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -488,7 +488,7 @@ class Plugin(object): self.soslog.warning("command '%s' timed out after %ds" % (prog, timeout)) if status == 127: - self.soslog.warning("could not run '%s': command not found" % prog) + self.soslog.info("could not run '%s': command not found" % prog) return (status, output, runtime) def call_ext_prog(self, prog, timeout=300): diff --git a/sos/sosreport.py b/sos/sosreport.py index 073b28a..a1b4fe0 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -659,6 +659,7 @@ class SoSReport(object): flog.setLevel(logging.DEBUG) elif self.opts.verbosity and self.opts.verbosity > 0: console.setLevel(logging.INFO) + flog.setLevel(logging.DEBUG) else: console.setLevel(logging.WARNING) self.soslog.addHandler(console) debian/patches/0010-CVE-2014-0246.patch0000664000000000000000000000177712634642275013637 0ustar From 7b46d34654735d925bcb2a3e4b27b65dce994519 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 30 May 2014 14:41:42 +0100 Subject: [PATCH] Add postprocessing for /etc/fstab passwords Signed-off-by: Bryn M. Reeves Origin: backport, https://github.com/sosreport/sos/commit/7b46d34654735d925bcb2a3e4b27b65dce994519 --- sos/plugins/filesys.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py index 15cec04..a50c254 100644 --- a/sos/plugins/filesys.py +++ b/sos/plugins/filesys.py @@ -48,3 +48,10 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ext_fs_regex = r"^(/dev/.+).+ext[234]\s+" for dev in zip(self.do_regex_find_all(ext_fs_regex, mounts)): self.add_cmd_output("dumpe2fs -h %s" % (dev)) + + def postproc(self): + self.do_file_sub( + "/etc/fstab", + r"(password=)[^\s]*", + r"\1********" + ) -- 2.5.0 debian/patches/0003-collect-cloud-init-log.patch0000664000000000000000000000203212410473520016464 0ustar From f05fa684f9f90a3069dd47268ab5d2708e3d66b4 Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Wed, 27 Aug 2014 15:00:57 +0200 Subject: collect-cloud-init-log Add collection of /var/log/cloud-init.log and /var/log/cloud-init-output.log if they exist. Author: Louis Bouchard Bug-Ubuntu: https://bugs.launchpad.net/bugs/1301819 Origin: upstream, https://github.com/sosreport/sos/commit/36efd32ab01df2c076c3271543d674a515094375 --- sos/plugins/logs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py index 7e7545f..323f639 100644 --- a/sos/plugins/logs.py +++ b/sos/plugins/logs.py @@ -36,6 +36,7 @@ class Logs(Plugin): self.limit = self.get_option("logsize") self.add_copy_spec_limit("/var/log/boot*", sizelimit = self.limit) + self.add_copy_spec_limit("/var/log/cloud-init*", sizelimit = self.limit) if self.get_option('all_logs'): logs = self.do_regex_find_all("^\S+\s+(-?\/.*$)\s+", debian/patches/0006-Add-rabbitmq-log-collection.patch0000664000000000000000000000375712410473520017434 0ustar From 22b164b97329c7f1f050b689d06414dc6766c1e6 Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Thu, 28 Aug 2014 12:40:23 +0200 Subject: Add rabbitmq log collection Description: Add rabbitmq log collection Author: Louis Bouchard Bug-Ubuntu: http://bugs.launchpad.net/bugs/1308232 Origin: upstream, https://github.com/sosreport/sos/commit/32baa50081bf72d3766f22f27974563f8cad49eb --- sos/plugins/rabbitmq.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sos/plugins/rabbitmq.py diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py new file mode 100644 index 0000000..28465de --- /dev/null +++ b/sos/plugins/rabbitmq.py @@ -0,0 +1,30 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin + + +class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + """rabbitmq related information + """ + plugin_name = 'rabbitmq' + files = ('/etc/rabbitmq/rabbitmq.conf',) + packages = ('rabbitmq-server',) + + def setup(self): + self.add_cmd_output("rabbitmqctl report") + self.add_copy_spec("/etc/rabbitmq/*") + self.add_copy_spec_limit("/var/log/rabbitmq/*", + sizelimit=self.get_option('log_size')) +# vim: et ts=4 sw=4 debian/patches/0002-do_not_collect_isos_in_cobbler_plugin.patch0000664000000000000000000000175412410473520022004 0ustar From e6b8f03b5fbe7f456c95a18b714e7b90fcf38198 Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Wed, 27 Aug 2014 15:00:56 +0200 Subject: do_not_collect_isos_in_cobbler_plugin Do not collect isos in cobbler plugin In Ubuntu isos are being added to the tarball, do not do that. Author: Adam Stokes Bug-Ubuntu: https://bugs.launchpad.net/bugs/1302837 Origin: upstream, https://github.com/sosreport/sos/commit/3ff674035d8962bf3ca3320900fccc6619af7a3d.patch --- sos/plugins/cobbler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sos/plugins/cobbler.py b/sos/plugins/cobbler.py index e3d289e..b754813 100644 --- a/sos/plugins/cobbler.py +++ b/sos/plugins/cobbler.py @@ -39,3 +39,4 @@ class DebianCobbler(Cobbler, DebianPlugin, UbuntuPlugin): self.add_copy_spec("/etc/cobbler") self.add_copy_spec("/var/log/cobbler") self.add_copy_spec("/var/lib/cobbler") + self.add_forbidden_path("/var/lib/cobbler/isos") debian/patches/0008-Collect-squid-deb-proxy-info.patch0000664000000000000000000000404412410473520017575 0ustar From ac71ef2cdbdc24d3f8594c50a11653b1a5e43d3d Mon Sep 17 00:00:00 2001 From: Louis Bouchard Date: Thu, 28 Aug 2014 12:42:01 +0200 Subject: Collect squid-deb-proxy info Description: Collect squid-deb-proxy info Author: Louis Bouchard Bug-Ubuntu: http://bugs.launchpad.net/bugs/1311131 Origin: upstream, https://github.com/sosreport/sos/commit/49198774ad051892b6f609bdc0d126f8a8e8c00e --- sos/plugins/squid.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sos/plugins/squid.py b/sos/plugins/squid.py index bf6579b..19292cd 100644 --- a/sos/plugins/squid.py +++ b/sos/plugins/squid.py @@ -14,6 +14,7 @@ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin + class Squid(Plugin): """squid related information """ @@ -23,6 +24,7 @@ class Squid(Plugin): option_list = [("logsize", "maximum size (MiB) of logs to collect", "", 15)] + class RedHatSquid(Squid, RedHatPlugin): """squid Red Hat related information """ @@ -32,7 +34,8 @@ class RedHatSquid(Squid, RedHatPlugin): def setup(self): self.add_copy_spec_limit("/etc/squid/squid.conf", - sizelimit=self.get_option('logsize')) + sizelimit=self.get_option('logsize')) + class DebianSquid(Squid, DebianPlugin, UbuntuPlugin): """squid related information for Debian and Ubuntu @@ -44,4 +47,9 @@ class DebianSquid(Squid, DebianPlugin, UbuntuPlugin): def setup(self): self.add_copy_spec_limit("/etc/squid3/squid.conf", - sizelimit=self.get_option('logsize')) + sizelimit=self.get_option('logsize')) + self.add_copy_spec_limit("/var/log/squid3/*", + sizelimit=self.get_option('logsize')) + self.add_copy_specs(['/etc/squid-deb-proxy']) + self.add_copy_spec_limit("/var/log/squid-deb-proxy/*", + sizelimit=self.get_option('logsize')) debian/install0000664000000000000000000000001612254061770010562 0ustar sos.conf etc/ debian/changelog0000664000000000000000000000625212634642533011057 0ustar sosreport (3.1-1ubuntu2.2) trusty-security; urgency=medium * SECURITY UPDATE: Information disclosure via insufficient scrubbing of passwords in /etc/fstab - debian/patches/0010-CVE-2014-0246.patch: Remove passwords when collecting the contents of /etc/fstab - CVE-2014-0246 [ Louis Bouchard ] * SECURITY UPDATE: Information disclosure and/or directory traversal via insecure tmp file handling (LP: #1525271) - debian/patches/0011-CVE-2015-7529.patch: Safely create a private tmp directory - CVE-2015-7529 -- Tyler Hicks Thu, 17 Dec 2015 17:27:05 -0600 sosreport (3.1-1ubuntu2.1) trusty-proposed; urgency=medium * debian/patches/add-rabbitmq-plugin.patch - Add rabbitmq log collection (LP: #1308232) * debian/patches/collect_upstart_log.patch - Collect upstart log files (LP: #1309679) * debian/patches/collect-squid-deb-proxy-info.patch - Collect squid-deb-proxy info (LP: #1311131) * debian/patches/fix-ceilometer-stack.patch - Remove error in execution of the ceilometer plugin (LP: #1355279) -- Louis Bouchard Wed, 24 Sep 2014 09:48:59 +0200 sosreport (3.1-1ubuntu2) trusty; urgency=medium * Fix spurious "command not found" messages when running (LP: #1303745) * Add collection of /var/log/cloud-init*.log files (LP: #1301819) * Add collection of configuration files in /etc/network/interfaces.d (LP: #1303723) -- Louis Bouchard Tue, 08 Apr 2014 08:58:08 -0500 sosreport (3.1-1ubuntu1) trusty; urgency=low * Fix issues with using sosreport -a. (LP: #1302808) * Don't collect cobbler isos. (LP: #1302837) * Update standards version. -- Chris J Arges Fri, 04 Apr 2014 15:40:13 -0500 sosreport (3.1-1) sid; urgency=low * New upstream release v3.1 Features include: - Full Python 3 support - Further modularized openstack plugins * debian/rules: - Use pybuild * debian/control: - Use X-Python-Version: >= 3.3 -- Adam Stokes Wed, 15 Jan 2014 16:58:54 -0500 sosreport (3.0-1) unstable; urgency=low * New upstream release v3.0 Features include: - Openstack, MAAS, Juju, and other cloud technologies - Extended policies to allow for easier cross distribution support. - Cross distribution support for Debian, Ubuntu, Fedora, and Red Hat Enterprise Linux - Increase execution speed of plugins * Fixes traceback error in the utilities log (Closes: #717401) * debian/copyright: - Add Company contributions notices in AUTHORS file. * setup.py: - Added to support packaging python modules via distutils. * debian/rules: - Fix build instructions to package sosreport as a private module. * debian/control: - Use XS-Python-Version and remove debian/pyversions. * tests/archive_tests.py: - Update unittests to work with latest api changes in the new release. -- Adam Stokes Sun, 21 Jul 2013 20:35:04 -0400 sosreport (2.3~git20130509-1) unstable; urgency=low * Package updated from git rev 395ad13da8 Closes: #698329 -- Adam Stokes Fri, 31 May 2013 12:12:46 -0400 debian/rules0000775000000000000000000000053412271430455010255 0ustar #!/usr/bin/make -f DH_ALWAYS_EXCLUDE=.git export PYBUILD_NAME=sosreport export PYBUILD_DISABLE_python2=1 export PYBUILD_INSTALL_ARGS_python3=--install-lib=usr/share/sosreport/ \ --install-data=usr/ \ --install-scripts=usr/share/sosreport/ \ --root=$(CURDIR)/debian/sosreport/ \ --no-compile -O0 %: dh $@ --with python3 --buildsystem=pybuild debian/docs0000664000000000000000000000002212254061770010041 0ustar README.md AUTHORS debian/copyright0000664000000000000000000000363312254061770011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: sosreport Upstream-Contact: Bryn M. Reeves Source: https://github.com/sosreport/sosreport Files: * Copyright: 2012-2013 Bryn M. Reeves 2007-2013 Red Hat, Inc. License: GPL-2+ Files: sos/plugins/kernelrt.py Copyright: 2012 Red Hat, Inc. License: GPL-2 Files: debian/* Copyright: 2013 Adam Stokes License: GPL-2+ License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2. . This application is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU General Public License, version 2, can be found in /usr/share/common-licenses/GPL-2. debian/sosreport.links0000664000000000000000000000006212254061770012274 0ustar /usr/share/sosreport/sosreport /usr/bin/sosreport debian/source/0000775000000000000000000000000012254061770010474 5ustar debian/source/format0000664000000000000000000000001412254061770011702 0ustar 3.0 (quilt) debian/control0000664000000000000000000000126112317614250010574 0ustar Source: sosreport Maintainer: Adam Stokes Section: admin Priority: optional Standards-Version: 3.9.5 Build-Depends: debhelper (>= 9), dh-python, python3-all, gettext, python3-nose, python3-six Homepage: https://github.com/sosreport/sosreport X-Python3-Version: >= 3.3 Package: sosreport Architecture: any Depends: ${python3:Depends}, ${misc:Depends}, python3-six Description: Set of tools to gather troubleshooting data from a system Sos is a set of tools that gathers information about system hardware and configuration. The information can then be used for diagnostic purposes and debugging. Sos is commonly used to help support technicians and developers.