fix password policy

This commit is contained in:
zhangqiumiao 2020-09-03 21:59:44 +08:00
parent cfbf057c03
commit b56d7ca2ae
2 changed files with 72 additions and 10 deletions

View File

@ -1,7 +1,7 @@
%define _empty_manifest_terminate_build 0
Name: anaconda
Version: 33.19
Release: 4
Release: 5
Summary: Graphical system installer
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -28,6 +28,7 @@ Patch9014: modify-default-timezone.patch
Patch9015: modify-network-hostname-dot-illegal.patch
Patch9016: disable-ssh-login-checkbox.patch
Patch9017: bugfix-add-kdump-parameter-into-kernel-cmdline.patch
Patch9018: bugfix-fix-password-policy.patch
Patch6001: anaconda-Fix-stage2-as-default-sources.patch
Patch6002: anaconda-Allow-to-detect-devices-with-the-iso9660-file-system.patch
@ -242,21 +243,27 @@ update-desktop-database &> /dev/null || :
%{_datadir}/gtk-doc
%changelog
* Thu Sep 3 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix password policy
* Thu Aug 27 2020 fengtao <fengtao40@huawei.com> - 33.19-4
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:fix kdump patch err
* Fri Aug 7 2020 fengtao <fengtao40@huawei.com> - 33.19-3
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:fix stage2 as default sources
* Tue Jul 14 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-2
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:add kdump parameter into kernel cmdline
@ -265,37 +272,37 @@ update-desktop-database &> /dev/null || :
* Mon Mar 9 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-28
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:add boot options for dummy
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-27
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:Remove initThreading method from pyanaconda.threading
* Thu Feb 06 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-26
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:modify network hostname dot error
* Thu Jan 16 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-25
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:modify default timezone and zh_CN.po
* Thu Jan 16 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-24
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:fix setup fail in decode
* Thu Jan 16 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-23
- Type:enhancement
- Id:NA
- ID:NA
- SUG:NA
- DESC:modify openeuler in welcome to lowercase

View File

@ -0,0 +1,55 @@
From 1f703640773f49e4610baee9afd79b89c3c4bc1c Mon Sep 17 00:00:00 2001
From: zhangqiumiao <zhangqiumiao1@huawei.com>
Date: Thu, 3 Sep 2020 21:48:20 +0800
Subject: [PATCH] bugfix fix password policy
---
data/interactive-defaults.ks | 4 ++--
pyanaconda/ui/gui/spokes/root_password.py | 2 +-
pyanaconda/ui/gui/spokes/user.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/interactive-defaults.ks b/data/interactive-defaults.ks
index 0177cf9..7eac690 100644
--- a/data/interactive-defaults.ks
+++ b/data/interactive-defaults.ks
@@ -4,8 +4,8 @@ firstboot --enable
%anaconda
# Default password policies
-pwpolicy root --notstrict --minlen=8 --minquality=1 --nochanges --notempty
-pwpolicy user --notstrict --minlen=8 --minquality=1 --nochanges --emptyok
+pwpolicy root --notstrict --minlen=8 --minquality=1 --nochanges --notempty --strict
+pwpolicy user --notstrict --minlen=8 --minquality=1 --nochanges --emptyok --strict
pwpolicy luks --notstrict --minlen=8 --minquality=1 --nochanges --notempty
# NOTE: This applies only to *fully* interactive installations, partial kickstart
# installations use defaults specified in pyanaconda/pwpolicy.py.
diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py
index 2af9111..d609453 100644
--- a/pyanaconda/ui/gui/spokes/root_password.py
+++ b/pyanaconda/ui/gui/spokes/root_password.py
@@ -292,7 +292,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
self.needs_waiver = False
else:
if not self._validity_check.result.success:
- self.can_go_back = False
+ self.can_go_back = True
self.needs_waiver = True
elif not self._ascii_check.result.success:
self.can_go_back = True
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 29e60cb..82fbdc8 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -673,7 +673,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
if not self._confirm_check.result.success:
self.can_go_back = False
if not self._validity_check.result.success:
- self.can_go_back = False
+ self.can_go_back = True
self.needs_waiver = True
elif not self._ascii_check.result.success:
self.can_go_back = True
--
1.8.3.1