# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/shadow/shadow.conf # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- pm_shadow() { cp -fv etc/limits etc/login.access $root/etc/ cp -fv $base/package/*/shadow/login.defs $root/etc/login.defs # with PAM login does not know all options, discard them if pkginstalled pam; then sed -i 's/^\([ ]*ULIMIT.*\)/# \1/' $root/etc/login.defs fi touch $root/var/log/lastlog $root/var/log/faillog mv $root/usr/bin/{login,su} $root/bin/ if [ -e $root/etc/pam.d ]; then if pkginstalled libselinux; then cp etc/pam.d/[a-z]* $root/etc/pam.d/ else for i in etc/pam.d/[a-z]*; do sed 's,\(.*selinux.*\),#\1,g' < $i > $root/$i done fi [ -f $root/etc/pam.d/login ] && sed -i 's,\(.*loginuid.*\),#\1,g' $root/etc/pam.d/login fi mkdir -p $root/etc/default echo 'SHELL=/bin/bash' > $root/etc/default/useradd } hook_add postmake 5 "pm_shadow" var_append confopt ' ' '--without-libbsd' var_append confopt ' ' --disable-desrpc [ "$SDECFG_STATIC" != 1 ] && var_append confopt ' ' --enable-shared pkginstalled libselinux || var_append confopt ' ' "--without-selinux" #CHECK var_append confopt ' ' "--with-skey"