From: Karel Zak Date: Tue, 20 Jun 2017 11:12:43 +0000 (+0200) Subject: build-sys: chown before chmod for SUIDs X-Git-Tag: v2.31-rc1~282 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c1979948c6a616d5e53ef693b4b123ec879441d;p=thirdparty%2Futil-linux.git build-sys: chown before chmod for SUIDs Make sure SUIDs are really owned by root. Reported-by: L A Walsh Signed-off-by: Karel Zak --- diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am index f3397b9f48..ac9819f808 100644 --- a/login-utils/Makemodule.am +++ b/login-utils/Makemodule.am @@ -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 diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am index c5651946b8..6fbc517d24 100644 --- a/sys-utils/Makemodule.am +++ b/sys-utils/Makemodule.am @@ -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