OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../shadow/shadow.conf
  5. # Copyright (C) 2006 - 2009 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. if pkginstalled libselinux; then
  17. var_append GCC_WRAPPER_APPEND ' ' '-lselinux'
  18. else
  19. var_append confopt ' ' "--without-selinux"
  20. fi
  21. # Disable the installation of the groups program and its man pages,
  22. # as Coreutils provides a better version
  23. disable_groups() {
  24. echo_status "Disabling groups command..."
  25. echo_status "Using groups command provided by coreutils..."
  26. sed 's/groups$(EXEEXT) //' -i.orig src/Makefile
  27. find man -name Makefile -exec sed '/groups/d' -i.orig '{}' \;
  28. }
  29. hook_add premake 3 "disable_groups"
  30. pm_shadow() {
  31. cp -fv etc/limits etc/login.access $root/etc/
  32. cp -fv $confdir/login.defs $root/etc/login.defs
  33. touch $root/var/log/lastlog $root/var/log/faillog
  34. mv $root/usr/bin/{login,su} $root/bin/
  35. if [ -e $root/etc/pam.d ]; then
  36. if pkginstalled libselinux; then
  37. cp etc/pam.d/[a-z]* $root/etc/pam.d/
  38. else
  39. for i in etc/pam.d/[a-z]*; do
  40. sed 's,\(.*selinux.*\),#\1,g' < $i > $root/$i
  41. done
  42. fi
  43. [ -f $root/etc/pam.d/login ] && \
  44. sed -i 's,\(.*loginuid.*\),#\1,g' $root/etc/pam.d/login
  45. fi
  46. mkdir -p $root/etc/default
  47. echo 'SHELL=/bin/bash' > $root/etc/default/useradd
  48. }
  49. hook_add postmake 5 "pm_shadow"
  50. confopt="$confopt --enable-shared --disable-desrpc"
  51. if ! atstage native; then
  52. libdir="/${libdir##*/}"
  53. else
  54. libdir="$root/${libdir##*/}"
  55. fi