From 2a2f5c5c3bd96c574ce6544ea862c4223e4e9a85 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Fri, 22 Sep 2017 13:31:44 +0200 Subject: [PATCH] data: fix permissions when geoclue runs with a different user (#185) Geoclue can be configured to use another user than geoclue. --- .gitignore | 1 + configure.ac | 7 +++++++ data/Makefile.am | 6 +++++- ...ess.SensorProxy.conf => net.hadess.SensorProxy.conf.in} | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) rename data/{net.hadess.SensorProxy.conf => net.hadess.SensorProxy.conf.in} (98%) diff --git a/.gitignore b/.gitignore index 269d5b0..e1502f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ iio-sensor-proxy +data/net.hadess.SensorProxy.conf diff --git a/configure.ac b/configure.ac index b2b2bb7..06bfd37 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,13 @@ AM_CONDITIONAL(HAVE_GTK_TESTS, test "x$enable_gtk_tests" = "xyes") PKG_CHECK_MODULES(IIO_SENSOR_PROXY, gio-2.0 gudev-1.0 >= 232) +AC_ARG_WITH(geoclue-user, + AS_HELP_STRING([--with-geoclue-user=USER], + [The USER (existing) as which geoclue service is running (default: geoclue)]), + geoclue_user="$with_geoclue_user", + geoclue_user="geoclue") +AC_SUBST(geoclue_user) + AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen]) AC_CONFIG_FILES([ diff --git a/data/Makefile.am b/data/Makefile.am index db5ec67..626f957 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -9,5 +9,9 @@ iio-sensor-proxy.service: iio-sensor-proxy.service.in Makefile dbusconfdir = $(sysconfdir)/dbus-1/system.d dbusconf_DATA = net.hadess.SensorProxy.conf -CLEANFILES = iio-sensor-proxy.service +net.hadess.SensorProxy.conf: net.hadess.SensorProxy.conf.in Makefile + @sed -e "s|\@geoclue_user\@|$(geoclue_user)|" $< > $@ + + +CLEANFILES = iio-sensor-proxy.service net.hadess.SensorProxy.conf EXTRA_DIST = $(udevrules_DATA) $(dbusconf_DATA) $(systemdservice_in_files) diff --git a/data/net.hadess.SensorProxy.conf b/data/net.hadess.SensorProxy.conf.in similarity index 98% rename from data/net.hadess.SensorProxy.conf rename to data/net.hadess.SensorProxy.conf.in index 51dcd28..0e7b1b5 100644 --- a/data/net.hadess.SensorProxy.conf +++ b/data/net.hadess.SensorProxy.conf.in @@ -11,7 +11,7 @@ - +