debian-koji/koji
Mike McLean 4fddafc54d rmtree: use fork
These changes work around a thread safety issue in our rmtree
implementation, which uses chdir to traverse the directory tree.
Using chdir resolves issues deleting paths longer than PATH_MAX, but
makes the code inherently unsafe in a threaded environment.

Now, the main rmtree function uses fork to perform the actions in a
dedicated process.
To avoid possible locking issues with the logging module, we introduce a
simple proxy logger for the subprocess.

Fixes: https://pagure.io/koji/issue/3755

For historical context see:
https://pagure.io/koji/issue/201
https://pagure.io/koji/issue/2481
https://pagure.io/koji/issue/2714
2024-04-10 11:20:15 +02:00
..
__init__.py Use dnf5-compatible "group install" command 2024-03-05 13:17:35 +01:00
_version.py Release notes 1.34 2024-01-23 13:12:12 +01:00
arch.py backport py27 compatible file open with encoding 2021-02-16 14:13:03 +01:00
context.py flake8: apply E3 rules 2020-03-03 21:38:22 +08:00
daemon.py clean up logging 2024-03-28 15:58:07 +01:00
Makefile replace deprecated distutils 2023-01-16 12:36:04 +01:00
plugin.py draft builds 2024-01-05 10:00:29 +00:00
policy.py New scmpolicy plugin 2024-02-09 14:47:37 +01:00
rpmdiff.py fix flake8 2022-12-05 13:32:26 +01:00
server.py also raise 400 errors when we can't read the client upload stream 2022-03-21 14:34:30 +01:00
tasks.py handle refusal with an exception 2024-02-29 11:01:43 +01:00
util.py rmtree: use fork 2024-04-10 11:20:15 +02:00
xmlrpcplus.py Bandit [B411]: use defusedxml to prevent remote XML attacks 2024-02-02 09:08:18 +01:00