From: Mateusz Majewski Date: Wed, 12 Jan 2022 07:34:20 +0000 (+0100) Subject: Add empty secret case X-Git-Tag: accepted/tizen/unified/20220128.144311^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f0170e6080a69ebe412de9ebf23f01a302deff5;p=platform%2Fupstream%2Fgumd.git Add empty secret case Change-Id: Ie692f40adc514c127e518e2c5699a4d45402ea72 --- diff --git a/src/daemon/core/gumd-daemon-user.c b/src/daemon/core/gumd-daemon-user.c index 380a96b..66121a4 100755 --- a/src/daemon/core/gumd-daemon-user.c +++ b/src/daemon/core/gumd-daemon-user.c @@ -879,6 +879,10 @@ _set_secret ( self->priv->shadow->sp_pwdp = g_strdup ("!"); _set_secret_property (self, "x"); return TRUE; + } else if (g_strcmp0 (self->priv->pw->pw_passwd, "") == 0) { + self->priv->shadow->sp_pwdp = g_strdup (""); + _set_secret_property (self, ""); + return TRUE; } self->priv->shadow->sp_pwdp = gum_crypt_encrypt_secret (