/usr/share/apport/package-hooks
NameSizeModeActions
cloud-init.py1760644editdlrm
cryptsetup.py10820644editdlrm
isc-dhcp-client.py17960644editdlrm
openssh-client.py12130644editdlrm
openssh-server.py10040644editdlrm
source_apparmor.py28310644editdlrm
source_apport.py5690644editdlrm
source_byobu.py3390644editdlrm
source_console-setup.py3740644editdlrm
source_debian-installer.py19060644editdlrm
source_grub2.py37820644editdlrm
source_linux-5.4.py63020644editdlrm
source_linux-firmware.py63020644editdlrm
source_linux-meta-oem-osp1.py63020644editdlrm
source_linux-meta-oem.py63020644editdlrm
source_linux-meta-raspi.py63020644editdlrm
source_linux-meta.py63020644editdlrm
source_linux-oem-5.4.py63020644editdlrm
source_linux-oem-osp1.py63020644editdlrm
source_linux-oem.py63020644editdlrm
source_linux-signed-5.4.py63020644editdlrm
source_linux-signed-oem-5.4.py63020644editdlrm
source_linux-signed-oem-osp1.py63020644editdlrm
source_linux-signed-oem.py63020644editdlrm
source_linux-signed.py63020644editdlrm
source_linux.py63020644editdlrm
source_mdadm.py22520644editdlrm
source_mysql-8.0.py25210644editdlrm
source_nginx.py6840644editdlrm
source_plymouth.py14740644editdlrm
source_shadow.py7200644editdlrm
source_shim-signed.py20000644editdlrm
source_shim.py20000644editdlrm
source_sudo.py11590644editdlrm
source_ubiquity.py77480644editdlrm
source_ubuntu-release-upgrader.py22380644editdlrm
source_unattended-upgrades.py7050644editdlrm
source_update-manager.py22900644editdlrm
subiquity.py13820644editdlrm
systemd.py8720644editdlrm
udev.py4550644editdlrm
Edit: /usr/share/apport/package-hooks/source_shim-signed.py (2000B)
'''apport package hook for shim and shim-signed (c) 2015 Canonical Ltd. Author: Brian Murray ''' import errno import os import re from apport.hookutils import ( command_available, command_output, recent_syslog, attach_file, attach_root_command_outputs) efiarch = {'amd64': 'x64', 'i386': 'ia32', 'arm64': 'aa64' } grubarch = {'amd64': 'x86_64', 'i386': 'i386', 'arm64': 'arm64' } def add_info(report, ui): efiboot = '/boot/efi/EFI/ubuntu' if command_available('efibootmgr'): report['EFIBootMgr'] = command_output(['efibootmgr', '-v']) else: report['EFIBootMgr'] = 'efibootmgr not available' commands = {} try: directory = os.stat(efiboot) except OSError as e: if e.errno == errno.ENOENT: report['Missing'] = '/boot/efi/EFI/ubuntu directory is missing' return if e.errno == errno.EACCES: directory= True if directory: arch = report['Architecture'] commands['BootEFIContents'] = 'ls %s' % efiboot commands['ShimDiff'] = 'diff %s/shim%s.efi /usr/lib/shim/shim%s.efi.signed' % (efiboot, efiarch[arch], efiarch[arch]) commands['GrubDiff'] = 'diff %s/grub%s.efi /usr/lib/grub/%s-efi-signed/grub%s.efi.signed' %(efiboot, efiarch[arch], grubarch[arch], efiarch[arch]) efivars_dir = '/sys/firmware/efi/efivars' sb_var = os.path.join(efivars_dir, 'SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c') mok_var = os.path.join(efivars_dir, 'MokSBStateRT-605dab50-e046-4300-abb6-3dd810dd8b23') attach_file(report, '/proc/sys/kernel/moksbstate_disabled') commands['SecureBoot'] = 'od -An -t u1 %s' % sb_var commands['MokSBStateRT'] = 'od -An -t u1 %s' % mok_var attach_root_command_outputs(report, commands) report['EFITables'] = recent_syslog(re.compile(r'(efi|esrt):|Secure boot'))