Skip to content

Commit

Permalink
Allow configuring 'no-ftm-push' in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanderveen committed Jun 18, 2020
1 parent 830701a commit 7d5be42
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/openfortivpn.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ password = bar
.br
# otp\-prompt = Please
.br
# This would disable FTM push notification support, and use OTP instead
.br
# no\-ftm\-push = 1
.br
# pinentry = pinentry program
.br
user\-cert = @SYSCONFDIR@/openfortivpn/user\-cert.pem
Expand Down
9 changes: 9 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,15 @@ int load_config(struct vpn_config *cfg, const char *filename)
continue;
}
cfg->otp_delay = otp_delay;
} else if (strcmp(key, "no-ftm-push") == 0) {
int no_ftm_push = strtob(val);

if (no_ftm_push < 0) {
log_warn("Bad no-ftm-push in config file: \"%s\".\n",
val);
continue;
}
cfg->no_ftm_push = no_ftm_push;
} else if (strcmp(key, "pinentry") == 0) {
free(cfg->pinentry);
cfg->pinentry = strdup(val);
Expand Down

0 comments on commit 7d5be42

Please sign in to comment.