]> err.no Git - util-linux/commitdiff
build-sys: add --disable-makeinstall-setuid
authorKarel Zak <kzak@redhat.com>
Wed, 30 Sep 2009 14:51:20 +0000 (16:51 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 30 Sep 2009 14:51:20 +0000 (16:51 +0200)
.. to disable "chmod 4755" for mount and umount.

Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
mount/Makefile.am

index b421d0a19539d2afb5373a0ce8abd3c47b22b6aa..4f4cbb39a80914dbb9d8cf983e01815624be9edd 100644 (file)
@@ -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])
index b0e63740b09ee0517a5d694aeefeb0354eeface3..d5bbf201c7045a085a949502cb0be4d495caf87c 100644 (file)
@@ -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
+