From dc30c842bb006d5ecb765399f0ca9eca7533beeb Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 26 Aug 2021 09:57:25 -0600 Subject: [PATCH] No longer need to remap intercept fd but we do need to remap debug fd. The intercept fd is closed in the ctor but the debug fd will still be open. --- src/exec_common.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/exec_common.c b/src/exec_common.c index 92e667969..5cda162d4 100644 --- a/src/exec_common.c +++ b/src/exec_common.c @@ -79,11 +79,6 @@ enable_intercept(char *envp[], const char *dso, int intercept_fd) if (intercept_fd == -1) sudo_fatalx("%s: no intercept fd", __func__); - if (intercept_fd < INTERCEPT_FD_MIN) { - intercept_fd = fcntl(intercept_fd, F_DUPFD, INTERCEPT_FD_MIN); - if (intercept_fd == -1) - sudo_fatal("%s", U_("unable to dup intercept fd")); - } envp = sudo_preload_dso(envp, dso, intercept_fd); #else /* Intercept not supported, envp unchanged. */