feat(hip): manage reports and script execution

This commit is contained in:
Kevin Yue committed 2026-09-29 11:43:54 +08:00
1 parent 24d935ea61
commit 739cf7234b
54 files changed
+3122 -967

No files matched your search

@@ -1,7 +1,6 @@
#!/bin/sh
# Wrapper for gpclient hip
LOGFILE="/tmp/gpclient-hipreport.log"
LINUX_GPCLIENT_BIN="/usr/bin/gpclient"
ARM64_HOMEBREW_GPCLIENT_BIN="/opt/homebrew/bin/gpclient"
@@ -15,11 +14,8 @@ elif [ -x "$ARM64_HOMEBREW_GPCLIENT_BIN" ]; then
elif [ -x "$LOCAL_GPCLIENT_BIN" ]; then
GPCLIENT_BIN="$LOCAL_GPCLIENT_BIN"
else
echo "Error: gpclient binary not found." > "$LOGFILE"
echo "Error: gpclient binary not found." >&2
exit 1
fi
# Redirect the output to a file for debugging then output to stdout
HIP_REPORT_OUTPUT=$(exec 2> "$LOGFILE" "$GPCLIENT_BIN" hip -vv "$@")
echo "$HIP_REPORT_OUTPUT"
exec "$GPCLIENT_BIN" hip "$@"
@@ -26,4 +26,15 @@
<annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/gpclient/gp-vpnc-script-installer</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
<action id="com.yuezk.gpgui.manage-root-hip-script">
<description>Approve a GP Connect HIP script to run as root</description>
<message>Administrator authentication is required to run a HIP script as root</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/gpclient/gp-hip-script-installer</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>