fix: improve the dbus security

This commit is contained in:
Kevin Yue 2022-05-23 21:55:21 +08:00
parent 829298bb84
commit ad178fe56c
3 changed files with 3 additions and 3 deletions

2
debian/rules vendored
View File

@ -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

View File

@ -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

View File

@ -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