mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
parse_args: an environment variable may not start with '='.
Also check VAR=val format in validate_env_vars() and add an error message if insert_env_vars() fails.
This commit is contained in:
@@ -794,8 +794,11 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
|
||||
}
|
||||
|
||||
/* Insert user-specified environment variables. */
|
||||
if (!insert_env_vars(sudo_user.env_vars))
|
||||
if (!insert_env_vars(sudo_user.env_vars)) {
|
||||
sudo_warnx("%s",
|
||||
U_("error setting user-specified environment variables"));
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Note: must call audit before uid change. */
|
||||
if (ISSET(sudo_mode, MODE_EDIT)) {
|
||||
|
Reference in New Issue
Block a user