Repository navigation
Conversation
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideData structuresDefine the Timedate1 security-loader scope that the caller registry and authorization checks share.
APIExpose SetAllowCaller on Timedate1 and include it in the exported method table so security-loader clients can register their unique name.
Uses of the APIAdd Timedate1 to the session-daemon handshake destinations so the forwarded session-module calls can register as trusted callers.
ImplementationRoute timedate setter authorization through the caller registry first and Polkit for unregistered callers, preserving the caller-provided Polkit message detail.
ConfigurationPermit SetAllowCaller only for root and the deepin-daemon group while denying it through the general interface policy.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
c00fc15 to
ba6b337
Compare
ba6b337 to
9cc91ca
Compare
1. Authorize Timedate1 setters through the security-loader caller registry first and fall back to Polkit only for unregistered callers. 2. Expose SetAllowCaller, restrict it to root and the deepin-daemon group in the D-Bus policy, and add Timedate1 to the session daemon handshake list. 3. Keep the caller-supplied polkit.message detail on the Polkit fallback path. 4. Expected: toggling auto time sync or changing the date/time from control center shows no auth prompt; calling SetTime with dbus-send as an ordinary user is still denied; calling SetAllowCaller as an ordinary user is denied by the D-Bus policy. fix: timedate 设置接口接入安全启动鉴权 1. Timedate1 设置类接口先查 security-loader 调用者注册表,未注册的调用者再走 Polkit 鉴权。 2. 新增 SetAllowCaller 接口,D-Bus 策略限制只有 root 和 deepin-daemon 组可调 用,并在会话守护进程 handshake 列表中加入 Timedate1。 3. Polkit 兜底路径保留调用方传入的 polkit.message 详情。 Log: 由 loader 启动的进程调用 timedate 设置接口不再弹出认证框;未注册的调用者仍需 Polkit 认证。 Influence: 控制中心切换自动同步时间、修改日期时间免认证;普通用户 dbus-send 调用 SetTime 仍被拒绝;普通用户调用 SetAllowCaller 被 D-Bus 策略拒绝。 PMS: BUG-379743
9cc91ca to
4fcb842
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本次变更无需修复,代码已符合安全与质量标准。本报告由 AI 代码审查工具自动生成 |
fix: authorize timedate setters via security-loader
Log: Changing the clock or the NTP switch from the control center no longer shows an authentication dialog; unregistered local callers are still denied.
Influence:
fix: timedate 设置接口接入安全启动鉴权
Log: 控制中心修改时间或切换网络对时不再弹出认证框;未注册的本地调用者仍被拒绝。
Influence:
Fixes: DDE-610
PMS: BUG-379743
Summary by Sourcery
Authorize timedate changes through security-loader with Polkit fallback for unregistered callers.
New Features:
Bug Fixes:
Enhancements: