qubes-installer-qubes-os/anaconda/0050-anaconda-mark-qubes-user-name-as-reserved.patch

36 lines
1.2 KiB
Diff
Raw Normal View History

2018-10-19 06:14:46 +00:00
From 2522cc68bb55ca668ca5a71abc9497fdd0114d21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Fri, 19 Oct 2018 08:02:13 +0200
Subject: [PATCH] anaconda: mark 'qubes' user name as reserved
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
'qubes' group is used internally, but useradd want to create a new group
named as new user, so 'qubes' user name should also be avoided.
Fixes QubesOS/qubes-issues#3777
Signed-off-by: Frédéric Pierret <frederic.epitre@orange.fr>
---
pyanaconda/users.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/users.py b/pyanaconda/users.py
index 366d6226f..1b4424be8 100644
--- a/pyanaconda/users.py
+++ b/pyanaconda/users.py
@@ -123,7 +123,7 @@ def validatePassword(pw, user="root", settings=None, minlen=None):
return (valid, strength, message)
def check_username(name):
- if name in os.listdir("/") + ["root", "home", "daemon", "system"]:
+ if name in os.listdir("/") + ["root", "home", "daemon", "system", "qubes"]:
return (False, _("User name is reserved for system: %s") % name)
if name.startswith("-"):
--
2.14.4