Fix the polkit action for ChangeAccountType.

Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
This commit is contained in:
tangjie02 2023-01-05 16:17:02 +08:00
parent e9f0cbb7d9
commit 1c92b1f9f8
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 710d49ecfafa7782b9121676394e17a87e7f6bbb Mon Sep 17 00:00:00 2001
From: tangjie02 <tangjie02@kylinsec.com.cn>
Date: Thu, 5 Jan 2023 15:46:54 +0800
Subject: [PATCH] fix(accounts): Fix the polkit action for ChangeAccountType.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将修改账户类型的dbus接口的改为需要管理员权限认证
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
---
plugins/accounts/user.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/accounts/user.cpp b/plugins/accounts/user.cpp
index c8abf37..b0ad852 100644
--- a/plugins/accounts/user.cpp
+++ b/plugins/accounts/user.cpp
@@ -260,7 +260,7 @@ USER_SET_ONE_PROP_AUTH(SetHomeDirectory, change_home_dir_authorized_cb, AUTH_USE
USER_SET_ONE_PROP_AUTH(SetShell, change_shell_authorized_cb, AUTH_USER_ADMIN, const Glib::ustring &);
USER_SET_ONE_PROP_AUTH(SetIconFile, change_icon_file_authorized_cb, AUTH_CHANGE_OWN_USER_DATA, const Glib::ustring &);
USER_SET_ONE_PROP_AUTH(SetLocked, change_locked_authorized_cb, AUTH_USER_ADMIN, bool);
-USER_SET_ONE_PROP_AUTH(SetAccountType, change_account_type_authorized_cb, AUTH_CHANGE_OWN_USER_DATA, int32_t);
+USER_SET_ONE_PROP_AUTH(SetAccountType, change_account_type_authorized_cb, AUTH_USER_ADMIN, int32_t);
USER_SET_ONE_PROP_AUTH(SetPasswordMode, change_password_mode_authorized_cb, AUTH_CHANGE_OWN_USER_DATA, int32_t);
USER_SET_TWO_PROP_AUTH(SetPassword, change_password_authorized_cb, AUTH_CHANGE_OWN_PASSWORD, const Glib::ustring &, const Glib::ustring &);
USER_SET_TWO_PROP_AUTH(SetPasswordByPasswd, change_password_by_passwd_authorized_cb, AUTH_CHANGE_OWN_PASSWORD, const Glib::ustring &, const Glib::ustring &);
--
2.36.1

View File

@ -1,6 +1,6 @@
Name: kiran-cc-daemon
Version: 2.4.0
Release: 4
Release: 5
Summary: DBus daemon for Kiran Desktop
License: MulanPSL-2.0
@ -9,6 +9,7 @@ Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-feature-timedate-Delete-timedate_i.h-file.patch
Patch0002: 0001-fix-passwd-Fix-password-policy-inconsistencies.patch
Patch0003: 0001-feature-backlight-Support-brightness-modification-by.patch
Patch0004: 0001-fix-accounts-Fix-the-polkit-action-for-ChangeAccount.patch
BuildRequires: cmake >= 3.2
@ -154,6 +155,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
%changelog
* Thu Jan 05 2023 tangjie02 <tangjie02@kylinsec.com.cn> - 2.4.0-5
- KYOS-B: Fix the polkit action for ChangeAccountType.
* Wed Dec 07 2022 tangjie02 <tangjie02@kylinsec.com.cn> - 2.4.0-4
- KYOS-F: Support brightness modification by changing gamma value.