Commit 77132c6
committed
fix: revert SetPassword disable, restore with admin auth
1. Restore SetPassword DBus method implementation, as it is
used by dde-control-center when creating new users
2. Require polkitActionUserAdministration authentication to
prevent unauthorized password changes
3. Keep the chpasswd injection guard in ModifyPasswd
Log: SetPassword DBus method is restored for new user creation
Influence:
1. creating a new user via control center should set password
successfully
2. non-admin user calling SetPassword should still be denied
PMS: TASK-390039
fix: 恢复 SetPassword 接口,保留管理员鉴权
1. 恢复 SetPassword DBus 方法实现,因为控制中心创建新用户
时需要调用该接口
2. 要求 polkitActionUserAdministration 鉴权,防止未授权
修改密码
3. 保留 ModifyPasswd 中的 chpasswd 注入防护
Log: SetPassword DBus 方法已恢复,用于新用户创建场景
Influence:
1. 通过控制中心创建新用户时应能成功设置密码
2. 非管理员用户调用 SetPassword 仍应被拒绝1 parent 6741354 commit 77132c6
1 file changed
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
120 | 168 | | |
121 | 169 | | |
122 | 170 | | |
| |||
0 commit comments