build-sys: chown before chmod for SUIDs

Make sure SUIDs are really owned by root.

Reported-by: L A Walsh <lkml@tlinx.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2017-06-20 13:12:43 +02:00
parent 9b76b0e98b
commit 8c1979948c
2 changed files with 3 additions and 0 deletions

View 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

View 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