shadow.mk 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ################################################################################
  2. #
  3. # shadow
  4. #
  5. ################################################################################
  6. SHADOW_VERSION = 4.14.3
  7. SHADOW_SITE = https://github.com/shadow-maint/shadow/releases/download/$(SHADOW_VERSION)
  8. SHADOW_SOURCE = shadow-$(SHADOW_VERSION).tar.xz
  9. SHADOW_LICENSE = BSD-3-Clause
  10. SHADOW_LICENSE_FILES = COPYING
  11. SHADOW_CPE_ID_VENDOR = debian
  12. SHADOW_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
  13. SHADOW_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
  14. SHADOW_CONF_OPTS = \
  15. --disable-man \
  16. --without-btrfs \
  17. --without-nscd \
  18. --without-skey \
  19. --without-sssd \
  20. --without-su \
  21. --without-tcb
  22. ifeq ($(BR2_PACKAGE_SHADOW_SHADOWGRP),y)
  23. SHADOW_CONF_OPTS += --enable-shadowgrp
  24. else
  25. SHADOW_CONF_OPTS += --disable-shadowgrp
  26. endif
  27. ifeq ($(BR2_PACKAGE_SHADOW_ACCOUNT_TOOLS_SETUID),y)
  28. SHADOW_CONF_OPTS += --enable-account-tools-setuid
  29. define SHADOW_ACCOUNT_TOOLS_SETUID_PERMISSIONS
  30. /usr/sbin/chgpasswd f 4755 0 0 - - - - -
  31. /usr/sbin/chpasswd f 4755 0 0 - - - - -
  32. /usr/sbin/groupadd f 4755 0 0 - - - - -
  33. /usr/sbin/groupdel f 4755 0 0 - - - - -
  34. /usr/sbin/groupmod f 4755 0 0 - - - - -
  35. /usr/sbin/newusers f 4755 0 0 - - - - -
  36. /usr/sbin/useradd f 4755 0 0 - - - - -
  37. /usr/sbin/userdel f 4755 0 0 - - - - -
  38. /usr/sbin/usermod f 4755 0 0 - - - - -
  39. endef
  40. else
  41. SHADOW_CONF_OPTS += --disable-account-tools-setuid
  42. endif
  43. ifeq ($(BR2_PACKAGE_SHADOW_SUBORDINATE_IDS),y)
  44. SHADOW_CONF_OPTS += --enable-subordinate-ids
  45. define SHADOW_SUBORDINATE_IDS_PERMISSIONS
  46. /usr/bin/newuidmap f 4755 0 0 - - - - -
  47. /usr/bin/newgidmap f 4755 0 0 - - - - -
  48. endef
  49. else
  50. SHADOW_CONF_OPTS += --disable-subordinate-ids
  51. endif
  52. ifeq ($(BR2_PACKAGE_ACL),y)
  53. SHADOW_CONF_OPTS += --with-acl
  54. SHADOW_DEPENDENCIES += acl
  55. else
  56. SHADOW_CONF_OPTS += --without-acl
  57. endif
  58. ifeq ($(BR2_PACKAGE_ATTR),y)
  59. SHADOW_CONF_OPTS += --with-attr
  60. SHADOW_DEPENDENCIES += attr
  61. else
  62. SHADOW_CONF_OPTS += --without-attr
  63. endif
  64. ifeq ($(BR2_PACKAGE_AUDIT),y)
  65. SHADOW_CONF_OPTS += --with-audit
  66. SHADOW_DEPENDENCIES += audit
  67. else
  68. SHADOW_CONF_OPTS += --without-audit
  69. endif
  70. ifeq ($(BR2_PACKAGE_CRACKLIB),y)
  71. SHADOW_CONF_OPTS += --with-libcrack
  72. SHADOW_DEPENDENCIES += cracklib
  73. else
  74. SHADOW_CONF_OPTS += --without-libcrack
  75. endif
  76. ifeq ($(BR2_PACKAGE_LIBSELINUX)$(BR2_PACKAGE_LIBSEMANAGE),yy)
  77. SHADOW_CONF_OPTS += --with-selinux
  78. SHADOW_DEPENDENCIES += libselinux libsemanage
  79. else
  80. SHADOW_CONF_OPTS += --without-selinux
  81. endif
  82. # linux-pam is also used without account-tools-setuid enabled
  83. ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
  84. SHADOW_CONF_OPTS += --with-libpam
  85. SHADOW_DEPENDENCIES += linux-pam
  86. else
  87. SHADOW_CONF_OPTS += --without-libpam
  88. endif
  89. ifeq ($(BR2_PACKAGE_SHADOW_SHA_CRYPT),y)
  90. SHADOW_CONF_OPTS += --with-sha-crypt
  91. else
  92. SHADOW_CONF_OPTS += --without-sha-crypt
  93. endif
  94. ifeq ($(BR2_PACKAGE_SHADOW_BCRYPT),y)
  95. SHADOW_CONF_OPTS += --with-bcrypt
  96. else
  97. SHADOW_CONF_OPTS += --without-bcrypt
  98. endif
  99. ifeq ($(BR2_PACKAGE_SHADOW_YESCRYPT),y)
  100. SHADOW_CONF_OPTS += --with-yescrypt
  101. else
  102. SHADOW_CONF_OPTS += --without-yescrypt
  103. endif
  104. ifeq ($(BR2_PACKAGE_LIBBSD),y)
  105. SHADOW_CONF_OPTS += --with-libbsd
  106. SHADOW_DEPENDENCIES += libbsd
  107. else
  108. SHADOW_CONF_OPTS += --without-libbsd
  109. endif
  110. define SHADOW_PERMISSIONS
  111. /usr/bin/chage f 4755 0 0 - - - - -
  112. /usr/bin/chfn f 4755 0 0 - - - - -
  113. /usr/bin/chsh f 4755 0 0 - - - - -
  114. /usr/bin/expiry f 4755 0 0 - - - - -
  115. /usr/bin/gpasswd f 4755 0 0 - - - - -
  116. /usr/bin/newgrp f 4755 0 0 - - - - -
  117. /usr/bin/passwd f 4755 0 0 - - - - -
  118. $(SHADOW_ACCOUNT_TOOLS_SETUID_PERMISSIONS)
  119. $(SHADOW_SUBORDINATE_IDS_PERMISSIONS)
  120. endef
  121. $(eval $(autotools-package))