From 87c95887b93ffac388b30ea81d41f83782e8cd34 Mon Sep 17 00:00:00 2001 From: lujie42 Date: Thu, 28 Oct 2021 20:06:53 +0800 Subject: [PATCH] add sm3 crypt support Signed-off-by: lujie42 --- libuser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libuser.c b/libuser.c index 7a36520..f5bedc1 100644 --- a/libuser.c +++ b/libuser.c @@ -298,6 +298,9 @@ pwdb_display_status(const char *username) } else if (strncmp(current, "$6$", 3) == 0) { msg = _("Password set, SHA512 crypt."); + } else if (strncmp(current, "$sm3$", 5) == + 0) { + msg = _("Password set, SM3 crypt."); } else { msg = _("Password set, unknown crypt variant."); } -- 1.8.3.1