Skip to content

Commit

Permalink
Merge branch 'GP_stop_asking_to_report_unexpected_arg19=4' of gitlab.…
Browse files Browse the repository at this point in the history
…com:openconnect/openconnect
  • Loading branch information
dwmw2 committed May 14, 2020
2 parents 63ca1e4 + 6d87460 commit b10efc3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion auth-globalprotect.c
Expand Up @@ -299,7 +299,8 @@ static const struct gp_login_arg gp_login_args[] = {
{ .opt="portal-userauthcookie", .show=1},
{ .opt="portal-prelogonuserauthcookie", .show=1},
{ .unknown=1 },
{ .unknown=1 }, /* have seen value of "4" in some logs */
{ .opt="usually-equals-4", .show=1 }, /* newer servers send "4" here, meaning unknown */
{ .opt="usually-equals-unknown", .show=1 }, /* newer servers send "unknown" here */
};
static const int gp_login_nargs = (sizeof(gp_login_args)/sizeof(*gp_login_args));

Expand Down
16 changes: 8 additions & 8 deletions gpst.c
Expand Up @@ -984,7 +984,7 @@ static int run_hip_script(struct openconnect_info *vpninfo)
return ret;
} else {
/* in child: run HIP script */
char *hip_argv[32];
const char *hip_argv[32];
int i = 0;
close(pipefd[0]);
/* The duplicated fd does not have O_CLOEXEC */
Expand All @@ -994,20 +994,20 @@ static int run_hip_script(struct openconnect_info *vpninfo)
exit(1);

hip_argv[i++] = openconnect_utf8_to_legacy(vpninfo, vpninfo->csd_wrapper);
hip_argv[i++] = (char *)"--cookie";
hip_argv[i++] = "--cookie";
hip_argv[i++] = vpninfo->cookie;
if (vpninfo->ip_info.addr) {
hip_argv[i++] = (char *)"--client-ip";
hip_argv[i++] = (char *)vpninfo->ip_info.addr;
hip_argv[i++] = "--client-ip";
hip_argv[i++] = vpninfo->ip_info.addr;
}
if (vpninfo->ip_info.addr6) {
hip_argv[i++] = (char *)"--client-ipv6";
hip_argv[i++] = (char *)vpninfo->ip_info.addr6;
hip_argv[i++] = "--client-ipv6";
hip_argv[i++] = vpninfo->ip_info.addr6;
}
hip_argv[i++] = (char *)"--md5";
hip_argv[i++] = "--md5";
hip_argv[i++] = vpninfo->csd_token;
hip_argv[i++] = NULL;
execv(hip_argv[0], hip_argv);
execv(hip_argv[0], (char **)hip_argv);

out:
vpn_progress(vpninfo, PRG_ERR,
Expand Down

0 comments on commit b10efc3

Please sign in to comment.