From a51168ce9ab849f857efd96eae66cff5247a45a4 Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Thu, 18 Jun 2020 17:35:01 +0800
Subject: [PATCH] disable set passwd without confirmation

---
 pyanaconda/input_checking.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pyanaconda/input_checking.py b/pyanaconda/input_checking.py
index 9efbd7b..b0fd605 100644
--- a/pyanaconda/input_checking.py
+++ b/pyanaconda/input_checking.py
@@ -412,6 +412,10 @@ class PasswordValidityCheck(InputCheck):
             pw_score = 4
             status_text = _(constants.SecretStatus.STRONG.value)
 
+        #disable set password without confirnation
+        if not error_message and not check_request.password_confirmation:
+            error_message = _(constants.SECRET_CONFIRM_ERROR_GUI[check_request.secret_type])
+
         # the policy influences the overall success of the check
         # - score 0 & strict == True -> success = False
         # - score 0 & strict == False -> success = True
-- 
2.23.0

