summaryrefslogtreecommitdiff
path: root/src/whack/whack.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
committerYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
commitb34738ed08c2227300d554b139e2495ca5da97d6 (patch)
tree62f33b52820f2e49f0e53c0f8c636312037c8054 /src/whack/whack.c
parent0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff)
downloadvyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz
vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip
Imported Upstream version 4.6.4
Diffstat (limited to 'src/whack/whack.c')
-rw-r--r--src/whack/whack.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/whack/whack.c b/src/whack/whack.c
index ac2d3ea40..a7945d6d8 100644
--- a/src/whack/whack.c
+++ b/src/whack/whack.c
@@ -176,7 +176,7 @@ static void help(void)
" \\\n "
" [--debug-control]"
" [--debug-lifecycle]"
- " [--debug-klips]"
+ " [--debug-kernel]"
" [--debug-dns]"
" \\\n "
" [--debug-natt]"
@@ -207,6 +207,7 @@ static void help(void)
" [--listcrls]"
" [--listocsp]"
" [--listcards]"
+ " [--listplugins]"
" [--listall]"
"\n\n"
"purge: whack"
@@ -379,6 +380,7 @@ enum {
LST_CRLS,
LST_OCSP,
LST_CARDS,
+ LST_PLUGINS,
LST_ALL,
# define LST_LAST LST_ALL /* last list option */
@@ -571,6 +573,7 @@ static const struct option long_opts[] = {
{ "listcrls", no_argument, NULL, LST_CRLS + OO },
{ "listocsp", no_argument, NULL, LST_OCSP + OO },
{ "listcards", no_argument, NULL, LST_CARDS + OO },
+ { "listplugins", no_argument, NULL, LST_PLUGINS + OO },
{ "listall", no_argument, NULL, LST_ALL + OO },
/* options for an end description */
@@ -797,12 +800,14 @@ static void check_end(whack_end_t *this, whack_end_t *that,
static void get_secret(int sock)
{
- const char *buf, *secret;
+ const char *buf = NULL, *secret;
int len;
fflush(stdout);
usleep(20000); /* give fflush time for flushing */
+#ifdef HAVE_GETPASS
buf = getpass("Enter: ");
+#endif
secret = (buf == NULL)? "" : buf;
/* send the secret to pluto */
@@ -1232,6 +1237,7 @@ int main(int argc, char **argv)
case LST_CRLS: /* --listcrls */
case LST_OCSP: /* --listocsp */
case LST_CARDS: /* --listcards */
+ case LST_PLUGINS: /* --listplugins */
msg.whack_list |= LELEM(c - LST_ALGS);
continue;