Only install polkit action file when pkexec is used (#776437)
Only install the GParted polkit action file when pkexec is being used as the root privilege escalation program. Bug 776437 - GParted fails to run as root under Wayland
This commit is contained in:
parent
f35e734a0c
commit
2f559ec3b5
|
@ -25,7 +25,9 @@ polkit_action_in_in_FILES = org.gnome.gparted.policy.in.in
|
|||
polkit_action_in_FILES = org.gnome.gparted.policy.in
|
||||
polkit_action_FILES = $(polkit_action_in_FILES:.policy.in=.policy)
|
||||
polkit_actiondir = $(datadir)/polkit-1/actions
|
||||
polkit_action_DATA = $(polkit_action_FILES)
|
||||
if INSTALL_POLKIT_ACTIONS
|
||||
polkit_action_DATA = $(polkit_action_FILES)
|
||||
endif
|
||||
|
||||
bin_SCRIPTS = gparted
|
||||
CLEANFILES = $(bin_SCRIPTS) $(DESKTOP_IN_FILES) $(polkit_action_in_FILES)
|
||||
|
|
|
@ -25,12 +25,14 @@ dnl Find graphical privilege escalation program
|
|||
dnl======================
|
||||
AC_CHECK_PROGS([GKSUPROG], [pkexec gksudo gksu kdesudo "xdg-su -c"], [])
|
||||
|
||||
AM_CONDITIONAL([INSTALL_POLKIT_ACTIONS], false)
|
||||
if test "x$GKSUPROG" = 'xpkexec'; then
|
||||
AC_MSG_CHECKING([how to run pkexec])
|
||||
if pkexec --help 2>&1 | grep -q -- --disable-internal-agent; then
|
||||
GKSUPROG="$GKSUPROG --disable-internal-agent"
|
||||
fi
|
||||
AC_MSG_RESULT([$GKSUPROG])
|
||||
AM_CONDITIONAL([INSTALL_POLKIT_ACTIONS], true)
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue