2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

Add init_session function to struct policy_plugin that gets called

before the uid/gid/etc changes.  A struct passwd pointer is passed in,which may be NULL if the user does not exist in the passwd database.The sudoers module uses init_session to open the pam session as needed.
This commit is contained in:
Todd C. Miller
2010-05-27 14:46:39 -04:00
parent 27be96c9cd
commit 7e6d1d1f7d
7 changed files with 69 additions and 38 deletions

View File

@@ -639,7 +639,7 @@ script_execve(struct command_details *details, char *argv[], char *envp[],
close(sv[0]);
fcntl(sv[1], F_SETFD, FD_CLOEXEC);
/* XXX - defer call to exec_setup() until my_execve()? */
if (exec_setup(details) == 0) {
if (exec_setup(details) == TRUE) {
/* headed for execve() */
if (log_io) {
/* Close the other end of the stdin/stdout/stderr pipes. */