From 4c24a7aed67282a49d5e133173c207bf35dcca4a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 30 Sep 2009 16:51:20 +0200 Subject: [PATCH] build-sys: add --disable-makeinstall-setuid .. to disable "chmod 4755" for mount and umount. Signed-off-by: Karel Zak --- configure.ac | 6 ++++++ mount/Makefile.am | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b421d0a1..4f4cbb39 100644 --- a/configure.ac +++ b/configure.ac @@ -898,6 +898,12 @@ AC_ARG_ENABLE([makeinstall-chown], ) AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test "x$enable_makeinstall_chown" = xyes) +AC_ARG_ENABLE([makeinstall-setuid], + AS_HELP_STRING([--disable-makeinstall-setuid], [do not do setuid chmod operations during "make install"]), + [], enable_makeinstall_setuid=yes +) +AM_CONDITIONAL(MAKEINSTALL_DO_SETUID, test "x$enable_makeinstall_setuid" = xyes) + AC_ARG_VAR([SUID_CFLAGS], [CFLAGS used for binaries which are usually with the suid bit]) diff --git a/mount/Makefile.am b/mount/Makefile.am index b0e63740..d5bbf201 100644 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@ -91,6 +91,9 @@ mtab_lock_test_SOURCES = fstab.c $(srcs_common) $(hdrs_mount) mtab_lock_test_CPPFLAGS = -DMAIN_TEST_MTABLOCK $(AM_CPPFLAGS) install-exec-hook: + cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff +if MAKEINSTALL_DO_SETUID chmod 4755 $(DESTDIR)$(bindir)/mount chmod 4755 $(DESTDIR)$(bindir)/umount - cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff +endif + -- 2.39.5