]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: make chown usage more robust
authorKarel Zak <kzak@redhat.com>
Wed, 21 Jun 2017 09:12:04 +0000 (11:12 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 21 Jun 2017 09:12:04 +0000 (11:12 +0200)
* add --disable-makeinstall-chown to travis non-root mode

* use "if MAKEINSTALL_DO_SETUID" for chown root:root

Signed-off-by: Karel Zak <kzak@redhat.com>
.travis-functions.sh
login-utils/Makemodule.am
sys-utils/Makemodule.am

index ece05d409cc72ffb7b13ec211ddd280d21483773..7b20e886c24b9136f045a5e3c380d43d36d860be 100755 (executable)
@@ -42,6 +42,7 @@ function check_nonroot
 
        xconfigure \
                --disable-use-tty-group \
+               --disable-makeinstall-chown \
                --enable-all-programs \
                || return
        $MAKE || return
index ac9819f808ec2f46039d9ab12ebcef27546a68dc..67a0c98ecbadb05153156c0a227f2c133ccbd86e 100644 (file)
@@ -229,8 +229,10 @@ test_logindefs_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)
 
 install-exec-hook:
 if BUILD_SU
-if MAKEINSTALL_DO_SETUID
+if MAKEINSTALL_DO_CHOWN
        chown root:root $(DESTDIR)$(bindir)/su
+endif
+if MAKEINSTALL_DO_SETUID
        chmod 4755 $(DESTDIR)$(bindir)/su
 endif
 endif
index 6fbc517d24819d54cabbb03a32fd367f63f8935b..754f1f44dc5ee0b48d9e580a99879cd8c1bd2464 100644 (file)
@@ -289,15 +289,21 @@ umount_static_LDFLAGS = $(umount_LDFLAGS) -all-static
 umount_static_LDADD = $(umount_LDADD)
 endif
 
-if MAKEINSTALL_DO_SETUID
 install-exec-hook-mount:
+if MAKEINSTALL_DO_CHOWN
        chown root:root $(DESTDIR)$(bindir)/mount
+endif
+if MAKEINSTALL_DO_SETUID
        chmod 4755 $(DESTDIR)$(bindir)/mount
+endif
+if MAKEINSTALL_DO_CHOWN
        chown root:root $(DESTDIR)$(bindir)/umount
+endif
+if MAKEINSTALL_DO_SETUID
        chmod 4755 $(DESTDIR)$(bindir)/umount
+endif
 
 INSTALL_EXEC_HOOKS += install-exec-hook-mount
-endif
 endif # BUILD_MOUNT