Commit d76dc269 authored by Michael Biebl's avatar Michael Biebl
Browse files

Revert "Store private binaries in /usr/lib/polkit-1 instead of /usr/libexec"

This reverts commit 6fbcc6cd.

/usr/libexec is nowadays widely used for internal binaries and
documented in the FHS so use that directory.

[1] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html
parent b6110c4a
Pipeline #185376 passed with stage
in 3 minutes and 31 seconds
......@@ -597,7 +597,7 @@ echo "
"
echo "NOTE: The file ${prefix}/lib/polkit-1/polkit-agent-helper-1 must be owned"
echo "NOTE: The file ${libexecdir}/polkit-agent-helper-1 must be owned"
echo " by root and have mode 4755 (setuid root binary)"
echo
......
......@@ -2,8 +2,6 @@
NULL =
libprivdir = $(prefix)/lib/polkit-1
# ----------------------------------------------------------------------------------------------------
servicedir = $(datadir)/dbus-1/system-services
......@@ -11,7 +9,7 @@ service_in_files = org.freedesktop.PolicyKit1.service.in
service_DATA = $(service_in_files:.service.in=.service)
$(service_DATA): $(service_in_files) Makefile
@sed -e "s|\@libprivdir\@|$(libprivdir)|" $< > $@
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
# ----------------------------------------------------------------------------------------------------
......@@ -47,7 +45,7 @@ if HAVE_SYSTEMD
systemdservicedir = $(systemdsystemunitdir)
systemdservice_DATA = $(systemdservice_in_files:.service.in=.service)
$(systemdservice_DATA): $(systemdservice_in_files) Makefile
@sed -e "s|\@libprivdir\@|$(libprivdir)|" $< > $@
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
endif
# ----------------------------------------------------------------------------------------------------
......
[D-BUS Service]
Name=org.freedesktop.PolicyKit1
Exec=@libprivdir@/polkitd --no-debug
Exec=@libexecdir@/polkitd --no-debug
User=root
SystemdService=polkit.service
......@@ -5,4 +5,4 @@ Documentation=man:polkit(8)
[Service]
Type=dbus
BusName=org.freedesktop.PolicyKit1
ExecStart=@libprivdir@/polkitd --no-debug
ExecStart=@libexecdir@/polkitd --no-debug
......@@ -6,7 +6,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_builddir)/src/polkit \
-I$(top_srcdir)/src/polkit \
-DPACKAGE_PREFIX=\""$(prefix)"\" \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
......@@ -79,8 +78,7 @@ libpolkit_agent_1_la_LIBADD = \
libpolkit_agent_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
libprivdir = $(prefix)/lib/polkit-1
libpriv_PROGRAMS = polkit-agent-helper-1
libexec_PROGRAMS = polkit-agent-helper-1
polkit_agent_helper_1_SOURCES = \
polkitagenthelperprivate.c polkitagenthelperprivate.h \
......@@ -146,9 +144,9 @@ endif # HAVE_INTROSPECTION
# authenticate not only the invoking user, but possibly also root
# and/or other users.
#
install-data-hook:
-chown root $(DESTDIR)$(libprivdir)/polkit-agent-helper-1
-chmod 4755 $(DESTDIR)$(libprivdir)/polkit-agent-helper-1
install-exec-hook:
-chown root $(DESTDIR)$(libexecdir)/polkit-agent-helper-1
-chmod 4755 $(DESTDIR)$(libexecdir)/polkit-agent-helper-1
EXTRA_DIST = polkitagentmarshal.list polkitagentenumtypes.h.template polkitagentenumtypes.c.template
CLEANFILES = $(gir_DATA) $(typelibs_DATA)
......
......@@ -596,7 +596,7 @@ polkit_agent_session_initiate (PolkitAgentSession *session)
goto error;
}
helper_argv[0] = PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1";
helper_argv[0] = PACKAGE_LIBEXEC_DIR "/polkit-agent-helper-1";
helper_argv[1] = passwd->pw_name;
helper_argv[2] = NULL;
......
......@@ -69,8 +69,7 @@ rules_DATA = 50-default.rules
# ----------------------------------------------------------------------------------------------------
libprivdir = $(prefix)/lib/polkit-1
libpriv_PROGRAMS = polkitd
libexec_PROGRAMS = polkitd
polkitd_SOURCES = \
polkitd.c \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment