mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 14:36:15 -05:00
feat(hip): manage reports and script execution
This commit is contained in:
54 files changed
+3122
-967
No files matched your search
@@ -3,6 +3,8 @@ install:
|
||||
|
||||
install -Dm755 artifacts/usr/bin/gpclient $(DESTDIR)/usr/bin/gpclient
|
||||
install -Dm755 artifacts/usr/bin/gpservice $(DESTDIR)/usr/bin/gpservice
|
||||
install -Dm755 artifacts/usr/libexec/gpclient/gp-hip-runner $(DESTDIR)/usr/libexec/gpclient/gp-hip-runner
|
||||
install -Dm755 artifacts/usr/libexec/gpclient/gp-hip-script-installer $(DESTDIR)/usr/libexec/gpclient/gp-hip-script-installer
|
||||
install -Dm755 artifacts/usr/bin/gpauth $(DESTDIR)/usr/bin/gpauth
|
||||
install -Dm755 artifacts/usr/bin/gpgui-helper $(DESTDIR)/usr/bin/gpgui-helper
|
||||
|
||||
@@ -37,6 +39,8 @@ uninstall:
|
||||
|
||||
rm -f $(DESTDIR)/usr/bin/gpclient
|
||||
rm -f $(DESTDIR)/usr/bin/gpservice
|
||||
rm -f $(DESTDIR)/usr/libexec/gpclient/gp-hip-runner
|
||||
rm -f $(DESTDIR)/usr/libexec/gpclient/gp-hip-script-installer
|
||||
rm -f $(DESTDIR)/usr/bin/gpauth
|
||||
rm -f $(DESTDIR)/usr/bin/gpgui-helper
|
||||
rm -f $(DESTDIR)/usr/bin/gpgui
|
||||
|
||||
@@ -26,4 +26,15 @@
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/local/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/local/libexec/gpclient/gp-hip-script-installer</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
||||
@@ -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>
|
||||
@@ -73,6 +73,8 @@ make build
|
||||
%{_bindir}/*
|
||||
%{_libexecdir}/gpclient/vpnc-script
|
||||
%{_libexecdir}/gpclient/hipreport.sh
|
||||
%{_libexecdir}/gpclient/gp-hip-runner
|
||||
%{_libexecdir}/gpclient/gp-hip-script-installer
|
||||
%{_libexecdir}/gpclient/gp-vpnc-script-installer
|
||||
%{_datadir}/applications/gpgui.desktop
|
||||
%{_datadir}/icons/hicolor/32x32/apps/gpgui.png
|
||||
|
||||
Reference in new issue
Block a user