From 15883e61b2a76a96bf4c234a5f4ae30f494a082b Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Mon, 16 Feb 2026 02:18:08 +0100 Subject: [PATCH] mkpasswd: move the "national" algorithms Keep them around the end of the list because they should never be selected automatically or preferred. --- mkpasswd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkpasswd.c b/mkpasswd.c index 646be43..e92d11c 100644 --- a/mkpasswd.c +++ b/mkpasswd.c @@ -103,9 +103,6 @@ static const struct crypt_method methods[] = { { "md5", "$1$", 8, 8, 0, NULL }, #if defined XCRYPT_VERSION_NUM { "yescrypt", "$y$", 0, 0, 1, "Yescrypt" }, -#if XCRYPT_VERSION_NUM >= ((4 << 16) | 4) - { "gost-yescrypt", "$gy$", 0, 0, 1, "GOST Yescrypt" }, -#endif { "scrypt", "$7$", 0, 0, 1, "scrypt" }, #endif #ifdef HAVE_BCRYPT_OBSOLETE @@ -141,6 +138,9 @@ static const struct crypt_method methods[] = { #endif { "descrypt", "", 2, 2, 0, N_("standard 56 bit DES-based crypt(3)") }, +#if XCRYPT_VERSION_NUM >= ((4 << 16) | 4) + { "gost-yescrypt", "$gy$", 0, 0, 1, "GOST Yescrypt" }, +#endif #if defined FreeBSD || defined XCRYPT_VERSION_NUM { "nt", "$3$", 0, 0, 0, "NT-Hash" }, #endif