diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-19 13:32:17 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-19 13:32:17 -0500 |
commit | 44d4de656b90a10afa92df2c73b56ed9faed2053 (patch) | |
tree | c4ff140a402a30fd33b1262ff758d1d3e5b920b4 | |
parent | 8423a89d41408462d3574f38627fbb3929288366 (diff) | |
download | weston-44d4de656b90a10afa92df2c73b56ed9faed2053.tar.gz |
configure: Add --enable-setuid-install
This adds support for installing the compositor setuid.
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | src/Makefile.am | 6 |
2 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 11233122..3522bee5 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,11 @@ AC_CHECK_PROG(RSVG_CONVERT, rsvg-convert, rsvg-convert) AM_CONDITIONAL(HAVE_RSVG_CONVERT, test -n "$RSVG_CONVERT") +AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],, + enable_setuid_install=yes) +AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install == xyes) + + AC_ARG_ENABLE(xserver-launcher, [ --enable-xserver-launcher],, enable_xserver_launcher=yes) AM_CONDITIONAL(ENABLE_XSERVER_LAUNCHER, test x$enable_xserver_launcher == xyes) @@ -157,3 +162,13 @@ AC_CONFIG_FILES([Makefile data/Makefile protocol/Makefile]) AC_OUTPUT + +if test "x$enable_setuid_install" == xyes; then +AC_MSG_WARN([ + + *** You've enabled the setuid install hook. Weston is still a + *** pre-alpha project and may have bugs and issues that make a + *** setuid install unsafe. Proceed at your own risk. +]) +fi + diff --git a/src/Makefile.am b/src/Makefile.am index 5cfbbe01..55600a27 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,6 +22,12 @@ weston_SOURCES = \ util.c \ $(xserver_launcher_sources) +if ENABLE_SETUID_INSTALL +install-exec-hook: + chown root $(bindir)/weston + chmod u+s $(bindir)/weston +endif + if ENABLE_XSERVER_LAUNCHER xserver_launcher_sources = \ xserver-launcher.c \ |