Skip to content

Commit

Permalink
Allow setting reported OS from the command line
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
  • Loading branch information
cernekee committed Oct 28, 2012
1 parent b3992b0 commit c8be5eb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.c
Expand Up @@ -111,6 +111,7 @@ enum {
OPT_NON_INTER,
OPT_DTLS_LOCAL_PORT,
OPT_STOKEN,
OPT_OS,
};

#ifdef __sun__
Expand Down Expand Up @@ -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)
};

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit c8be5eb

Please sign in to comment.