Make sudo pass -Wwrite-strings

This commit is contained in:
Todd C. Miller
2022-06-28 16:33:15 -06:00
parent b3a8cad346
commit 13672f28df
77 changed files with 590 additions and 640 deletions

View File

@@ -356,7 +356,7 @@ exec_mailer(int pipein)
char *last, *mflags, *p, *argv[MAX_MAILFLAGS + 1];
const char *mpath = evl_conf->mailerpath;
int i;
char * const root_envp[] = {
const char * const root_envp[] = {
"HOME=/",
"PATH=/usr/bin:/bin:/usr/sbin:/sbin",
"LOGNAME=root",
@@ -409,7 +409,7 @@ exec_mailer(int pipein)
}
sudo_debug_exit(__func__, __FILE__, __LINE__, sudo_debug_subsys);
if (evl_conf->mailuid == ROOT_UID)
execve(mpath, argv, root_envp);
execve(mpath, argv, (char **)root_envp);
else
execv(mpath, argv);
syslog(LOG_ERR, _("unable to execute %s: %m"), mpath); // -V618