]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: chown before chmod for SUIDs
authorKarel Zak <kzak@redhat.com>
Tue, 20 Jun 2017 11:12:43 +0000 (13:12 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Jun 2017 11:12:43 +0000 (13:12 +0200)
Make sure SUIDs are really owned by root.

Reported-by: L A Walsh <lkml@tlinx.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/Makemodule.am
sys-utils/Makemodule.am

index f3397b9f48d427a511a542654d3339b67fa8b694..ac9819f808ec2f46039d9ab12ebcef27546a68dc 100644 (file)
@@ -230,6 +230,7 @@ test_logindefs_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)
 install-exec-hook:
 if BUILD_SU
 if MAKEINSTALL_DO_SETUID
+       chown root:root $(DESTDIR)$(bindir)/su
        chmod 4755 $(DESTDIR)$(bindir)/su
 endif
 endif
index c5651946b8a342be1bbaaa907f9c7dd7df3f2242..6fbc517d24819d54cabbb03a32fd367f63f8935b 100644 (file)
@@ -291,7 +291,9 @@ endif
 
 if MAKEINSTALL_DO_SETUID
 install-exec-hook-mount:
+       chown root:root $(DESTDIR)$(bindir)/mount
        chmod 4755 $(DESTDIR)$(bindir)/mount
+       chown root:root $(DESTDIR)$(bindir)/umount
        chmod 4755 $(DESTDIR)$(bindir)/umount
 
 INSTALL_EXEC_HOOKS += install-exec-hook-mount