-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
0018-root_password-remove-ssh-options.patch
93 lines (85 loc) · 4.62 KB
/
0018-root_password-remove-ssh-options.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
From cca837e08e1903d81efda790691a9bfe1632bbcb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<frederic.pierret@qubes-os.org>
Date: Tue, 17 Dec 2019 10:26:11 +0100
Subject: [PATCH] root_password: remove ssh options
---
pyanaconda/ui/gui/spokes/root_password.glade | 19 ++-----------------
pyanaconda/ui/gui/spokes/root_password.py | 12 +-----------
2 files changed, 3 insertions(+), 28 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/root_password.glade b/pyanaconda/ui/gui/spokes/root_password.glade
index 4b1f1a9311..6ab6e70f67 100644
--- a/pyanaconda/ui/gui/spokes/root_password.glade
+++ b/pyanaconda/ui/gui/spokes/root_password.glade
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<requires lib="AnacondaWidgets" version="1.0"/>
@@ -332,22 +332,7 @@ The root user (also known as super user) has complete access to the entire syste
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="root_password_ssh_login_override">
- <property name="label" translatable="yes">Allow root SSH login with password</property>
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="receives-default">False</property>
- <property name="halign">start</property>
- <property name="margin-start">4</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">4</property>
- <property name="draw-indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <placeholder/>
</child>
</object>
</child>
diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py
index 67973d53d1..88c2f2a7a6 100644
--- a/pyanaconda/ui/gui/spokes/root_password.py
+++ b/pyanaconda/ui/gui/spokes/root_password.py
@@ -79,7 +79,6 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
self._password_label = self.builder.get_object("password_label")
self._enable_root_radio = self.builder.get_object("enable_root_radio")
self._disable_root_radio = self.builder.get_object("disable_root_radio")
- self._root_password_ssh_login_override = self.builder.get_object("root_password_ssh_login_override")
self._revealer = self.builder.get_object("password_revealer")
# Install the password checks:
@@ -155,9 +154,6 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
control.set_active(True)
self.on_root_enabled_changed(control)
- self._root_password_ssh_login_override.set_active(
- self._users_module.RootPasswordSSHLoginAllowed
- )
if self.root_enabled:
# rerun checks so that we have a correct status message, if any
self.checker.run_checks()
@@ -172,7 +168,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
@property
def mandatory(self):
"""Only mandatory if no admin user has been requested."""
- return False
+ return not self._users_module.CheckAdminUserExists()
def apply(self):
if self.root_enabled and self.password:
@@ -188,12 +184,6 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
# Lock the root account.
self._users_module.IsRootAccountLocked = True
- if self.root_enabled:
- # the checkbox makes it possible to override the default Open SSH
- # policy of not allowing root to login with password
- ssh_login_override = self._root_password_ssh_login_override.get_active()
- self._users_module.RootPasswordSSHLoginAllowed = ssh_login_override
-
# clear any placeholders
self.remove_placeholder_texts()
--
2.45.2