From 65c59e47ecccb3fa71dd6be69fcb53542093490b Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Thu, 26 May 2022 11:56:14 +0800 Subject: [PATCH] Revert "Revert "fix: improve the dbus security"" This reverts commit 4940830885501c199accaeccfcf246a22850cbeb. --- debian/rules | 2 +- packaging/aur/gp.install | 2 +- packaging/obs/globalprotect-openconnect.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 5e1130b..4a27962 100755 --- a/debian/rules +++ b/debian/rules @@ -11,5 +11,5 @@ export DEBIAN_PACKAGE=1 dh $@ override_dh_installsystemd: # Update the the dbus user to logname - sed -i "/LOGNAME/N;s/user=\".*\"/user=\"$(logname)\"/" /usr/share/dbus-1/system.d/com.yuezk.qt.GPService.conf + sed -i "/LOGNAME/,+1s/user=\".*\"/user=\"$(logname)\"/" /usr/share/dbus-1/system.d/com.yuezk.qt.GPService.conf dh_installsystemd gpservice.service diff --git a/packaging/aur/gp.install b/packaging/aur/gp.install index 7ae9062..f3eb248 100755 --- a/packaging/aur/gp.install +++ b/packaging/aur/gp.install @@ -1,6 +1,6 @@ post_install() { # Update the the dbus user to logname - sed -i "/LOGNAME/N;s/user=\".*\"/user=\"$(logname)\"/" /usr/share/dbus-1/system.d/com.yuezk.qt.GPService.conf + sed -i "/LOGNAME/,+1s/user=\".*\"/user=\"$(logname)\"/" /usr/share/dbus-1/system.d/com.yuezk.qt.GPService.conf systemctl enable gpservice.service systemctl restart gpservice.service diff --git a/packaging/obs/globalprotect-openconnect.spec b/packaging/obs/globalprotect-openconnect.spec index 2bd5047..6eeba9b 100644 --- a/packaging/obs/globalprotect-openconnect.spec +++ b/packaging/obs/globalprotect-openconnect.spec @@ -33,7 +33,7 @@ A GlobalProtect VPN client (GUI) for Linux based on OpenConnect and built with Q %post -sed -i "/LOGNAME/N;s/user=\".*\"/user=\"$(logname)\"/" /usr/share/dbus-1/system.d/com.yuezk.qt.GPService.conf +sed -i "/LOGNAME/,+1s/user=\".*\"/user=\"$(logname)\"/" /usr/share/dbus-1/system.d/com.yuezk.qt.GPService.conf %if 0%{?suse_version} %service_add_post gpservice.service