2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-03 07:45:47 +00:00

Make user_details private to sudo.c.

This commit is contained in:
Todd C. Miller
2023-03-27 16:19:08 -06:00
parent e435b158b8
commit 5108c279af
9 changed files with 97 additions and 79 deletions

View File

@@ -407,7 +407,8 @@ direct_exec_allowed(struct command_details *details)
* we fact that we have two different controlling terminals to deal with.
*/
int
sudo_execute(struct command_details *details, struct command_status *cstat)
sudo_execute(struct command_details *details, struct user_details *user_details,
struct command_status *cstat)
{
debug_decl(sudo_execute, SUDO_DEBUG_EXEC);
@@ -461,7 +462,7 @@ sudo_execute(struct command_details *details, struct command_status *cstat)
* is configured, this returns false and we run the command without a pty.
*/
if (sudo_needs_pty(details)) {
if (exec_pty(details, cstat))
if (exec_pty(details, user_details, cstat))
goto done;
}
@@ -481,7 +482,7 @@ sudo_execute(struct command_details *details, struct command_status *cstat)
/*
* Run the command in the existing tty (if any) and wait for it to finish.
*/
exec_nopty(details, cstat);
exec_nopty(details, user_details, cstat);
done:
/* The caller will run any plugin close functions. */