From c8be5eb6130e8d9510a1ceaf24a2680b7071ac2f Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Sat, 27 Oct 2012 23:20:38 -0700 Subject: [PATCH] Allow setting reported OS from the command line Signed-off-by: Kevin Cernekee --- main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.c b/main.c index da696488..325ccd31 100644 --- a/main.c +++ b/main.c @@ -111,6 +111,7 @@ enum { OPT_NON_INTER, OPT_DTLS_LOCAL_PORT, OPT_STOKEN, + OPT_OS, }; #ifdef __sun__ @@ -175,6 +176,7 @@ static struct option long_options[] = { OPTION("non-inter", 0, OPT_NON_INTER), OPTION("dtls-local-port", 1, OPT_DTLS_LOCAL_PORT), OPTION("stoken", 2, OPT_STOKEN), + OPTION("os", 1, OPT_OS), OPTION(NULL, 0, 0) }; @@ -713,6 +715,13 @@ int main(int argc, char **argv) use_stoken = 1; token_str = keep_config_arg(); break; + case OPT_OS: + if (openconnect_set_reported_os(vpninfo, config_arg)) { + fprintf(stderr, _("Invalid OS identity \"%s\"\n"), + config_arg); + exit(1); + } + break; default: usage(); } -- 2.49.0