From edf7547ad5aa650be868cf2dac58944773c12d75 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 31 Jul 2019 13:09:36 -0400 Subject: [PATCH] Fix failing chmod calls on installation for suidubins suidubins should be suidusbins, since these binaries are installed ${prefix}/sbin. This historically hasn't broken the build because chmod of newgidmap/newuidmap succeeds, causing make to think the command succeeded. Configuring shadow with --with-fcaps removes these final two entries and exposes the chmod failure to make. --- src/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 34690ced..a8c29c91 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,13 +52,14 @@ usbin_PROGRAMS = \ # id and groups are from gnu, sulogin from sysvinit noinst_PROGRAMS = id sulogin +suidusbins = suidbins = su suidubins = chage chfn chsh expiry gpasswd newgrp if !WITH_TCB suidubins += passwd endif if ACCT_TOOLS_SETUID -suidubins += chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod +suidusbins += chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod endif if ENABLE_SUBIDS if !FCAPS @@ -134,6 +135,9 @@ install-am: all-am for i in $(suidubins); do \ chmod $(suidperms) $(DESTDIR)$(ubindir)/$$i; \ done + for i in $(suidusbins); do \ + chmod $(suidperms) $(DESTDIR)$(usbindir)/$$i; \ + done if WITH_TCB for i in $(shadowsgidubins); do \ chown root:shadow $(DESTDIR)$(ubindir)/$$i; \