mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-17 01:21:36 +08:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fdc7bf2551 | |||
| 62642cc0a6 | |||
| c865643e8d | |||
| 0b4733c08c | |||
| f74e936aa5 | |||
| 42cafb7487 | |||
| fd7fa2da30 | |||
| 102f35b0cf | |||
| 7a25c3c542 | |||
| c6aea69d86 | |||
| 132c2cf35f | |||
| 3da39f1276 | |||
| e08c7a37bd | |||
| c55529aa8c | |||
| 5cbc41f1ce | |||
| 6c108aecca | |||
| 7cd2977032 | |||
| 94a6532509 | |||
| 9acf7cc8d4 | |||
| 75b73088b4 | |||
| dd0629bc8d | |||
| 39be4cdf6f | |||
| fc58de0325 | |||
| ba00b208f0 | |||
| 2cca83a34b | |||
| ea7baa9ab0 | |||
| c228706144 | |||
| c030bf9e6e | |||
| 9ac0c67a25 | |||
| fd4b52e384 | |||
| db79a59fb6 | |||
| 6891fc5b87 | |||
| 62f52451b7 |
4
debian/changelog
vendored
4
debian/changelog
vendored
@@ -1,6 +1,6 @@
|
||||
spark-store (4.3.2.2) UNRELEASED; urgency=medium
|
||||
spark-store (4.3.2.1) UNRELEASED; urgency=medium
|
||||
|
||||
* 修复点击更新需要输入密码的问题
|
||||
* 修复 aptss policy / aptss search 需要root的问题
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800
|
||||
|
||||
|
||||
2
debian/source/format
vendored
2
debian/source/format
vendored
@@ -1 +1 @@
|
||||
3.0 (native)
|
||||
1.0
|
||||
@@ -2,11 +2,7 @@
|
||||
# We use sudo twice to avoid ACE bug here
|
||||
# https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1
|
||||
|
||||
#!/bin/bash
|
||||
# We use sudo twice to avoid ACE bug here
|
||||
# https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1
|
||||
|
||||
function zenity_prompt() {
|
||||
function zenity() {
|
||||
if [[ -e /usr/bin/garma ]]; then
|
||||
garma "$@"
|
||||
else
|
||||
@@ -14,33 +10,36 @@ function zenity_prompt() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# 检查sudo是否需要密码
|
||||
if sudo -n true 2>/dev/null; then
|
||||
if sudo sudo -n true 2>/dev/null; then
|
||||
echo "sudo 无需密码,继续执行"
|
||||
|
||||
else
|
||||
|
||||
# 循环输入密码直到成功或用户取消
|
||||
while true; do
|
||||
# 使用zenity弹出密码输入框
|
||||
PASSWORD=$(zenity_prompt --password --title="需要sudo权限")
|
||||
PASSWORD=$(zenity --password --title="需要sudo权限" )
|
||||
|
||||
# 检查用户是否取消输入
|
||||
if [ -z "$PASSWORD" ]; then
|
||||
zenity_prompt --error --text="操作已取消"
|
||||
zenity --error --text="操作已取消"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 尝试使用输入的密码执行sudo命令
|
||||
echo "$PASSWORD" | sudo -S -v 2>/dev/null
|
||||
echo "$PASSWORD" | sudo sudo -S true 2>/dev/null
|
||||
|
||||
# 检查sudo是否成功
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "密码正确,继续执行"
|
||||
break
|
||||
else
|
||||
zenity_prompt --error --text="密码错误,请重新输入"
|
||||
zenity --error --text="密码错误,请重新输入"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# 使用sudo命令执行目标程序
|
||||
echo "$PASSWORD" | sudo sudo -S "$@"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ "$(id -u)" != "0" ] ; then
|
||||
if [ "$IS_ACE_ENV" = "1" ];then
|
||||
if [[ IS_ACE_ENV="1" ]];then
|
||||
/opt/durapps/spark-store/bin/store-helper/pass-auth.sh "$0" "$@"
|
||||
else
|
||||
pkexec "$0" "$@"
|
||||
|
||||
Reference in New Issue
Block a user