Commit 541d7c8
committed
fix(auth): add polkit support
Replace UnixProcessSubject(PID) with SystemBusNameSubject for
Polkit authorization, and add centralized checkAuthorization()
to all service methods for consistent access control.
将Polkit鉴权方式从进程PID切换为DBus总线名,并在所有服务
方法中添加统一的鉴权检查,实现一致的访问控制。
Log: 将DBus鉴权方式从PID切换为总线名并统一鉴权入口
PMS: BUG-364093
Influence: 所有通过DBus调用的服务方法现在均需通过Polkit鉴权,提升系统安全性。1 parent 91b48dd commit 541d7c8
7 files changed
Lines changed: 171 additions & 11 deletions
File tree
- application
- service
- policy
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | | - | |
15 | | - | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | | - | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments