Skip to content

Commit 23b1697

Browse files
committed
feat: dde-api安全整改,polkit控制改用rules
/var/lib/polkit-1/localauthority/10-vendor.d/org.deepin.dde.device.pkla 应该改用rules实现; Log: dde-api安全整改 PMS: TASK-369021
1 parent ba193da commit 23b1697

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

misc/polkit-action/org.deepin.dde.device.unblock-bluetooth-devices.policy.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
<allow_inactive>no</allow_inactive>
1515
<allow_active>auth_admin_keep</allow_active>
1616
</defaults>
17+
<annotate key="org.freedesktop.policykit.owner">unix-user:deepin-daemon</annotate>
1718
</action>
1819
</policyconfig>

misc/polkit-localauthority/org.deepin.dde.device.pkla

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
polkit.addRule(function(action, subject) {
2+
if (action.id === "org.deepin.dde.device.unblock-bluetooth-devices" &&
3+
subject.isInGroup("sudo") &&
4+
subject.active) {
5+
return polkit.Result.YES;
6+
}
7+
});

0 commit comments

Comments
 (0)