fix createuser critical vulnerabilities
(cherry picked from commit 9b73063c2ac0ba3f713f34b9bf7bc06741eb1064)
This commit is contained in:
parent
09e7bd1682
commit
0a329ef731
53
fix-createuser-critical-vulnerabilities.patch
Normal file
53
fix-createuser-critical-vulnerabilities.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 50f91cb252eea20b210fd6acaa12baa95a5b1e3b Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Mon, 22 May 2023 11:13:49 +0800
|
||||||
|
Subject: [PATCH] fix createuser critical vulnerabilities
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/account/userinfo/userinfo.cpp | 6 +-----
|
||||||
|
registeredQDbus/sysdbusregister.cpp | 5 +++++
|
||||||
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/account/userinfo/userinfo.cpp b/plugins/account/userinfo/userinfo.cpp
|
||||||
|
index e9ee51c..2393366 100644
|
||||||
|
--- a/plugins/account/userinfo/userinfo.cpp
|
||||||
|
+++ b/plugins/account/userinfo/userinfo.cpp
|
||||||
|
@@ -934,7 +934,6 @@ void UserInfo::createUser(QString username, QString pwd, QString pin, int atype)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- tmpSysinterface->call("setPid", QCoreApplication::applicationPid());
|
||||||
|
tmpSysinterface->call("createUser", username, username, atype, DEFAULTFACE, pwd);
|
||||||
|
|
||||||
|
delete tmpSysinterface;
|
||||||
|
@@ -1251,10 +1250,7 @@ void UserInfo::changeUserPwd(QString pwd, QString username){
|
||||||
|
qCritical() << "Create Client Interface Failed When : " << QDBusConnection::systemBus().lastError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
- QDBusReply<int> reply = tmpSysinterface->call("setPid", QCoreApplication::applicationPid());
|
||||||
|
- if (reply.isValid()){
|
||||||
|
- tmpSysinterface->call("changeOtherUserPasswd", username, pwd);
|
||||||
|
- }
|
||||||
|
+ tmpSysinterface->call("changeOtherUserPasswd", username, pwd);
|
||||||
|
|
||||||
|
delete tmpSysinterface;
|
||||||
|
tmpSysinterface = nullptr;
|
||||||
|
diff --git a/registeredQDbus/sysdbusregister.cpp b/registeredQDbus/sysdbusregister.cpp
|
||||||
|
index 077c8d6..bfe267e 100644
|
||||||
|
--- a/registeredQDbus/sysdbusregister.cpp
|
||||||
|
+++ b/registeredQDbus/sysdbusregister.cpp
|
||||||
|
@@ -211,6 +211,11 @@ int SysdbusRegister::changeOtherUserPasswd(QString username, QString pwd){
|
||||||
|
}
|
||||||
|
|
||||||
|
int SysdbusRegister::createUser(QString name, QString fullname, int accounttype, QString faceicon, QString pwd){
|
||||||
|
+ //密码校验
|
||||||
|
+ QDBusConnection conn = connection();
|
||||||
|
+ QDBusMessage msg = message();
|
||||||
|
+ _id = conn.interface()->servicePid(msg.service()).value();
|
||||||
|
+
|
||||||
|
if (_id == 0){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
Name: ukui-control-center
|
Name: ukui-control-center
|
||||||
Version: 3.0.4
|
Version: 3.0.4
|
||||||
Release: 21
|
Release: 22
|
||||||
Summary: utilities to configure the UKUI desktop
|
Summary: utilities to configure the UKUI desktop
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
@ -18,7 +18,8 @@ Patch09: 0009-Fix-the-resolution-donotsave-button-fails.patch
|
|||||||
Patch10: 0010-Fix-the-problem-of-scrambled-shortcut-keys.patch
|
Patch10: 0010-Fix-the-problem-of-scrambled-shortcut-keys.patch
|
||||||
Patch11: 0011-Fix-terminal-garbled-characters.patch
|
Patch11: 0011-Fix-terminal-garbled-characters.patch
|
||||||
Patch12: ukui-control-center-3.0.4-fix-invalid-automatic-login.patch
|
Patch12: ukui-control-center-3.0.4-fix-invalid-automatic-login.patch
|
||||||
Patch13: 0013-fix-critical-vulnerabilities.patch
|
Patch13: fix-changeOtherUserPasswd-critical-vulnerabilities.patch
|
||||||
|
Patch14: fix-createuser-critical-vulnerabilities.patch
|
||||||
|
|
||||||
BuildRequires: qt5-qtsvg-devel
|
BuildRequires: qt5-qtsvg-devel
|
||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
@ -115,20 +116,7 @@ Suggests: ukui-settings-daemon
|
|||||||
interface properties, screen resolution, and other UKUI parameters.
|
interface properties, screen resolution, and other UKUI parameters.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -n %{name}-%{version} -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
qmake-qt5
|
qmake-qt5
|
||||||
@ -188,8 +176,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 22 2023 peijiankang <peijiankang@kylinos.cn> - 3.0.4-22
|
||||||
|
- fix createuser critical vulnerabilities
|
||||||
|
|
||||||
* Mon May 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.0.4-21
|
* Mon May 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.0.4-21
|
||||||
- fix critical vulnerabilities
|
- fix changeOtherUserPasswd critical vulnerabilities
|
||||||
|
|
||||||
* Tue Jan 10 2023 huayadong <huayadong@kylinos.cn> - 3.0.4-20
|
* Tue Jan 10 2023 huayadong <huayadong@kylinos.cn> - 3.0.4-20
|
||||||
- repair installation %post warning
|
- repair installation %post warning
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user