2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00
This commit is contained in:
Todd C. Miller 2025-06-08 07:27:59 -06:00
parent afd01d856b
commit ee1383e311

View File

@ -1123,7 +1123,7 @@ rebuild_env(const struct sudoers_context *ctx)
CHECK_SETENV2("SUDO_COMMAND", ctx->user.cmnd, true, true); CHECK_SETENV2("SUDO_COMMAND", ctx->user.cmnd, true, true);
} }
/* Add the SUDO_{USER,UID,GID,HOME,TTY,TTY} environment variables. */ /* Add the SUDO_{USER,UID,GID,HOME,TTY} environment variables. */
CHECK_SETENV2("SUDO_USER", ctx->user.name, true, true); CHECK_SETENV2("SUDO_USER", ctx->user.name, true, true);
(void)snprintf(idbuf, sizeof(idbuf), "%u", (unsigned int) ctx->user.uid); (void)snprintf(idbuf, sizeof(idbuf), "%u", (unsigned int) ctx->user.uid);
CHECK_SETENV2("SUDO_UID", idbuf, true, true); CHECK_SETENV2("SUDO_UID", idbuf, true, true);