Blame SOURCES/nss-modutil-suppress-password.patch

7f4443
# HG changeset patch
7f4443
# User Daiki Ueno <dueno@redhat.com>
7f4443
# Date 1510244757 -3600
7f4443
#      Thu Nov 09 17:25:57 2017 +0100
7f4443
# Node ID 523734e69b5cdd7c2c9047e705e858da352a3b24
7f4443
# Parent  54be8a4501d454b2b7454e4a44ea013738e0b693
7f4443
Bug 1415847, modutil: Suppress unnecessary password prompt, r=kaie
7f4443
7f4443
diff --git a/cmd/modutil/pk11.c b/cmd/modutil/pk11.c
7f4443
--- a/cmd/modutil/pk11.c
7f4443
+++ b/cmd/modutil/pk11.c
7f4443
@@ -728,7 +728,7 @@ ChangePW(char *tokenName, char *pwFile, 
7f4443
                 ret = BAD_PW_ERR;
7f4443
                 goto loser;
7f4443
             }
7f4443
-        } else {
7f4443
+        } else if (PK11_NeedLogin(slot)) {
7f4443
             for (matching = PR_FALSE; !matching;) {
7f4443
                 oldpw = SECU_GetPasswordString(NULL, "Enter old password: ");
7f4443
                 if (PK11_CheckUserPassword(slot, oldpw) == SECSuccess) {