From 9b5f70b93e038df5446bd37a4adac5a0380748e7 Mon Sep 17 00:00:00 2001 From: johannes Date: Wed, 21 Feb 2018 23:57:11 +0100 Subject: [PATCH] crypt_checkpass: include HAVE_CRYPT_H definition, add NULL check --- openbsd-compat/crypt_checkpass.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openbsd-compat/crypt_checkpass.c b/openbsd-compat/crypt_checkpass.c index dafd2dae..d10b3a57 100644 --- a/openbsd-compat/crypt_checkpass.c +++ b/openbsd-compat/crypt_checkpass.c @@ -1,5 +1,6 @@ /* OPENBSD ORIGINAL: lib/libc/crypt/cryptutil.c */ +#include "includes.h" #include #ifdef HAVE_CRYPT_H #include @@ -10,6 +11,8 @@ int crypt_checkpass(const char *pass, const char *goodhash) { + char *c; + if (goodhash == NULL) goto fail; @@ -17,7 +20,11 @@ crypt_checkpass(const char *pass, const char *goodhash) if (strlen(goodhash) == 0 && strlen(pass) == 0) return 0; - if (strcmp(crypt(pass, goodhash), goodhash) == 0) + c = crypt(pass, goodhash); + if (c == NULL) + goto fail; + + if (strcmp(c, goodhash) == 0) return 0; fail: 2d6ad7908478bbe64c3d3c'>refslogtreecommitdiff
AgeCommit message (Expand)Author
2021-12-22tests: Move keys into ./tests/keys/ and add a third ed25519 key....The third key will be used in an upcoming commit. Rename public keys to .pub. * guix/tests/gnupg.scm (%ed25519-3-public-key-file): New variable. (%ed25519-3-secret-key-file): New variable. (%ed25519-2-public-key-file): Renamed from %ed25519bis-public-key-file. (%ed25519-2-secret-key-file): Renamed from %ed25519bis-secret-key-file. * tests/keys/ed25519-3.key: New file. * tests/keys/ed25519-3.sec: New file. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Attila Lendvai
2021-04-20import: Remove Nix importer....This importer has suffered from bitrot and no longer works with current Nix and Nixpkgs. See <https://bugs.gnu.org/32339> and <https://bugs.gnu.org/36255>. * guix/import/snix.scm, guix/scripts/import/nix.scm, tests/snix.scm: Remove. * Makefile.am (MODULES, SCM_TESTS): Remove them. * guix/scripts/import.scm (importers): Remove "nix". * build-aux/test-env.in: Remove NIXPKGS variable. * configure.ac: Remove '--with-nixpkgs' option. * doc/guix.texi (Invoking guix import): Remove bit about "guix import nix". * etc/completion/fish/guix.fish: Likewise. Ludovic Courtès