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.
This commit is contained in:
Todd C. Miller
2021-08-26 09:57:25 -06:00
parent 70aef0eb2d
commit dc30c842bb

View File

@@ -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. */