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.

68 lines
2.0 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 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. # apply the patches defined in the shadow.desc
  17. var_append patchfiles ' ' "`match_source_file -p patch`"
  18. if pkginstalled libselinux; then
  19. var_append GCC_WRAPPER_APPEND ' ' '-lselinux'
  20. else
  21. var_append confopt ' ' "--without-selinux"
  22. fi
  23. # Disable the installation of the groups program and its man pages,
  24. # as Coreutils provides a better version
  25. disable_groups() {
  26. echo_status "Disabling groups command..."
  27. echo_status "Using groups command provided by coreutils..."
  28. sed 's/groups$(EXEEXT) //' -i.orig src/Makefile
  29. find man -name Makefile -exec sed '/groups/d' -i.orig '{}' \;
  30. }
  31. hook_add premake 3 "disable_groups"
  32. pm_shadow() {
  33. cp -fv etc/limits etc/login.access $root/etc/
  34. cp -fv $confdir/login.defs $root/etc/login.defs
  35. touch $root/var/log/lastlog $root/var/log/faillog
  36. mv $root/usr/bin/{login,su} $root/bin/
  37. if [ -e $root/etc/pam.d ]; then
  38. if pkginstalled libselinux; then
  39. cp etc/pam.d/[a-z]* $root/etc/pam.d/
  40. else
  41. for i in etc/pam.d/[a-z]*; do
  42. sed 's,\(.*selinux.*\),#\1,g' < $i > $root/$i
  43. done
  44. fi
  45. [ -f $root/etc/pam.d/login ] && \
  46. sed -i 's,\(.*loginuid.*\),#\1,g' $root/etc/pam.d/login
  47. fi
  48. mkdir -p $root/etc/default
  49. echo 'SHELL=/bin/bash' > $root/etc/default/useradd
  50. }
  51. hook_add postmake 5 "pm_shadow"
  52. confopt="$confopt --enable-shared --disable-desrpc"
  53. if ! atstage native; then
  54. libdir="/${libdir##*/}"
  55. else
  56. libdir="$root/${libdir##*/}"
  57. fi