strlcat(estring, "=", esize) >= esize ||
strlcat(estring, val, esize) >= esize) {
- errorx(1, "internal error, sudo_setenv() overflow");
+ errorx(1, _("internal error, sudo_setenv() overflow"));
}
sudo_putenv(estring, dupcheck, TRUE);
}
#ifdef ENV_DEBUG
if (env.envp[env.env_len] != NULL)
- errorx(1, "sudo_putenv: corrupted envp, len mismatch");
+ errorx(1, _("sudo_putenv: corrupted envp, length mismatch"));
#endif
if (dupcheck) {
size_t len;
int iswild, keepit = FALSE;
+ /* Preserve SHELL variable for "sudo -s". */
+ if (ISSET(sudo_mode, MODE_SHELL) && strncmp(var, "SHELL=", 6) == 0)
+ return TRUE;
+
for (cur = def_env_keep; cur; cur = cur->next) {
len = strlen(cur->value);
/* Deal with '*' wildcard */
if (bad != NULL) {
bad[blen - 2] = '\0'; /* remove trailing ", " */
log_error(NO_MAIL,
- "sorry, you are not allowed to set the following environment variables: %s", bad);
+ _("sorry, you are not allowed to set the following environment variables: %s"), bad);
/* NOTREACHED */
efree(bad);
}