Move preload_dso() to its own file and rename to sudo_preload_dso().
It now takes an intercept fd as an optional argument instead of a list of extra variables to add. This lets us check whether it is already set to the expected value (and add it if not). sudo_intercept.so now uses sudo_preload_dso() to make sure that LD_PRELOAD and SUDO_INTERCEPT_FD are set properly before executing.
This commit is contained in:
@@ -117,4 +117,7 @@ bool utmp_login(const char *from_line, const char *to_line, int ttyfd,
|
||||
const char *user);
|
||||
bool utmp_logout(const char *line, int status);
|
||||
|
||||
/* exec_preload.c */
|
||||
char **sudo_preload_dso(char *envp[], const char *dso_file, int intercept_fd);
|
||||
|
||||
#endif /* SUDO_EXEC_H */
|
||||
|
Reference in New Issue
Block a user