mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Use %u to print uid/gid, not %lu and adjust casts to match.
This commit is contained in:
@@ -641,9 +641,9 @@ rebuild_env(int noexec)
|
||||
|
||||
/* Add the SUDO_USER, SUDO_UID, SUDO_GID environment variables. */
|
||||
sudo_setenv("SUDO_USER", user_name, TRUE);
|
||||
snprintf(idbuf, sizeof(idbuf), "%lu", (unsigned long) user_uid);
|
||||
snprintf(idbuf, sizeof(idbuf), "%u", (unsigned int) user_uid);
|
||||
sudo_setenv("SUDO_UID", idbuf, TRUE);
|
||||
snprintf(idbuf, sizeof(idbuf), "%lu", (unsigned long) user_gid);
|
||||
snprintf(idbuf, sizeof(idbuf), "%u", (unsigned int) user_gid);
|
||||
sudo_setenv("SUDO_GID", idbuf, TRUE);
|
||||
|
||||
/* Free old environment. */
|
||||
|
Reference in New Issue
Block a user