Skip to content

Commit d098431

Browse files
committed
Merge branch 'beta' into dev
2 parents 78d416b + ec6b8cd commit d098431

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ The table below shows which release corresponds to each branch, and what date th
130130
[2476]: https://github.com/Gallopsled/pwntools/pull/2476
131131
[2364]: https://github.com/Gallopsled/pwntools/pull/2364
132132

133+
## 4.14.1
134+
135+
- [#2533][2533] Fix installation on Python 3.5 and lower
136+
- [#2518][2518] fix: update apport coredump path handling for CorefileFinder
137+
138+
[2533]: https://github.com/Gallopsled/pwntools/pull/2533
139+
[2518]: https://github.com/Gallopsled/pwntools/pull/2518
140+
133141
## 4.14.0 (`stable`)
134142

135143
- [#2356][2356] Add local libc database provider for libcdb

pwnlib/elf/corefile.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,18 @@ def apport_coredump(self):
15101510
# should be unique enough that we can just glob.
15111511

15121512
boot_id = read('/proc/sys/kernel/random/boot_id').strip().decode()
1513-
path = self.exe.replace('/', '_')
1513+
1514+
# Use the absolute path of the executable
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`).
1524+
path = os.path.abspath(self.exe).replace('/', '_').replace('.', '_')
15141525

15151526
# Format the name
15161527
corefile_name = 'core.{path}.{uid}.{boot_id}.{pid}.*'.format(

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies = [
5252
"six>=1.12.0",
5353
"rpyc",
5454
"colored_traceback",
55-
"unix-ar; python_version>='3.6'",
55+
"unix-ar; python_version >= '3.6'",
5656
"zstandard",
5757
]
5858

0 commit comments

Comments
 (0)