diff options
author | Robert Clausecker <fuz@fuz.su> | 2021-11-03 14:28:19 +0100 |
---|---|---|
committer | Juraj Lutter <otis@FreeBSD.org> | 2021-11-03 14:50:38 +0100 |
commit | 890021e11374ddd3c00ae90957b1ad26d8749e30 (patch) | |
tree | a731bfce78cb38b3d8af86b8873b116fa52cac42 /security/kdbxviewer/files/patch-src_main.c | |
parent | databases/redisjson: update the checksum for re-rolled distro (diff) |
security/kdbxviewer: update to 0.1.9 and unbreak with -fno-common
Summary:
- Unbreak this port by adding an extern keyword in the right place.
- Fix ANSI color setting on abort()
- Upstream has moved to a new github account
(https://github.com/luelista/kdbxviewer) but appears to have abandoned the
project. Move upstream to a fork which appears to have continued development
on the project. Upstream does not tag releases but periodically changes the
README to indicate a new release.
- Remove dead WWW and replace it with upstream repository.
- Set MAINTAINER to reporter
Differential Revision: https://reviews.freebsd.org/D32822
Diffstat (limited to 'security/kdbxviewer/files/patch-src_main.c')
-rw-r--r-- | security/kdbxviewer/files/patch-src_main.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/security/kdbxviewer/files/patch-src_main.c b/security/kdbxviewer/files/patch-src_main.c new file mode 100644 index 000000000000..b1eaf090b2dd --- /dev/null +++ b/security/kdbxviewer/files/patch-src_main.c @@ -0,0 +1,70 @@ +--- src/main.c.orig 2021-10-10 14:14:08 UTC ++++ src/main.c +@@ -198,7 +198,7 @@ int main(int argc, char **argv) { + case 'i': + case 'h': + case 'V': +- if (command != 0) abort(-1, "%sMultiple commands not allowed\n", ERRC); ++ if (command != 0) abort(-1, "%sMultiple commands not allowed%s\n", ERRC, NORMAL); + command = opt; + break; + case 'v': +@@ -215,15 +215,15 @@ int main(int argc, char **argv) { + searchall = TRUE; + case 's': + if (search != NULL) +- abort(-2, "%sSuperfluous search term: %s\n", ERRC, optarg); ++ abort(-2, "%sSuperfluous search term: %s%s\n", ERRC, optarg, NORMAL); + search = optarg; + break; + case 'd': + if ((kdbxfile = fopen(optarg, "r")) == NULL) +- abort(-3, "%sCan't open database file: %s\n", ERRC, optarg); ++ abort(-3, "%sCan't open database file: %s%s\n", ERRC, optarg, NORMAL); + kdbxfilename = optarg; + default: +- abort(-4, "%sUnrecognized argument -%s\n", ERRC, argv[optind]); ++ abort(-4, "%sUnrecognized argument -%s%s\n", ERRC, argv[optind], NORMAL); + } + } + +@@ -238,10 +238,10 @@ int main(int argc, char **argv) { + + if (optind < argc) // Must be [-s] argument, unless already given + if (search == NULL) search = argv[optind++]; +- else abort(-5, "%sSuperfluous argument: %s\n", ERRC, argv[optind]); ++ else abort(-5, "%sSuperfluous argument: %s%s\n", ERRC, argv[optind], NORMAL); + + if (optind < argc) +- abort(-6, "%sSuperfluous argument: %s\n", ERRC, argv[optind]); ++ abort(-6, "%sSuperfluous argument: %s%s\n", ERRC, argv[optind], NORMAL); + + if (*kdbxfilename == 0) { // Try configfile for database filename + *filename = 0; +@@ -253,22 +253,22 @@ int main(int argc, char **argv) { + *filename = 0; + } + if (*kdbxfilename == 0) +- abort(-7, "%sNo database specified on commandline or in configfile\n", +- ERRC); ++ abort(-7, "%sNo database specified on commandline or in configfile%s\n", ++ ERRC, NORMAL); + else strcpy(filename, kdbxfilename); + } + + // Set default mode depending on search + if (search != NULL) { // Search requested + if (command == 'i' || command == 'x') +- abort(-8, "%sCannot Search with -i/--interactive or -x/--xml\n", ERRC); ++ abort(-8, "%sCannot Search with -i/--interactive or -x/--xml%s\n", ERRC, NORMAL); + if (command == 0) command = 't'; + } else { // No search + if (command == 0) command = 'i'; + } + + // Open the database +- warn("%skdbxviewer", RESET); ++ warn("%skdbxviewer", NORMAL); + if (password == NULL) { + warn(" - Opening KDBX database %s%s\n%sPassword: %s", FIELD, kdbxfilename, PWC, NORMAL); + password = getpass(""); |