diff --git a/0001-ukui-control-center-don-t-allow-to-change-root-accou.patch b/0001-ukui-control-center-don-t-allow-to-change-root-accou.patch new file mode 100644 index 0000000000000000000000000000000000000000..afb2d82f4acecbc0d5fb72198f1f171a82ed65a0 --- /dev/null +++ b/0001-ukui-control-center-don-t-allow-to-change-root-accou.patch @@ -0,0 +1,40 @@ +From 08710ec179fe9f55e7cee680e53153651d3ca7cf Mon Sep 17 00:00:00 2001 +From: HouHongxun +Date: Mon, 2 Dec 2024 15:31:54 +0800 +Subject: [PATCH] ukui-control-center: don't allow to change root account type + +Signed-off-by: HouHongxun +--- + plugins/account/userinfo/userinfo.cpp | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/plugins/account/userinfo/userinfo.cpp b/plugins/account/userinfo/userinfo.cpp +index 3876d6b..de36170 100644 +--- a/plugins/account/userinfo/userinfo.cpp ++++ b/plugins/account/userinfo/userinfo.cpp +@@ -384,13 +384,15 @@ void UserInfo::buildAndSetupUsers(){ + changeCurrentTypeBtn->setEnabled(!isLastAdmin(user.username)); + } + +- connect(this, &UserInfo::userTypeChanged, [=](QString n){ +- if (user.accounttype){ +- changeCurrentTypeBtn->setEnabled(!isLastAdmin(user.username)); +- } else { +- changeCurrentTypeBtn->setEnabled(true); +- } +- }); ++ if (getuid()) { ++ connect(this, &UserInfo::userTypeChanged, [=](QString n){ ++ if (user.accounttype){ ++ changeCurrentTypeBtn->setEnabled(!isLastAdmin(user.username)); ++ } else { ++ changeCurrentTypeBtn->setEnabled(true); ++ } ++ }); ++ } + + QProcess *process = new QProcess; + process->start("dpkg -l | grep kim-client"); +-- +2.43.0 + diff --git a/ukui-control-center.spec b/ukui-control-center.spec index 09829231fffeccff8eb4bf2ea7c8c14a8e770cc9..67ede0e5f9f0903e74e6d6f9bad2bebf17f492c1 100644 --- a/ukui-control-center.spec +++ b/ukui-control-center.spec @@ -1,13 +1,14 @@ Summary: utilities to configure the UKUI desktop Name: ukui-control-center Version: 4.10.0.0 -Release: 2 +Release: 3 License: GPL-2+ URL: https://github.com/ukui/ukui-control-center Source0: %{name}-%{version}.tar.gz Patch0: ukui-control-center-4.10.0.0-kylin-change-c++11-to-c++17.patch Patch1: ukui-control-center-4.10.0.0-kylin-chnage-lrelease-to-lrelease-qt5.patch +Patch2: 0001-ukui-control-center-don-t-allow-to-change-root-accou.patch BuildRequires: qt5-qtsvg-devel BuildRequires: gsettings-qt-devel @@ -166,6 +167,12 @@ fi %changelog +* Tue Nov 25 2025 houhongxun - 4.10.0.0-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:don't allow to change root user's account type + * Fri Aug 22 2025 huayadong - 4.10.0.0-2 - Type:update - ID:NA