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

@@ -122,7 +122,7 @@ audit_json_open(unsigned int version, sudo_conv_t conversation,
}
if (plugin_path != NULL && !TAILQ_EMPTY(&debug_files)) {
audit_debug_instance =
sudo_debug_register(plugin_path, NULL, NULL, &debug_files);
sudo_debug_register(plugin_path, NULL, NULL, &debug_files, -1);
if (audit_debug_instance == SUDO_DEBUG_INSTANCE_ERROR) {
*errstr = U_("unable to initialize debugging");
goto bad;