argv is passed to execve(3), which for historic reasons is non-const,
but doesn't modify the strings.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
#include "alloc.h"
#include "attr.h"
+#include "cast.h"
#include "prototypes.h"
#include "defines.h"
#include "pwauth.h"
* Use the shell and create an argv
* with the rest of the command line included.
*/
- argv[-1] = cp;
+ argv[-1] = const_cast(char *, cp);
execve_shell (shellstr, &argv[-1], environ);
err = errno;
(void) fprintf (stderr,