Skip to content

Commit

Permalink
Fix failing chmod calls on installation for suidubins
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
falconindy committed Aug 2, 2019
1 parent 5afc1c5 commit edf7547
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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; \
Expand Down

0 comments on commit edf7547

Please sign in to comment.