Skip to content

Commit

Permalink
other fix for rlm_exec
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jun 14, 2013
1 parent 6f5a53d commit 5c6d909
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/exec.c
Expand Up @@ -99,12 +99,12 @@ pid_t radius_start_program(char const *cmd, REQUEST *request,
#endif
int argc;
int i;
char *argv[MAX_ARGV];
char const *argv[MAX_ARGV];
char argv_buf[4096];
#define MAX_ENVP 1024
char *envp[MAX_ENVP];

argc = rad_expand_xlat(request, cmd, MAX_ARGV, (char const **) argv, 1, sizeof(argv_buf), argv_buf);
argc = rad_expand_xlat(request, cmd, MAX_ARGV, argv, 1, sizeof(argv_buf), argv_buf);
if (argc <= 0) {
RDEBUG("invalid command line '%s'.", cmd);
return -1;
Expand Down Expand Up @@ -258,7 +258,7 @@ pid_t radius_start_program(char const *cmd, REQUEST *request,
*/
closefrom(3);

execve(argv[0], argv, envp);
execve(argv[0], (char * const *) argv, envp);
RWDEBUG("Failed to execute %s: %s", argv[0], strerror(errno));
exit(1);
}
Expand Down

0 comments on commit 5c6d909

Please sign in to comment.