This file is indexed.

/usr/share/apport/package-hooks/source_unity-control-center.py is in unity-control-center 15.04.0+18.04.20180216-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os, apport.packaging, re
import glob
from apport.hookutils import *

def add_info(report):
	# the issue is not in the unity-control-center code so reassign
	if "Stacktrace" in report and "/unity-control-center-1/" in report["Stacktrace"]:
		for words in report["Stacktrace"].split():
			if words.startswith("/usr/lib/") and "/control-center-1/" in words:
			    if apport.packaging.get_file_package(words) != 'unity-control-center':
    				report.add_package_info(apport.packaging.get_file_package(words))
    				return    				
			    component = re.compile("lib(\w*).so").search(words).groups(1)[0]
			    report['Title'] = '[%s]: %s' % (component, report.get('Title', report.standard_title()))
			    report['Tags'] = '%s %s' % (report.get('Tags', ""), component)
			    break # Stop on the first .so that's the interesting one

	# collect informations on the /usr/lib/control-center-1 components 
	plugin_packages = set()
	for paneldir in (['/usr/lib/control-center-1'] + glob.glob('/usr/lib/*/control-center-1')):
		for dirpath, dirnames, filenames in os.walk(paneldir):
			for filename in filenames:
				path = os.path.join(dirpath, filename)
				package = apport.packaging.get_file_package(path)
				if package == 'unity-control-center':
					continue
				if not package:
					continue

				plugin_packages.add(package)
		if plugin_packages:
			report["usr_lib_unity-control-center"] = package_versions(*sorted(plugin_packages))