From 6b04a147cafc68d46e8ad097975fbd4dfaf1a1ed Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 5 Nov 2022 23:40:18 +0100 Subject: [PATCH 1/3] Disable replaced tools, their man pages and PAM integration etc/pam.d/Makefile.am: Disable installation of PAM integration for chfn, chsh and login tools as they are provided by util-linux. man/Makefile.am, man/*/Makefile.am: Disable man pages for chfn, chsh, login, logoutd, newgrp, nologin, vigr, vipw and su as they are either no longer used or replaced by util-linux. src/Makefile.am: Set usbindir to use bin instead of sbin, as Arch Linux is a /usr and bin merge distribution. Remove the use of login, nologin, chfn, chsh, logoutd, vipw and vigr, as they are either not used or replaced by util-linux. Move newgrp to replace sg (instead of it being a symlink). --- etc/pam.d/Makefile.am | 3 --- man/Makefile.am | 20 +++----------------- man/cs/Makefile.am | 8 ++------ man/da/Makefile.am | 8 +------- man/de/Makefile.am | 11 +---------- man/fi/Makefile.am | 5 +---- man/fr/Makefile.am | 11 +---------- man/hu/Makefile.am | 6 +----- man/id/Makefile.am | 2 -- man/it/Makefile.am | 11 +---------- man/ja/Makefile.am | 10 +--------- man/ko/Makefile.am | 8 +------- man/pl/Makefile.am | 7 +------ man/ru/Makefile.am | 11 +---------- man/sv/Makefile.am | 8 +------- man/tr/Makefile.am | 3 --- man/uk/Makefile.am | 11 +---------- man/zh_CN/Makefile.am | 11 +---------- man/zh_TW/Makefile.am | 4 ---- src/Makefile.am | 18 +++++++----------- 20 files changed, 25 insertions(+), 151 deletions(-) diff --git a/etc/pam.d/Makefile.am b/etc/pam.d/Makefile.am index b8e4321f..73d4554f 100644 --- a/etc/pam.d/Makefile.am +++ b/etc/pam.d/Makefile.am @@ -3,10 +3,7 @@ pamd_files = \ chpasswd \ - chfn \ - chsh \ groupmems \ - login \ newusers \ passwd diff --git a/man/Makefile.am b/man/Makefile.am index cffef699..f57e476d 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -8,10 +8,8 @@ endif man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chgpasswd.8 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -26,12 +24,9 @@ man_MANS = \ man8/grpconv.8 \ man8/grpunconv.8 \ man5/gshadow.5 \ - man1/login.1 \ + man8/lastlog.8 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ @@ -43,9 +38,7 @@ man_MANS = \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 @@ -77,10 +70,8 @@ endif man_XMANS = \ chage.1.xml \ - chfn.1.xml \ chgpasswd.8.xml \ chpasswd.8.xml \ - chsh.1.xml \ expiry.1.xml \ faillog.5.xml \ faillog.8.xml \ @@ -94,12 +85,9 @@ man_XMANS = \ grpck.8.xml \ gshadow.5.xml \ limits.5.xml \ - login.1.xml \ login.access.5.xml \ login.defs.5.xml \ - logoutd.8.xml \ newgidmap.1.xml \ - newgrp.1.xml \ newuidmap.1.xml \ newusers.8.xml \ nologin.8.xml \ @@ -111,14 +99,12 @@ man_XMANS = \ shadow.3.xml \ shadow.5.xml \ sg.1.xml \ - su.1.xml \ suauth.5.xml \ subgid.5.xml \ subuid.5.xml \ useradd.8.xml \ userdel.8.xml \ - usermod.8.xml \ - vipw.8.xml + usermod.8.xml if ENABLE_LASTLOG man_XMANS += lastlog.8.xml diff --git a/man/cs/Makefile.am b/man/cs/Makefile.am index 84407d71..c5ef7cf5 100644 --- a/man/cs/Makefile.am +++ b/man/cs/Makefile.am @@ -12,11 +12,8 @@ man_MANS = \ man1/groups.1 \ man8/grpck.8 \ man5/gshadow.5 \ - man8/nologin.8 \ man5/passwd.5 \ - man5/shadow.5 \ - man1/su.1 \ - man8/vipw.8 + man5/shadow.5 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 @@ -24,6 +21,5 @@ endif EXTRA_DIST = $(man_MANS) \ man1/id.1 \ - man8/groupmems.8 \ - man8/logoutd.8 + man8/groupmems.8 diff --git a/man/da/Makefile.am b/man/da/Makefile.am index a3b09224..e45bef66 100644 --- a/man/da/Makefile.am +++ b/man/da/Makefile.am @@ -3,16 +3,10 @@ mandir = @mandir@/da # 2012.01.28 - activate manpages with more than 50% translated messages man_MANS = \ - man1/chfn.1 \ man8/groupdel.8 \ man1/groups.1 \ man5/gshadow.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ - man8/nologin.8 \ - man1/sg.1 \ - man8/vigr.8 \ - man8/vipw.8 + man1/sg.1 man_nopam = diff --git a/man/de/Makefile.am b/man/de/Makefile.am index 671432d3..333d5524 100644 --- a/man/de/Makefile.am +++ b/man/de/Makefile.am @@ -3,10 +3,8 @@ mandir = @mandir@/de man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chgpasswd.8 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -21,12 +19,8 @@ man_MANS = \ man8/grpconv.8 \ man8/grpunconv.8 \ man5/gshadow.5 \ - man1/login.1 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ @@ -35,13 +29,10 @@ man_MANS = \ man1/sg.1 \ man3/shadow.3 \ man5/shadow.5 \ - man1/su.1 \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/fi/Makefile.am b/man/fi/Makefile.am index 26a1a848..f02b92f3 100644 --- a/man/fi/Makefile.am +++ b/man/fi/Makefile.am @@ -1,10 +1,7 @@ mandir = @mandir@/fi -man_MANS = \ - man1/chfn.1 \ - man1/chsh.1 \ - man1/su.1 +man_MANS = # Outdated manpages # passwd.1 (https://bugs.launchpad.net/ubuntu/+bug/384024) diff --git a/man/fr/Makefile.am b/man/fr/Makefile.am index 335e0298..9962c038 100644 --- a/man/fr/Makefile.am +++ b/man/fr/Makefile.am @@ -3,10 +3,8 @@ mandir = @mandir@/fr man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chgpasswd.8 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -21,12 +19,8 @@ man_MANS = \ man8/grpconv.8 \ man8/grpunconv.8 \ man5/gshadow.5 \ - man1/login.1 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ @@ -35,13 +29,10 @@ man_MANS = \ man1/sg.1 \ man3/shadow.3 \ man5/shadow.5 \ - man1/su.1 \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/hu/Makefile.am b/man/hu/Makefile.am index 205bb0a8..3d813179 100644 --- a/man/hu/Makefile.am +++ b/man/hu/Makefile.am @@ -2,15 +2,11 @@ mandir = @mandir@/hu man_MANS = \ - man1/chsh.1 \ man1/gpasswd.1 \ man1/groups.1 \ - man1/login.1 \ - man1/newgrp.1 \ man1/passwd.1 \ man5/passwd.5 \ - man1/sg.1 \ - man1/su.1 + man1/sg.1 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/id/Makefile.am b/man/id/Makefile.am index 21f3dbe9..6d10b930 100644 --- a/man/id/Makefile.am +++ b/man/id/Makefile.am @@ -2,8 +2,6 @@ mandir = @mandir@/id man_MANS = \ - man1/chsh.1 \ - man1/login.1 \ man8/useradd.8 EXTRA_DIST = $(man_MANS) diff --git a/man/it/Makefile.am b/man/it/Makefile.am index b76187fa..1f62e20e 100644 --- a/man/it/Makefile.am +++ b/man/it/Makefile.am @@ -3,10 +3,8 @@ mandir = @mandir@/it man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chgpasswd.8 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -21,12 +19,8 @@ man_MANS = \ man8/grpconv.8 \ man8/grpunconv.8 \ man5/gshadow.5 \ - man1/login.1 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ @@ -35,13 +29,10 @@ man_MANS = \ man1/sg.1 \ man3/shadow.3 \ man5/shadow.5 \ - man1/su.1 \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/ja/Makefile.am b/man/ja/Makefile.am index 13f18da1..3401a085 100644 --- a/man/ja/Makefile.am +++ b/man/ja/Makefile.am @@ -3,9 +3,7 @@ mandir = @mandir@/ja man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -17,10 +15,7 @@ man_MANS = \ man8/grpck.8 \ man8/grpconv.8 \ man8/grpunconv.8 \ - man1/login.1 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ man1/passwd.1 \ man5/passwd.5 \ @@ -29,13 +24,10 @@ man_MANS = \ man8/pwunconv.8 \ man1/sg.1 \ man5/shadow.5 \ - man1/su.1 \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/ko/Makefile.am b/man/ko/Makefile.am index c269f0bb..9616cb3e 100644 --- a/man/ko/Makefile.am +++ b/man/ko/Makefile.am @@ -2,14 +2,8 @@ mandir = @mandir@/ko man_MANS = \ - man1/chfn.1 \ - man1/chsh.1 \ man1/groups.1 \ - man1/login.1 \ - man5/passwd.5 \ - man1/su.1 \ - man8/vigr.8 \ - man8/vipw.8 + man5/passwd.5 # newgrp.1 must be updated # newgrp.1 diff --git a/man/pl/Makefile.am b/man/pl/Makefile.am index b2f096f7..00817d37 100644 --- a/man/pl/Makefile.am +++ b/man/pl/Makefile.am @@ -4,7 +4,6 @@ mandir = @mandir@/pl # 2012.01.28 - activate manpages with more than 50% translated messages man_MANS = \ man1/chage.1 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -15,14 +14,10 @@ man_MANS = \ man8/groupmod.8 \ man1/groups.1 \ man8/grpck.8 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man1/sg.1 \ man3/shadow.3 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/ru/Makefile.am b/man/ru/Makefile.am index 84d55d9e..b65f4881 100644 --- a/man/ru/Makefile.am +++ b/man/ru/Makefile.am @@ -3,10 +3,8 @@ mandir = @mandir@/ru man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chgpasswd.8 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -21,12 +19,8 @@ man_MANS = \ man8/grpconv.8 \ man8/grpunconv.8 \ man5/gshadow.5 \ - man1/login.1 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ @@ -35,13 +29,10 @@ man_MANS = \ man1/sg.1 \ man3/shadow.3 \ man5/shadow.5 \ - man1/su.1 \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/sv/Makefile.am b/man/sv/Makefile.am index 70329edf..58fa80e5 100644 --- a/man/sv/Makefile.am +++ b/man/sv/Makefile.am @@ -3,7 +3,6 @@ mandir = @mandir@/sv # 2012.01.28 - activate manpages with more than 50% translated messages man_MANS = \ man1/chage.1 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -15,18 +14,13 @@ man_MANS = \ man1/groups.1 \ man8/grpck.8 \ man5/gshadow.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ man1/sg.1 \ man3/shadow.3 \ man5/suauth.5 \ - man8/userdel.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/userdel.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/tr/Makefile.am b/man/tr/Makefile.am index 8d8b9166..4fe3632a 100644 --- a/man/tr/Makefile.am +++ b/man/tr/Makefile.am @@ -2,15 +2,12 @@ mandir = @mandir@/tr man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/groupadd.8 \ man8/groupdel.8 \ man8/groupmod.8 \ - man1/login.1 \ man1/passwd.1 \ man5/passwd.5 \ man5/shadow.5 \ - man1/su.1 \ man8/useradd.8 \ man8/userdel.8 \ man8/usermod.8 diff --git a/man/uk/Makefile.am b/man/uk/Makefile.am index 3fb5ffb3..e13c8fee 100644 --- a/man/uk/Makefile.am +++ b/man/uk/Makefile.am @@ -3,10 +3,8 @@ mandir = @mandir@/uk man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chgpasswd.8 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -21,12 +19,8 @@ man_MANS = \ man8/grpconv.8 \ man8/grpunconv.8 \ man5/gshadow.5 \ - man1/login.1 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ @@ -35,13 +29,10 @@ man_MANS = \ man1/sg.1 \ man3/shadow.3 \ man5/shadow.5 \ - man1/su.1 \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/zh_CN/Makefile.am b/man/zh_CN/Makefile.am index a8b93a56..42ad764d 100644 --- a/man/zh_CN/Makefile.am +++ b/man/zh_CN/Makefile.am @@ -3,10 +3,8 @@ mandir = @mandir@/zh_CN man_MANS = \ man1/chage.1 \ - man1/chfn.1 \ man8/chgpasswd.8 \ man8/chpasswd.8 \ - man1/chsh.1 \ man1/expiry.1 \ man5/faillog.5 \ man8/faillog.8 \ @@ -21,12 +19,8 @@ man_MANS = \ man8/grpconv.8 \ man8/grpunconv.8 \ man5/gshadow.5 \ - man1/login.1 \ man5/login.defs.5 \ - man8/logoutd.8 \ - man1/newgrp.1 \ man8/newusers.8 \ - man8/nologin.8 \ man1/passwd.1 \ man5/passwd.5 \ man8/pwck.8 \ @@ -35,13 +29,10 @@ man_MANS = \ man1/sg.1 \ man3/shadow.3 \ man5/shadow.5 \ - man1/su.1 \ man5/suauth.5 \ man8/useradd.8 \ man8/userdel.8 \ - man8/usermod.8 \ - man8/vigr.8 \ - man8/vipw.8 + man8/usermod.8 if ENABLE_LASTLOG man_MANS += man8/lastlog.8 diff --git a/man/zh_TW/Makefile.am b/man/zh_TW/Makefile.am index c36ed2c7..26696b67 100644 --- a/man/zh_TW/Makefile.am +++ b/man/zh_TW/Makefile.am @@ -2,15 +2,11 @@ mandir = @mandir@/zh_TW man_MANS = \ - man1/chfn.1 \ - man1/chsh.1 \ man8/chpasswd.8 \ - man1/newgrp.1 \ man8/groupadd.8 \ man8/groupdel.8 \ man8/groupmod.8 \ man5/passwd.5 \ - man1/su.1 \ man8/useradd.8 \ man8/userdel.8 \ man8/usermod.8 diff --git a/src/Makefile.am b/src/Makefile.am index b6cb09ef..bfe73b09 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ EXTRA_DIST = \ .indent.pro ubindir = ${prefix}/bin -usbindir = ${prefix}/sbin +usbindir = ${prefix}/bin suidperms = 4755 sgidperms = 2755 @@ -26,9 +26,9 @@ AM_CFLAGS = $(LIBBSD_CFLAGS) # and installation would be much simpler (just two directories, # $prefix/bin and $prefix/sbin, no install-data hacks...) -bin_PROGRAMS = groups login -sbin_PROGRAMS = nologin -ubin_PROGRAMS = faillog chage chfn chsh expiry gpasswd newgrp passwd +bin_PROGRAMS = groups +sbin_PROGRAMS = +ubin_PROGRAMS = faillog lastlog chage expiry gpasswd newgrp passwd if ENABLE_SUBIDS ubin_PROGRAMS += newgidmap newuidmap endif @@ -48,22 +48,20 @@ usbin_PROGRAMS = \ grpck \ grpconv \ grpunconv \ - logoutd \ newusers \ pwck \ pwconv \ pwunconv \ useradd \ userdel \ - usermod \ - vipw + usermod # id and groups are from gnu, sulogin from sysvinit noinst_PROGRAMS = id sulogin suidusbins = suidbins = -suidubins = chage chfn chsh expiry gpasswd newgrp +suidubins = chage expiry gpasswd newgrp if WITH_SU suidbins += su endif @@ -135,18 +133,16 @@ sulogin_LDADD = $(LDADD) $(LIBCRYPT) $(LIBECONF) useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) -ldl userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBECONF) -ldl usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) -ldl -vipw_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) install-am: all-am $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - ln -sf newgrp $(DESTDIR)$(ubindir)/sg - ln -sf vipw $(DESTDIR)$(usbindir)/vigr set -e; for i in $(suidbins); do \ chmod $(suidperms) $(DESTDIR)$(bindir)/$$i; \ done set -e; for i in $(suidubins); do \ chmod $(suidperms) $(DESTDIR)$(ubindir)/$$i; \ done + mv -v $(DESTDIR)$(ubindir)/newgrp $(DESTDIR)$(ubindir)/sg set -e; for i in $(suidusbins); do \ chmod $(suidperms) $(DESTDIR)$(usbindir)/$$i; \ done -- 2.44.0