On Thu, May 21, 2015 at 06:50:13PM -0700, Donald Sharp wrote:
> - const char *argv[4] = { "sh", "-c", shell_cmd, NULL};
> - execv("/bin/sh",(char *const *)argv);
> + char *shell = strdup("sh");
Urgh. There's a better way to fix 'const' than calling strdup:
char shell[] = "sh";
Can you change it to that?
-David
> + char *dashc = strdup("-c");
> + char *scmd = strdup(shell_cmd);
> + char *const argv[4] = { shell, dashc, scmd, NULL};
> + execv("/bin/sh", argv);
> zlog_err("execv(/bin/sh -c '%s') failed: %s",
> shell_cmd,safe_strerror(errno));
> _exit(127);
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev