shadow: remove utils provided by util-linux>=2.22.
This commit is contained in:
parent
557af9b40a
commit
50343911ab
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 1990 - 1994, Julianne Frances Haugh
|
||||
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
|
||||
* Copyright (c) 2001 - 2006, Tomasz Kłoczko
|
||||
* Copyright (c) 2007 - 2009, Nicolas François
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the copyright holders or contributors may not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
|
@ -1,19 +0,0 @@
|
|||
# login pam service with sha512 passwords and cracklib support.
|
||||
auth requisite pam_nologin.so
|
||||
auth required pam_securetty.so
|
||||
auth required pam_unix.so
|
||||
|
||||
account required pam_access.so
|
||||
account required pam_unix.so
|
||||
|
||||
session required pam_env.so
|
||||
session required pam_motd.so
|
||||
session optional pam_mail.so dir=/var/mail standard
|
||||
session optional pam_lastlog.so
|
||||
session required pam_unix.so
|
||||
session required pam_loginuid.so
|
||||
session required pam_systemd.so kill-session-processes=1
|
||||
session required pam_limits.so
|
||||
|
||||
password required pam_cracklib.so try_first_pass retry=3
|
||||
password required pam_unix.so sha512 shadow nullok try_first_pass use_authtok
|
|
@ -1,7 +0,0 @@
|
|||
auth sufficient pam_rootok.so
|
||||
auth required pam_unix.so
|
||||
account required pam_unix.so
|
||||
session optional pam_mail.so dir=/var/mail standard
|
||||
session optional pam_xauth.so
|
||||
session required pam_env.so
|
||||
session required pam_unix.so
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'shadow'
|
||||
pkgname=shadow
|
||||
version=4.1.5.1
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=gnu-configure
|
||||
configure_args="--bindir=/usr/bin --sbindir=/usr/sbin
|
||||
--libdir=/usr/lib --enable-shared --disable-static
|
||||
|
@ -16,12 +16,22 @@ checksum=aa32333748d68b58ed3a83625f0165e0f6b9dc4639e6377c9300c6bf4fe978fb
|
|||
long_desc="
|
||||
Shadow password file utilities for GNU/Linux."
|
||||
|
||||
conf_files="/etc/pam.d/usermod /etc/pam.d/userdel /etc/pam.d/useradd
|
||||
/etc/pam.d/su /etc/pam.d/passwd /etc/pam.d/newusers /etc/pam.d/login
|
||||
/etc/pam.d/groupmod /etc/pam.d/groupmems /etc/pam.d/groupdel
|
||||
/etc/pam.d/groupadd /etc/pam.d/chsh /etc/pam.d/chpasswd
|
||||
/etc/pam.d/chgpasswd /etc/pam.d/chfn /etc/pam.d/chage /etc/defaults/useradd
|
||||
/etc/pam.d/other /etc/login.defs"
|
||||
conf_files="
|
||||
/etc/pam.d/usermod
|
||||
/etc/pam.d/userdel
|
||||
/etc/pam.d/useradd
|
||||
/etc/pam.d/passwd
|
||||
/etc/pam.d/newusers
|
||||
/etc/pam.d/groupmod
|
||||
/etc/pam.d/groupmems
|
||||
/etc/pam.d/groupdel
|
||||
/etc/pam.d/groupadd
|
||||
/etc/pam.d/chpasswd
|
||||
/etc/pam.d/chgpasswd
|
||||
/etc/pam.d/chage
|
||||
/etc/defaults/useradd
|
||||
/etc/pam.d/other
|
||||
/etc/login.defs"
|
||||
|
||||
# Build PIE binaries by default.
|
||||
CFLAGS="-fPIE"
|
||||
|
@ -38,11 +48,11 @@ pre_build() {
|
|||
post_install() {
|
||||
# Install our pam files not the ones supplied with shadow.
|
||||
rm -f ${DESTDIR}/etc/pam.d/*
|
||||
for f in chage login passwd su other; do
|
||||
for f in chage passwd other; do
|
||||
install -m644 ${FILESDIR}/${f}.pam ${DESTDIR}/etc/pam.d/${f}
|
||||
done
|
||||
for f in chpasswd chgpasswd groupadd groupdel groupmems \
|
||||
groupmod newusers useradd userdel usermod chsh chfn; do
|
||||
groupmod newusers useradd userdel usermod; do
|
||||
install -m644 $DESTDIR/etc/pam.d/chage $DESTDIR/etc/pam.d/${f}
|
||||
done
|
||||
install -m644 ${FILESDIR}/login.defs ${DESTDIR}/etc
|
||||
|
@ -54,10 +64,28 @@ post_install() {
|
|||
install -D -m744 ${FILESDIR}/shadow.cron-daily \
|
||||
${DESTDIR}/etc/cron.daily/shadow
|
||||
|
||||
# Remove unused files due to PAM.
|
||||
for f in login.access limits; do
|
||||
[ -f ${DESTDIR}/etc/${f} ] && rm -f ${DESTDIR}/etc/${f}
|
||||
done
|
||||
# Remove groups.1 manpages that comes with coreutils.
|
||||
rm -f ${DESTDIR}/usr/share/man/man1/groups.1
|
||||
|
||||
# Remove utilities provided by util-linux
|
||||
rm \
|
||||
$DESTDIR/usr/bin/{chsh,chfn,sg} \
|
||||
$DESTDIR/usr/bin/{login,su} \
|
||||
$DESTDIR/usr/sbin/{vipw,vigr}
|
||||
|
||||
# but we keep newgrp, as sg is really an alias to it
|
||||
mv $DESTDIR/usr/bin/{newgrp,sg}
|
||||
|
||||
# ...and their many man pages
|
||||
find $DESTDIR/usr/share/man \
|
||||
'(' -name 'chsh.1' -o \
|
||||
-name 'chfn.1' -o \
|
||||
-name 'su.1' -o \
|
||||
-name 'login.1' -o \
|
||||
-name 'vipw.8' -o \
|
||||
-name 'vigr.8' -o \
|
||||
-name 'newgrp.1' ')' \
|
||||
-delete
|
||||
|
||||
vinstall $FILESDIR/LICENSE 644 usr/share/licenses/shadow
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue