sudo_debug_register: add minfd argument to specify lowest fd number

Use this in sudo_intercept.so to avoid allocating a low-numbered
fd which the shell reserves for use by scripts.
This commit is contained in:
Todd C. Miller
2021-08-26 09:57:24 -06:00
parent d6a71fe32e
commit 70aef0eb2d
13 changed files with 35 additions and 16 deletions

View File

@@ -84,7 +84,7 @@ python_debug_register(const char *program,
if (debug_files != NULL && !TAILQ_EMPTY(debug_files)) {
if (program != NULL) {
instance = sudo_debug_register(program, python_subsystem_names,
(unsigned int *)python_subsystem_ids, debug_files);
(unsigned int *)python_subsystem_ids, debug_files, -1);
}
TAILQ_FOREACH_SAFE(debug_file, debug_files, entries, debug_next) {
TAILQ_REMOVE(debug_files, debug_file, entries);