discomfitor pushed a commit to branch master. http://git.enlightenment.org/misc/entrance.git/commit/?id=2ae5d988ff54d53806361f676382f1136960a568
commit 2ae5d988ff54d53806361f676382f1136960a568 Author: Mike Blumenkrantz <[email protected]> Date: Mon May 5 00:07:24 2014 -0400 use detected sudo for launching entrance_client more insanity! relying on PATH to contain anything useful and/or not be overwritten after being set?!? you've already detected the full /path/to/sudo in configure, now use it! --- configure.ac | 4 ++-- src/daemon/Makefile.am | 1 + src/daemon/entrance.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 228dd32..ed12117 100644 --- a/configure.ac +++ b/configure.ac @@ -103,8 +103,8 @@ AC_MSG_RESULT([${enable_systemd}]) AC_PROG_CC AC_PROG_SED PKG_PROG_PKG_CONFIG -AC_CHECK_PROG(have_sudo,sudo,yes) -if test x"$have_sudo" != x"yes" ; then +AC_PATH_PROG([SUDO],[sudo],[no]) +if test "x$SUDO" = "x" ; then AC_MSG_ERROR([Please install sudo before installing.]) fi diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index 245c563..801388e 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -8,6 +8,7 @@ AM_CPPFLAGS = \ -DSYSTEM_CONFIG_DIR=\"$(sysconfdir)\" \ -DPACKAGE_BIN_DIR=\"$(libdir)/$(PACKAGE)\" \ -DPACKAGE_SBIN_DIR=\"$(sbindir)/\" \ +-DSUDO=\"@SUDO@\" \ @ENTRANCE_CFLAGS@ if HAVE_CONSOLEKIT diff --git a/src/daemon/entrance.c b/src/daemon/entrance.c index d9fff0d..20c9c08 100644 --- a/src/daemon/entrance.c +++ b/src/daemon/entrance.c @@ -187,7 +187,7 @@ _entrance_main(const char *dname) ecore_event_handler_add(ECORE_EXE_EVENT_DATA, (Ecore_Event_Handler_Cb)_entrance_client_data, NULL); snprintf(buf, sizeof(buf), - "sudo -u nobody " + SUDO" -u nobody " PACKAGE_BIN_DIR"/entrance_client -d %s -t %s", dname, entrance_config->theme); PT("Exec entrance_client: %s\n", buf); --
