Skip to content

Commit b742810

Browse files
committed
chore: update comment on Apport core path handling
1 parent d6ce0dd commit b742810

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pwnlib/elf/corefile.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,15 @@ def apport_coredump(self):
15121512
boot_id = read('/proc/sys/kernel/random/boot_id').strip().decode()
15131513

15141514
# Use the absolute path of the executable
1515-
# Apport uses the executable's pathname in the core filename
1515+
# Apport uses the executable's path to determine the core dump filename
1516+
#
1517+
# Reference source:
1518+
# https://github.com/canonical/apport/blob/4bbb179b8f92989bf7c1ee3692074f35d70ef3e8/data/apport#L110
1519+
# https://github.com/canonical/apport/blob/4bbb179b8f92989bf7c1ee3692074f35d70ef3e8/apport/fileutils.py#L599
1520+
#
1521+
# Apport calls `get_core_path` with `options.executable_path`, which corresponds to
1522+
# the executable's pathname, as specified by the `%E` placeholder
1523+
# in the core pattern (see `man core` and `apport --help`).
15161524
path = os.path.abspath(self.exe).replace('/', '_').replace('.', '_')
15171525

15181526
# Format the name

0 commit comments

Comments
 (0)