Skip to content

feat: 加固未鉴权的 system 级 dbus 接口(v20 安全整改合入 v25) - #1197

Open
fly602 wants to merge 1 commit into
masterfrom
agent/developer/1b88c2b8
Open

feat: 加固未鉴权的 system 级 dbus 接口(v20 安全整改合入 v25)#1197
fly602 wants to merge 1 commit into
masterfrom
agent/developer/1b88c2b8

Conversation

@fly602

@fly602 fly602 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

背景

将 v20 上的 dde dbus 安全整改合入 v25(DDE-63)。对 v25 中未鉴权的 system 级 D-Bus 接口按 v25 polkit 风格加固:sender dbus.Sender 首参 + checkAuthorization + .policy 动作(allow_active: yesallow_inactive: noallow_any: no),参照本仓已合规的 system/airplane_mode1

改动内容

system/power1(org.deepin.dde.Power1)

  • manager_ifc.goSetShortIdleStateSetTlpMode 增加 sender dbus.Sender 首参与 checkAuthorization 鉴权;新增同名包级 checkAuthorization helper(与 airplane_mode1 同形)。
  • misc/polkit-action/org.deepin.dde.power.policy:新增动作 org.deepin.dde.power.set-short-idle-stateorg.deepin.dde.power.set-tlp-mode

system/inputdevices1(org.deepin.dde.InputDevices1.Touchpad)

  • touchpad.goSetTouchpadEnable 增加 sender + checkAuthorization
  • inputdevices_ifc.go:新增包级 checkAuthorization helper。
  • daemon.go:新增动作 id 常量。
  • misc/polkit-action/org.deepin.dde.inputdevices.policy:新建(set-touchpad-enable 动作)。该文件命中 .gitignore*.policy 规则,按本仓 airplane/bluetooth/display/power 等纯源 .policy 的既有做法 git add -f 纳入版本管理。

bin/dde-system-daemon(org.deepin.dde.Daemon1)

  • power.goSetIdleStateSetScreenState 增加 sender 首参,复用本仓既有 checkAuthwallpaper.go)。
  • misc/polkit-action/org.deepin.dde.daemon.system.policy.in:新增 org.deepin.dde.daemon.set-idle-stateorg.deepin.dde.daemon.set-screen-state 动作(构建期 ts_to_policy 重新生成 .policy,与既有 enable/disable-readonly-protection 同流程)。

system/airplane_mode1

  • 已合规(Enable/EnableWifi/EnableBluetooth 均带 sender + checkAuthorization + org.deepin.dde.airplane.policy),仅复核,无改动。

关于生成文件 / 调用方 / go-dbus-factory

  • exported_methods_auto.go 未改动:dbusutil-gen 与运行时 dispatcher 均跳过 dbus.Sender(见 go-lib/dbusutil/_tool/dbusutil-gen/exported_methods.go 跳过 dbus.Senderdbusutil.go 运行时同样跳过),Fninterface{},加 sender 不改变 em 输出。已提交的 power1/exported_methods_auto.go 为旧生成器(无排序)产物,若用现网生成器重跑只会触发与鉴权无关的方法重排,为避免无关 churn 故未重跑。
  • go-dbus-factory 绑定未改动:sender 不进入线上签名/内省(AirplaneMode.xmlEnable 仅含 enabled 一参即为例证),Power.xml/Touchpad.xml/auto.go 仍有效。
  • 内部调用方均不会产生用户侧鉴权弹窗,无需 .rules 放行:
    • SetShortIdleStatebin/dde-system-daemon(root)调用 → polkit 对 root 默认放行;
    • SetIdleState/SetScreenStatesession/power1keybinding1(dde-session-daemon,活跃本地用户)经系统总线调用 → allow_active: yes 静默放行;
    • SetTouchpadEnable 由会话侧 inputdevices1(活跃本地用户)与 system/keyevent1(root)调用 → 均放行。
  • SetLEDEnabled 在 v25 已移除,跳过;RegisterAgent 弹窗为跨仓库问题(调用点 lastore1/agent.go,弹窗由 lastore-daemon 侧策略触发),不在本 PR 范围。

约束遵守

  • v25 风格:总线名 org.deepin.dde.*sender 首参、polkit 三件套。
  • 未手改生成文件;未带入无关重构;改动仅限鉴权相关。

本机无编译环境,请协助编译验证。

Summary by Sourcery

Harden previously unauthenticated system-level D-Bus interfaces for power, input devices, and system daemon idle/screen state by integrating v25-style polkit authorization and sender-based checks.

New Features:

  • Introduce polkit-protected actions for adjusting power idle state and TLP mode on the system bus.
  • Add polkit-protected action for enabling or disabling the touchpad via system input devices D-Bus API.
  • Require polkit authorization for changing system daemon idle and screen states over D-Bus.

Enhancements:

  • Add shared checkAuthorization helpers in power1 and inputdevices1 to centralize polkit checks aligned with existing airplane_mode1 patterns.
  • Wire D-Bus method signatures to include dbus.Sender for relevant setters so polkit can correctly identify the calling subject.

Build:

  • Extend polkit action policy files for power and system daemon to cover the new setter actions and add a new inputdevices policy file for touchpad enablement.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fly602

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds polkit-based authorization checks to previously unauthenticated system-level D-Bus setters in power, input devices (touchpad), and system daemon power control, plus corresponding polkit action definitions, following existing airplane_mode1 patterns without touching generated bindings.

Sequence diagram for polkit authorization on system D-Bus setters

sequenceDiagram
    actor SessionDaemon
    participant Power1Manager as org.deepin.dde.Power1.Manager
    participant InputDevicesTouchpad as org.deepin.dde.InputDevices1.Touchpad
    participant SystemDaemon as org.deepin.dde.Daemon1
    participant PolicykitAuthority as org.freedesktop.policykit1.Authority

    SessionDaemon->>Power1Manager: SetTlpMode(sender, mode)
    Power1Manager->>PolicykitAuthority: checkAuthorization(actionSetTlpMode, sender)
    PolicykitAuthority-->>Power1Manager: CheckAuthorization
    alt authorized
        Power1Manager->>Power1Manager: setTlpMode(mode)
    else not authorized
        Power1Manager-->>SessionDaemon: dbus.Error("not authorized")
    end

    SessionDaemon->>InputDevicesTouchpad: SetTouchpadEnable(sender, enabled)
    InputDevicesTouchpad->>PolicykitAuthority: checkAuthorization(actionSetTouchpadEnable, sender)
    PolicykitAuthority-->>InputDevicesTouchpad: CheckAuthorization
    alt authorized
        InputDevicesTouchpad->>InputDevicesTouchpad: setTouchpadEnable(enabled)
    else not authorized
        InputDevicesTouchpad-->>SessionDaemon: dbus.Error("not authorized")
    end

    SessionDaemon->>SystemDaemon: SetIdleState(sender, state)
    SystemDaemon->>PolicykitAuthority: checkAuth(actionSetIdleState, sender)
    PolicykitAuthority-->>SystemDaemon: CheckAuthorization
    alt authorized
        SystemDaemon->>SystemDaemon: setState(idleStatePath, state)
    else not authorized
        SystemDaemon-->>SessionDaemon: dbus.Error("not authorized")
    end
Loading

File-Level Changes

Change Details Files
Harden Power1 system D-Bus setters with polkit authorization and sender-aware signatures.
  • Import polkit authority factory and define action IDs for TLP mode and short idle state setters.
  • Change SetTlpMode and SetShortIdleState to accept dbus.Sender and gate operations with a local checkAuthorization helper.
  • Implement a shared checkAuthorization helper mirroring airplane_mode1 to validate system bus callers against polkit actions.
system/power1/manager_ifc.go
misc/polkit-action/org.deepin.dde.power.policy
Introduce polkit-based authorization for touchpad enable operations and wire up inputdevices1 to use it.
  • Add a checkAuthorization helper to inputdevices_ifc.go using polkit.NewAuthority and system bus name subjects.
  • Change Touchpad.SetTouchpadEnable to accept dbus.Sender and call checkAuthorization with a dedicated action ID.
  • Add a constant for the touchpad polkit action ID in daemon.go and create a new org.deepin.dde.inputdevices.policy file with the corresponding action.
system/inputdevices1/inputdevices_ifc.go
system/inputdevices1/touchpad.go
system/inputdevices1/daemon.go
misc/polkit-action/org.deepin.dde.inputdevices.policy
Protect dde-system-daemon idle and screen state setters via existing checkAuth and new polkit actions.
  • Define new polkit action ID constants for SetIdleState and SetScreenState.
  • Update SetIdleState and SetScreenState to accept dbus.Sender and invoke checkAuth before mutating state files.
  • Extend org.deepin.dde.daemon.system.policy.in with actions for idle and screen state control so ts_to_policy can generate updated policy at build time.
bin/dde-system-daemon/power.go
misc/polkit-action/org.deepin.dde.daemon.system.policy.in
Ensure policy files match v25 style and do not alter generated D-Bus bindings or unrelated behavior.
  • Add polkit actions for power setters to org.deepin.dde.power.policy following allow_active-only semantics.
  • Force-add the new org.deepin.dde.inputdevices.policy despite *.policy .gitignore, consistent with other system policies.
  • Leave exported_methods_auto.go and go-dbus-factory XML/signatures untouched to avoid churn while keeping sender invisible to introspection.
misc/polkit-action/org.deepin.dde.power.policy
misc/polkit-action/org.deepin.dde.inputdevices.policy
misc/polkit-action/org.deepin.dde.daemon.system.policy.in
system/power1/exported_methods_auto.go
system/inputdevices1/auto.go
system/airplane_mode1/*

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The checkAuthorization helper is duplicated in multiple packages with identical logic; consider extracting a shared helper (or reusing the existing checkAuth where possible) to avoid divergence in future changes.
  • Both checkAuthorization helpers call dbus.SystemBus() on every invocation; if these setters are called frequently, it may be worth reusing an existing bus connection or caching the authority to avoid repeated setup overhead.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `checkAuthorization` helper is duplicated in multiple packages with identical logic; consider extracting a shared helper (or reusing the existing `checkAuth` where possible) to avoid divergence in future changes.
- Both `checkAuthorization` helpers call `dbus.SystemBus()` on every invocation; if these setters are called frequently, it may be worth reusing an existing bus connection or caching the authority to avoid repeated setup overhead.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@fly602
fly602 force-pushed the agent/developer/1b88c2b8 branch from 052b723 to d59d092 Compare August 7, 2026 07:11
1. Port the v20 security hardening to v25 by adding polkit
   authorization (sender first param + checkAuthorization/checkAuth +
   .policy action with allow_active:yes/allow_inactive:no/
   allow_any:no) to the system-level D-Bus methods that previously
   lacked authentication, mirroring the existing system/airplane_mode1.
2. system/power1 (org.deepin.dde.Power1): SetShortIdleState and
   SetTlpMode gain a sender + checkAuthorization guard; add
   org.deepin.dde.power.set-short-idle-state and set-tlp-mode actions
   to misc/polkit-action/org.deepin.dde.power.policy.
3. system/inputdevices1 (org.deepin.dde.InputDevices1.Touchpad):
   SetTouchpadEnable gains sender + checkAuthorization (helper added
   to inputdevices_ifc.go); add a new
   misc/polkit-action/org.deepin.dde.inputdevices.policy with the
   set-touchpad-enable action.
4. bin/dde-system-daemon (org.deepin.dde.Daemon1): SetIdleState and
   SetScreenState gain sender + the existing checkAuth helper; add
   org.deepin.dde.daemon.set-idle-state and set-screen-state actions
   to org.deepin.dde.daemon.system.policy.in (regenerated by the
   build via ts_to_policy).
5. Add misc/polkit-rules/org.deepin.dde.power.rules and
   org.deepin.dde.inputdevices.rules to allowlist root internal
   callers (subject.user === "root"), because root has no active
   local session and the new .policy defaults would otherwise silently
   deny dde-system-daemon->Power1.SetShortIdleState and
   keyevent1->InputDevices1.SetTouchpadEnable, breaking short-idle
   power management and the keyboard touchpad toggle.
6. system/airplane_mode1 is already compliant, no change. Adding
   sender does not change the on-wire signature (dbusutil-gen and the
   runtime dispatcher skip dbus.Sender), so exported_methods_auto.go
   and the go-dbus-factory bindings are unchanged; active local user
   callers stay covered by allow_active:yes with no new dialog.

Log: Harden previously unauthenticated system-level D-Bus
interfaces with polkit authorization.

Influence:
1. Verify short-idle power management (wifi on/off, power mode
   switching) still works from the session UI with no polkit dialog.
2. Verify the keyboard touchpad on/off shortcut still toggles the
   touchpad enable state.
3. Verify setting TLP/power-save mode from the UI works with no
   polkit prompt.
4. Confirm root internal callers (dde-system-daemon ->
   SetShortIdleState, keyevent1 -> SetTouchpadEnable) are allowed by
   the new .rules and not silently denied.
5. Confirm a non-session external caller is now denied by polkit on
   SetShortIdleState, SetTlpMode, SetTouchpadEnable, SetIdleState and
   SetScreenState.

feat: 加固未鉴权的 system 级 dbus 接口

1. 将 v20 安全整改合入 v25:为原先未鉴权的 system 级 D-Bus 方法补齐
   polkit 鉴权(sender 首参 + checkAuthorization/checkAuth + .policy
   动作,allow_active:yes/allow_inactive:no/allow_any:no),参照仓内
   system/airplane_mode1 既有做法。
2. system/power1(org.deepin.dde.Power1):SetShortIdleState、
   SetTlpMode 增加 sender + checkAuthorization;在
   misc/polkit-action/org.deepin.dde.power.policy 新增
   org.deepin.dde.power.set-short-idle-state 与 set-tlp-mode 动作。
3. system/inputdevices1(org.deepin.dde.InputDevices1.Touchpad):
   SetTouchpadEnable 增加 sender + checkAuthorization(helper 加到
   inputdevices_ifc.go);新增
   misc/polkit-action/org.deepin.dde.inputdevices.policy,含
   set-touchpad-enable 动作。
4. bin/dde-system-daemon(org.deepin.dde.Daemon1):SetIdleState、
   SetScreenState 增加 sender 并复用本仓既有 checkAuth;在
   org.deepin.dde.daemon.system.policy.in 新增
   org.deepin.dde.daemon.set-idle-state 与 set-screen-state 动作
   (构建期 ts_to_policy 重新生成 .policy)。
5. 新增 misc/polkit-rules/org.deepin.dde.power.rules 与
   org.deepin.dde.inputdevices.rules,对 root 内部调用方
   (subject.user === "root")放行,避免 root 无活跃本地会话时被新
   .policy 默认值静默拒绝,导致短 idle 电源管理
   (dde-system-daemon->Power1.SetShortIdleState)与键盘触摸板开关
   (keyevent1->InputDevices1.SetTouchpadEnable)失效。
6. system/airplane_mode1 已合规,无改动。新增 sender 不改变线上签名
   (dbusutil-gen 与运行时派发均跳过 dbus.Sender),故
   exported_methods_auto.go 与 go-dbus-factory 绑定不变;活跃本地
   用户调用方仍由 allow_active:yes 静默放行,不新增用户侧鉴权弹窗。

Log: 加固原先未鉴权的 system 级 D-Bus 接口,补齐 polkit 鉴权。

Influence:
1. 验证从会话 UI 触发的短 idle 电源管理(wifi 开关、电源模式切换)仍正常,无 polkit 弹窗。
2. 验证键盘触摸板开/关快捷键仍能切换触摸板使能状态。
3. 验证从 UI 设置 TLP/节能模式不弹 polkit 提示。
4. 确认 root 内部调用方(dde-system-daemon->SetShortIdleState、
   keyevent1->SetTouchpadEnable)被新 .rules 放行,不被静默拒绝。
5. 确认非会话的外部调用方在 SetShortIdleState、SetTlpMode、
   SetTouchpadEnable、SetIdleState、SetScreenState 上被 polkit 拒绝。

PMS: TASK-393313
@fly602
fly602 force-pushed the agent/developer/1b88c2b8 branch from d59d092 to 57cacf6 Compare August 7, 2026 07:28
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:60分

■ 【总体评价】

代码通过引入 polkit 鉴权机制加强了 D-Bus 接口的安全防护,但存在权限配置过宽和代码重复问题
逻辑基本正确但因权限配置不当引入中危漏洞且代码质量欠佳,受安全上限规则限制得60分

■ 【详细分析】

  • 1.语法逻辑基本正确✓

SetShortIdleState 函数在 system/power1/manager_ifc.go 中调用 m.setShortIdleState(state) 后直接返回 nil,完全忽略了内部函数可能返回的 error,导致底层执行失败时调用方无法感知。此外 bin/dde-system-daemon/power.go 调用了 checkAuth,而其他模块均使用 checkAuthorization,存在命名不一致的隐患。
潜在问题:状态设置失败时错误被静默吞没;不同模块鉴权函数命名不统一可能引发维护混乱
建议:检查并返回 m.setShortIdleState(state) 的错误;统一鉴权辅助函数的命名为 checkAuthorization

  • 2.代码质量一般✕

checkAuthorization 函数在 system/inputdevices1/inputdevices_ifc.gosystem/power1/manager_ifc.go 中存在完全相同的重复实现,违反了 DRY 原则。项目中应该将此公共逻辑提取到内部的公共模块或 go-lib 中统一管理。
潜在问题:重复代码增加维护成本,未来修改鉴权逻辑时容易遗漏某个模块导致安全策略不一致
建议:将 checkAuthorization 抽离到公共包(如 internal/auth 或直接复用 go-lib 中已有的封装),各业务模块直接调用公共方法

  • 3.代码性能无性能问题✓

checkAuthorization 内部调用的 dbus.SystemBus()godbus 库底层采用了单例模式共享连接,不会频繁创建新的系统总线连接。每次 D-Bus 调用的 IPC 开销属于正常且必要的鉴权成本,无性能瓶颈。
建议:保持现状即可

  • 4.代码安全存在 2 个安全漏洞✕

漏洞对比统计:新增漏洞 2 个,减少漏洞 0 个,持平 0 个
新增的 polkit 策略和规则在加固接口的同时引入了配置过宽和绕过最小权限原则的风险,影响了系统的本地安全基线。

  • 安全漏洞1(中危):[权限配置错误] 在 [misc/polkit-action/org.deepin.dde.daemon.system.policy.in、org.deepin.dde.power.policy、org.deepin.dde.inputdevices.policy] 中,[所有新增的 action(如 set-idle-state、set-tlp-mode 等)的 allow_active 均被配置为 yes。这导致系统中任何拥有活跃会话的普通用户都可以无需输入密码认证,直接修改系统全局的电源模式、屏幕状态和触摸板开关。攻击者可通过本地执行简单的 D-Bus 命令干扰系统电源管理策略,造成拒绝服务或影响其他用户] ——非常重要

  • 安全漏洞2(低危):[最小权限原则破坏] 在 [misc/polkit-rules/org.deepin.dde.inputdevices.rules、org.deepin.dde.power.rules] 中,[通过 JavaScript 规则直接对 subject.user === "root" 返回 polkit.Result.YES,无条件放行 root 用户的特定 D-Bus 调用。虽然 root 拥有系统最高权限,但在严格的安全模型(如容器环境、受限 root 服务)中,这破坏了 polkit 提供的细粒度权限控制能力,若某个以 root 运行的低权限服务被攻破,攻击者可利用此规则直接操作电源状态,扩大了攻击面] ——非常重要

  • 建议:将所有新增 action 的 allow_activeyes 修改为 auth_admin,要求执行敏感操作必须经过管理员密码认证;删除 .rules 文件中针对 root 的硬编码放行逻辑,若确需解决 root 无活跃会话问题,应在 .policy 文件中增加 allow_inactive>auth_admin_keep</allow_inactive> 配置

■ 【改进建议代码示例】

diff --git a/misc/polkit-action/org.deepin.dde.daemon.system.policy.in b/misc/polkit-action/org.deepin.dde.daemon.system.policy.in
index bda2ac11b..123456789 100644
--- a/misc/polkit-action/org.deepin.dde.daemon.system.policy.in
+++ b/misc/polkit-action/org.deepin.dde.daemon.system.policy.in
@@ -31,7 +31,7 @@
         <message>Authentication is required to set the short idle state</message>
         <defaults>
             <allow_any>no</allow_any>
-            <allow_inactive>no</allow_inactive>
-            <allow_active>yes</allow_active>
+            <allow_inactive>auth_admin_keep</allow_inactive>
+            <allow_active>auth_admin_keep</allow_active>
         </defaults>
     </action>
     <action id="org.deepin.dde.daemon.set-screen-state">
@@ -39,8 +39,8 @@
         <message>Authentication is required to set the screen idle state</message>
         <defaults>
             <allow_any>no</allow_any>
-            <allow_inactive>no</allow_inactive>
-            <allow_active>yes</allow_active>
+            <allow_inactive>auth_admin_keep</allow_inactive>
+            <allow_active>auth_admin_keep</allow_active>
         </defaults>
     </action>
 
diff --git a/misc/polkit-rules/org.deepin.dde.inputdevices.rules b/misc/polkit-rules/org.deepin.dde.inputdevices.rules
index a026c88b1..000000000 100644
--- a/misc/polkit-rules/org.deepin.dde.inputdevices.rules
+++ b/misc/polkit-rules/org.deepin.dde.inputdevices.rules
@@ -1,12 +0,0 @@
-polkit.addRule(function(action, subject) {
-    // Allow root internal callers (e.g. keyevent1 running inside
-    // dde-system-daemon invoking org.deepin.dde.InputDevices1.Touchpad
-    // .SetTouchpadEnable over the system bus) to toggle the touchpad.
-    // Root has no active local session, so the allow_active:yes default in
-    // the .policy does not match and would otherwise fall back to
-    // allow_any:no and silently deny the call.
-    if (action.id === "org.deepin.dde.inputdevices.set-touchpad-enable" &&
-        subject.user === "root") {
-        return polkit.Result.YES;
-    }
-});
diff --git a/system/power1/manager_ifc.go b/system/power1/manager_ifc.go
index 9ff425ee7..123456789 100644
--- a/system/power1/manager_ifc.go
+++ b/system/power1/manager_ifc.go
@@ -125,7 +125,9 @@ func (m *Manager) SetShortIdleState(sender dbus.Sender, state bool) *dbus.Error
 		logger.Warningf("checkAuthorization failed, err: %v, actionId=%v", err, actionSetShortIdleState)
 		return dbusutil.ToError(err)
 	}
-	m.setShortIdleState(state)
-	return nil
+	err = m.setShortIdleState(state)
+	if err != nil {
+		return dbusutil.ToError(err)
+	}
+	return nil
 }

@deepin-ci-robot

Copy link
Copy Markdown

@fly602: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
github-pr-review-ci 57cacf6 link true /test github-pr-review-ci

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants