From c847abaee3f980b63aaf8fae3b54f6942464ef7a Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 10 Nov 2013 16:46:51 -0500 Subject: [PATCH] Add command line option --force to behave like --ignore. --- doc/pwmd.html | 2 +- doc/pwmd.texi | 2 +- src/pwmd.c | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/pwmd.html b/doc/pwmd.html index 68fe15b1..99462b7b 100644 --- a/doc/pwmd.html +++ b/doc/pwmd.html @@ -276,7 +276,7 @@ protocol commands (see Commands). This overrides any

Run as a foreground process and do not fork into the background.

-
--ignore
+
--ignore, --force

Ignore cache pushing failures on startup. By default, pwmd will exit if an error occurred do to an invalid passphrase or other error.

diff --git a/doc/pwmd.texi b/doc/pwmd.texi index 5bdafa23..aea97f58 100644 --- a/doc/pwmd.texi +++ b/doc/pwmd.texi @@ -231,7 +231,7 @@ protocol commands (@pxref{Commands}). This overrides any @item --no-fork, -n Run as a foreground process and do not fork into the background. -@item --ignore +@item --ignore, --force Ignore cache pushing failures on startup. By default, @command{pwmd} will exit if an error occurred do to an invalid passphrase or other error. diff --git a/src/pwmd.c b/src/pwmd.c index 670ba64a..1056a16f 100644 --- a/src/pwmd.c +++ b/src/pwmd.c @@ -2358,7 +2358,7 @@ usage (const char *pn, int status) #endif " -n, --no-fork run as a foreground process\n" " -D, --disable-dump disable the LIST, XPATH and DUMP commands\n" - " --ignore ignore file errors during startup\n" + " --ignore, --force ignore file errors during startup\n" " --debug-level=keywords log protocol output (see manual for details)\n" " -o, --outfile=filename output file when importing or converting\n" " -C, --convert=filename convert a version 2 data file to version 3\n" @@ -2495,10 +2495,12 @@ main (int argc, char *argv[]) #ifdef WITH_AGENT OPT_AGENT, #endif - OPT_DEBUG_LEVEL, OPT_HOMEDIR, OPT_NO_FORK, OPT_DISABLE_DUMP, OPT_IGNORE, - OPT_RCFILE, OPT_CONVERT, OPT_PASSPHRASE_FILE, OPT_IMPORT, OPT_OUTFILE, - OPT_NO_PASSPHRASE_FILE, OPT_KEYGRIP, OPT_SIGN_KEYGRIP, OPT_KEYPARAM, - OPT_CIPHER, OPT_ITERATIONS, OPT_S2K_COUNT, OPT_NO_PASSPHRASE + OPT_DEBUG_LEVEL, OPT_HOMEDIR, OPT_NO_FORK, OPT_DISABLE_DUMP, + OPT_IGNORE, OPT_FORCE, OPT_RCFILE, OPT_CONVERT, + OPT_PASSPHRASE_FILE, OPT_IMPORT, OPT_OUTFILE, + OPT_NO_PASSPHRASE_FILE, OPT_KEYGRIP, OPT_SIGN_KEYGRIP, + OPT_KEYPARAM, OPT_CIPHER, OPT_ITERATIONS, OPT_S2K_COUNT, + OPT_NO_PASSPHRASE }; const char *optstring = "nf:C:k:I:o:"; const struct option longopts[] = { @@ -2512,6 +2514,7 @@ main (int argc, char *argv[]) {"no-fork", no_argument, 0, 'n'}, {"disable_dump", no_argument, 0, 0}, {"ignore", no_argument, 0, 0}, + {"force", no_argument, 0, 0}, {"rcfile", required_argument, 0, 'f'}, {"convert", required_argument, 0, 'C'}, {"passphrase-file", required_argument, 0, 'k'}, @@ -2626,6 +2629,7 @@ main (int argc, char *argv[]) secure = 1; break; case OPT_IGNORE: + case OPT_FORCE: force = 1; break; case OPT_RCFILE: -- 2.11.4.GIT