fix: change polkit action from auth_admin_keep to auth_admin#1078
Merged
mhduiy merged 1 commit intolinuxdeepin:masterfrom Apr 8, 2026
Merged
fix: change polkit action from auth_admin_keep to auth_admin#1078mhduiy merged 1 commit intolinuxdeepin:masterfrom
mhduiy merged 1 commit intolinuxdeepin:masterfrom
Conversation
Changed the polkit action for enabling and disabling readonly protection from auth_admin_keep to auth_admin. This modification ensures that administrative authentication is required each time the action is performed, rather than retaining authorization for a period after initial authentication. This enhances security by preventing potential unauthorized use of these sensitive system operations after an initial authorized session. Log: Changed authentication policy for enabling/disabling readonly protection to require authentication each time fix: 将 polkit 操作从 auth_admin_keep 更改为 auth_admin 将启用和禁用只读保护的 polkit 操作从 auth_admin_keep 更改为 auth_admin。 此修改确保每次执行操作时都需要管理认证,而不是在初始认证后保留一段时间的 授权。这增强了安全性,防止在初始授权会话后可能发生的对这些敏感系统操作的 未授权使用。 Log: 更改启用/禁用只读保护的认证策略,要求每次操作都需要认证 PMS: BUG-355103
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the polkit policy for the DDE daemon readonly protection operations so that each enable/disable action now requires fresh admin authentication instead of reusing a cached authorization, tightening security around these sensitive system operations. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Check whether there are other polkit actions in the same policy file (or related system operations) that should also switch from
auth_admin_keeptoauth_adminfor consistent security behavior. - Consider whether the more frequent auth prompts impact any existing UI flows or long-running operations using this action, and if so, ensure the caller side handles repeated auth failures or cancellations gracefully.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Check whether there are other polkit actions in the same policy file (or related system operations) that should also switch from `auth_admin_keep` to `auth_admin` for consistent security behavior.
- Consider whether the more frequent auth prompts impact any existing UI flows or long-running operations using this action, and if so, ensure the caller side handles repeated auth failures or cancellations gracefully.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
robertkill
approved these changes
Apr 1, 2026
Contributor
robertkill
left a comment
There was a problem hiding this comment.
LGTM ✅
这是一个合理的安全修复:
- ✅ 修复了 auth_admin_keep 导致的会话保留问题(BUG-355103)
- ✅ 变更范围小(+2/-2行),风险低
- ✅ CI测试全部通过
- ✅ 提交信息清晰,中英文双语描述完整
建议等待OBS CI完成后合并。
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, robertkill The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the polkit action for enabling and disabling readonly protection from auth_admin_keep to auth_admin. This modification ensures that administrative authentication is required each time the action is performed, rather than retaining authorization for a period after initial authentication. This enhances security by preventing potential unauthorized use of these sensitive system operations after an initial authorized session.
Log: Changed authentication policy for enabling/disabling readonly protection to require authentication each time
fix: 将 polkit 操作从 auth_admin_keep 更改为 auth_admin
将启用和禁用只读保护的 polkit 操作从 auth_admin_keep 更改为 auth_admin。 此修改确保每次执行操作时都需要管理认证,而不是在初始认证后保留一段时间的
授权。这增强了安全性,防止在初始授权会话后可能发生的对这些敏感系统操作的
未授权使用。
Log: 更改启用/禁用只读保护的认证策略,要求每次操作都需要认证
PMS: BUG-355103
Summary by Sourcery
Bug Fixes: