summaryrefslogtreecommitdiff
path: root/sys-freebsd/freebsd-pam-modules
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd/freebsd-pam-modules')
-rw-r--r--sys-freebsd/freebsd-pam-modules/Manifest16
-rw-r--r--sys-freebsd/freebsd-pam-modules/files/README.pamd61
-rw-r--r--sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-6.0-gentoo.patch24
-rw-r--r--sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-9.0-gentoo.patch22
-rw-r--r--sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-10.3.ebuild47
-rw-r--r--sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild45
-rw-r--r--sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.1.ebuild45
-rw-r--r--sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-8.2.ebuild47
-rw-r--r--sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1-r1.ebuild44
-rw-r--r--sys-freebsd/freebsd-pam-modules/metadata.xml8
10 files changed, 359 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-pam-modules/Manifest b/sys-freebsd/freebsd-pam-modules/Manifest
new file mode 100644
index 000000000000..42024cca861f
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/Manifest
@@ -0,0 +1,16 @@
+AUX README.pamd 2840 SHA256 8f017c64cc5a54afbfa72152ed45d9a3f291cf636786c61409637b3e439b9e20 SHA512 7188bbb741bacbd2c826976f7f3b3150036f0855514ead679f56f0a4ab70fd6657fd38a33215cd883264ca2e801b7b2f3d7b73c40e04adc685e5fa6385c49357 WHIRLPOOL 8c7a2cdd6a5586d14bb4cf3c4158b0eaac0657137d72eb790083bab8363925d77eaa8d4200c1860e03a0b18cff9a96610ac51a2104e75feaf91a23a1a4c079aa
+AUX freebsd-pam-modules-6.0-gentoo.patch 701 SHA256 8346d95aa5b4f283fedf4387ebb85a61f5f10fac38dc45bdea8c2c345fdc633d SHA512 7adba1261547c11bb1a0b0d3c8cc800bba9aca4a878c9fa63f8b68e270a3a0d54388eb1e156aadcba54d9dd23a2817232b3f287522d820da15abb7dd9c8cd995 WHIRLPOOL 2b02611fce484145fe62468826bbdb8f1dedfb1c4a7a14b01234c99f13daefe9597d08a23e0836f5804f92c26cc1b950180f7fcbd1698af360b23e06c143621c
+AUX freebsd-pam-modules-9.0-gentoo.patch 622 SHA256 b397d5d646712c4a63606d94c45d25551344872d77d7b6b5f646403a2b09f7fb SHA512 752b593a8bea623110683a181deefd7126eaded7bf94973bcd994b2415db5739cd69a125ee9bd0c960fd5a3e30e3a2eaf8c711893f94966a9cc5a9b0c3191af0 WHIRLPOOL 168b0ba47e9a326ff1db9cfe46724c83a45d744df0fa737599894ef1574b0e199c46e7626b16f5cc83cd4886fd79320c5f92e4c2b37801ef3604ffd4ec1b2de7
+DIST freebsd-lib-8.2.tar.bz2 3323878 SHA256 e3590c12794fcb5ba8eb7a1f58b497587cf19f9200b3254c194a793da3b5bfb0 SHA512 c059cfdd1099bb519b2a5c43fb7e7104c500ef8906229ed7eb9e420cb3a217cdaf8655e9e7a9f45cfadc5491f8115e0e738fd49251d9f0c3a83780845b09f007 WHIRLPOOL 95f98a372f44a89bc8ac3029ec065dbbfec338e6f889d057d75644bfcdfb9d27fdc0421d7e392cad5a823712b97f0857297ec3d321580254c63032c22b95792e
+DIST freebsd-lib-9.1.tar.bz2 3206685 SHA256 f31fa8107b4de711c548f6d0c1bb1f81d09f51bcc3b14a1e9e90bb0e7cc4a35d SHA512 40d0c36b6b889c404fa0e0afa38ba4e84a55bc88ffa2f98a70afbd7a32c4f32c158617ba770567d082a986d62c09b3ec8db3dc5ab853ee1c9bbe0b90bb82396e WHIRLPOOL 581878bf9c43184b043b4293409b85901c9ed1f9bd279e965414aca41ba50950848ebda3ee10a503a028135dfd2765e95a11acd4e62a11c528e104392bbbd8d0
+DIST freebsd-src-10.3.tar.xz 126900216 SHA256 f50763dcac88e9b7ec616b77d537bf338f470350e2c85e0cc7decfcc8372b54d SHA512 a0c95fc4bbc5ad7599d0a83651a497e85cd85a5c433e5e175c57480b466c9eb5aa0390804d6336da8301c75ad499484399d39b8f7efbcfda8cafb09b1aa12d8f WHIRLPOOL bf5320bc506fb73a63d0fb324b60667a196ca2fef5d0215637a657c613f2052d76d002deb205e258f6d4e2aaea15490b26679e59a102606a34b58ab1f6b755ad
+DIST freebsd-src-11.0.tar.xz 140252356 SHA256 0725a7f1d3e8985f4b2e31a2ad714334463a5016b203073a8fc196649f3d5a27 SHA512 ee1271bb38ee46fbab3d49b33f5b5afd76f9402b2e792581d63f02272df8e2a4011fac97ad550434f0c2fc5fe241940276629bde55e75f8638896a81339870cd WHIRLPOOL e1cda77189990c1d2187ab2d9e842ff3c619d8235f1ade56819fadc52f680a871de17cf05f8119614557c615ad19d41d1b6080c4b3768e7252889546b865d827
+DIST freebsd-src-11.1.tar.xz 147661560 SHA256 7e1186c2b3f6d070995b88bef5aded34089fed227c7b584c30b28cecaf428154 SHA512 b97707ec7a601ca6bcb682c45f6d94a38484301ac24630d7285eff6f88b027ce6900c93fc62f8ce36e0cf32c91f73a9d1c999db397b7f8782fd74a8551a03aca WHIRLPOOL 3f88b15153c25c7878d1a730213e5bc8c200c05427895ae97280c4412680bb8e67cf4f8170f9e2b0f21d63ec42365f44f7d5eafe614e9b8726f4bc3cc3825202
+EBUILD freebsd-pam-modules-10.3.ebuild 1099 SHA256 774ce105193dd2d0abdb4b3618e7e9f2956730f12174bea3cc26752303c1d3cd SHA512 d5214489e78d9c73d8f9700c34707f1e1509d45b89604f02ff12dbddc522e0feb1425cb96e7aca5dbc17bfb3dc3b2e5c8dabc000d2771bb719f6f0d3e0fd5a4b WHIRLPOOL 9bf7b6e5f7a7c20b63de3b7b6bb633e1c980fc16be850e8c0543a6da779e95c1bff8d1d60a7748122acdbc66d57787e3a2080f4483ce8348367e35382a767b7a
+EBUILD freebsd-pam-modules-11.0.ebuild 1035 SHA256 e01905d67b9f6dab6b79cbbcbbaaf67ff2c2409d39c728c24913527d8083d031 SHA512 ff5551e2bf795c77b143e389ea750e8641d314b147a070fa5ffe386bb3205da7c295963a3823c53be9afc66b0b0eeb663d17f401bf0a303ff9534ad2bf166b66 WHIRLPOOL e6d88812430732b747ed499793b103d2c11688f72ffdc3a3193c0dc931b44b40df57a904218757d8e2d3c811b24ad89f928d2cb04a7612efc89b4da4898648de
+EBUILD freebsd-pam-modules-11.1.ebuild 1035 SHA256 09065a890abb2f619204fe04fca4f3d19e237ca24b87f1771c265c7b6797f265 SHA512 150ba570785b63e2fea121de424a7a8a5c0e6a74c4d498f743d4b7377d55f3eef7db10cfb5b0ded06f39913d32eb68565f17043863d16097ec9ce9f4cc5a04e2 WHIRLPOOL 36927d3345f7c592a09bed185626b3ba7926fa02138afd7d80bc70a76871e7f662d0316899aa0d5ac353b57f661826d547ad41d725196bffe482bfd82841537f
+EBUILD freebsd-pam-modules-8.2.ebuild 1123 SHA256 44374b45def40da679a7b7c9b3617f730fbc8e183cf199e2e1250dfa55328f40 SHA512 134d96116953ec37a82d8ca96673c9a83191c8cb6d5564800292f311fdd3d2f7c5b827bb7727855e6cad764850573345d88764a0b985704c2987cb58caa680f1 WHIRLPOOL b3d6b57984576295ef2616780405f54f5f88fb9f0dae382584737d940266ac2cbc9de7408ac7a15f15ef92f1f3c28326e1ad1c9ecd5c0f70e0014d5a523b1a94
+EBUILD freebsd-pam-modules-9.1-r1.ebuild 1072 SHA256 b8348015a5306b80d7eed2e602575e39c4f0a4bd13739016768bed8e8c369668 SHA512 d5a4f80a980481f368e99c319b81a548fbfa20ea72b3044755a1065b09dbf63519f412328e4eaac8752de593a9e01b07eca0f0187e98e588cf5f38c04d528273 WHIRLPOOL 2ed440852bdf1f9b3fc042e30b5954bb8ccae911588f8ffd60eb562fbfc9b1d570fbeb882c09a91296fbfe7399c27bade865911acc4650459c220ca920d50134
+MISC ChangeLog 3542 SHA256 a32b7ad541a4539a999f1e2413140853a916b13c6ea8b7b2beeb4e6168bb87d0 SHA512 d59e812cfbe1e7ac7ac6c403be2dabef497ff55f801baf52c4bdf56fb4276fdc47898d786edcedb7b1d3e9ada8a4662eefd32ca5784ad54f565f9f9f5370bca9 WHIRLPOOL f63a4154f3d524ebb326d16f47fba71162e2c0e776c85cc31b0225887fd8cd3b6f621011f0586f0aceea5e0e9d73737d78092b17e3e998cbedc06f61643c47e4
+MISC ChangeLog-2015 9856 SHA256 10c43b28a821f301baf48c0ae326028831677fcfe315962efc72e304878b08ba SHA512 6f3d46f102b01a0d1ea46f8bdf1362e92948852dd78eaf59ed908daf0589d7dd5f5238ea8621cd3cac4a91ed6b5dab6064d333bd8d51aad674214298bb922b97 WHIRLPOOL 6604c921081140080910d1837cde8dbd6155fbc3ad94ec4ac9961a65c85f8faaa199721da2e9667bbe93783ec42a42d7a682c3ef6745c0b65cbffe82f2f1dad4
+MISC metadata.xml 238 SHA256 501d93b0c41ed422505100f002758cd173cd9783ae7fbb53e2ec5f238c868340 SHA512 173efaa53a514acf1e2f0c6681c82a48ec16d505844f551d2cc823ee8685b27837c7461f7956c12182059ee7e83023e2f0bcd5d1afab74beeaf998487193656d WHIRLPOOL 4ca51d994f011a5e7e4939f02a54b5c2f9f3e526665893c9ac2876c9871b7dc80361393d41c5247b3a5520e82d31d0dd10da520e7715c94b806a94ce0fed2a5a
diff --git a/sys-freebsd/freebsd-pam-modules/files/README.pamd b/sys-freebsd/freebsd-pam-modules/files/README.pamd
new file mode 100644
index 000000000000..51d703973be9
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/files/README.pamd
@@ -0,0 +1,61 @@
+/etc/pam.d
+
+This directory contains configuration files for the Pluggable
+Authentication Modules (PAM) library.
+
+Each file details the module chain for a single service, and must be
+named after that service. If no configuration file is found for a
+particular service, the /etc/pam.d/other is used instead. If that
+file does not exist, /etc/pam.conf is searched for entries matching
+the specified service or, failing that, the "other" service.
+
+See the pam(8) manual page for an explanation of the workings of the
+PAM library and descriptions of the various files and modules. Below
+is a summary of the format for the pam.conf and /etc/pam.d/* files.
+
+Configuration lines take the following form:
+
+module-type control-flag module-path arguments
+
+Comments are introduced with a hash mark ('#'). Blank lines and lines
+consisting entirely of comments are ignored.
+
+The meanings of the different fields are as follows:
+
+ module-type:
+ auth: prompt for a password to authenticate that the user is
+ who they say they are, and set any credentials.
+ account: non-authentication based authorization, based on time,
+ resources, etc.
+ session: housekeeping before and/or after login.
+ password: update authentication tokens.
+
+ control-flag: How libpam handles success or failure of the module.
+ required: success is required; on failure all remaining
+ modules are run, but the request will be denied.
+ requisite: success is required, and on failure no remaining
+ modules are run.
+ sufficient: success is sufficient, and if no previous required
+ module failed, no remaining modules are run.
+ binding: success is sufficient; on failure all remaining
+ modules are run, but the request will be denied.
+ optional: ignored unless the other modules return PAM_IGNORE.
+
+ arguments: Module-specific options, plus some generic ones:
+ debug: syslog debug info.
+ no_warn: return no warning messages to the application.
+ Remove this to feed back to the user the
+ reason(s) they are being rejected.
+ use_first_pass: try authentication using password from the
+ preceding auth module.
+ try_first_pass: first try authentication using password from
+ the preceding auth module, and if that fails
+ prompt for a new password.
+ use_mapped_pass: convert cleartext password to a crypto key.
+ expose_account: allow printing more info about the user when
+ prompting.
+
+Note that having a "sufficient" module as the last entry for a
+particular service and module type may result in surprising behaviour.
+To get the intended semantics, add a "required" entry listing the
+pam_deny module at the end of the chain.
diff --git a/sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-6.0-gentoo.patch b/sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-6.0-gentoo.patch
new file mode 100644
index 000000000000..ce1a7fbff8c6
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-6.0-gentoo.patch
@@ -0,0 +1,24 @@
+Index: fbsd-6.0/lib/libpam/modules/Makefile.inc
+===================================================================
+--- fbsd-6.0.orig/lib/libpam/modules/Makefile.inc
++++ fbsd-6.0/lib/libpam/modules/Makefile.inc
+@@ -5,18 +5,10 @@ PAMDIR= ${.CURDIR}/../../../../contrib/
+ NO_INSTALLLIB=
+ NO_PROFILE=
+
+-CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
++CFLAGS+= -I${.CURDIR}/../../libpam
+ WARNS?= 4
+
+-# This is nasty.
+-# For the static case, libpam.a depends on the modules.
+-# For the dynamic case, the modules depend on libpam.so.N
+-.if defined(_NO_LIBPAM_SO_YET)
+-NO_PIC=
+-.else
+ SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR}
+-DPADD+= ${LIBPAM}
+ LDADD+= -lpam
+-.endif
+
+ .include "../Makefile.inc"
diff --git a/sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-9.0-gentoo.patch b/sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-9.0-gentoo.patch
new file mode 100644
index 000000000000..aa08d40693cd
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-9.0-gentoo.patch
@@ -0,0 +1,22 @@
+--- lib/libpam/modules/Makefile.inc.old 2011-11-02 20:46:56.000000000 +0000
++++ lib/libpam/modules/Makefile.inc 2011-11-02 20:47:16.000000000 +0000
+@@ -5,18 +5,10 @@
+ NO_INSTALLLIB=
+ NO_PROFILE=
+
+-CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
++CFLAGS+= -I${.CURDIR}/../../libpam
+
+-# This is nasty.
+-# For the static case, libpam.a depends on the modules.
+-# For the dynamic case, the modules depend on libpam.so.N
+-.if defined(_NO_LIBPAM_SO_YET)
+-NO_PIC=
+-.else
+ SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR}
+-DPADD+= ${LIBPAM}
+ LDADD+= -lpam
+-.endif
+
+ .c.o:
+ ${CC} ${CFLAGS} -DOPENPAM_STATIC_MODULES -c ${.IMPSRC}
diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-10.3.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-10.3.ebuild
new file mode 100644
index 000000000000..3289409bc5c6
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-10.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit bsdmk freebsd multilib pam
+
+DESCRIPTION="FreeBSD's PAM authentication modules"
+SLOT="0"
+
+IUSE="kerberos nis"
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+EXTRACTONLY="lib/"
+
+RDEPEND=">=sys-auth/openpam-20050201-r1
+ kerberos? ( dev-libs/openssl:0=
+ virtual/krb5 )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S=${WORKDIR}/lib/libpam/modules
+
+PATCHES=( "${FILESDIR}"/${PN}-9.0-gentoo.patch )
+
+pkg_setup() {
+ # Avoid installing pam_ssh as that has its own ebuild.
+ mymakeopts="${mymakeopts} WITHOUT_OPENSSH= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+}
+
+src_prepare() {
+ for module in pam_deny pam_passwdqc pam_permit pam_krb5; do
+ sed -i -e "s:${module}::" "${S}"/modules.inc || die
+ done
+}
+
+src_install() {
+ mkinstall "LIBDIR=/$(get_libdir)/security" || die "install failed"
+
+ dodoc "${FILESDIR}/README.pamd"
+}
diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild
new file mode 100644
index 000000000000..3d4ceae6b8db
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit bsdmk freebsd multilib pam
+
+DESCRIPTION="FreeBSD's PAM authentication modules"
+SLOT="0"
+
+IUSE="kerberos nis"
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+EXTRACTONLY="lib/"
+
+RDEPEND=">=sys-auth/openpam-20050201-r1
+ kerberos? ( dev-libs/openssl:0=
+ virtual/krb5 )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S=${WORKDIR}/lib/libpam/modules
+
+pkg_setup() {
+ # Avoid installing pam_ssh as that has its own ebuild.
+ mymakeopts="${mymakeopts} WITHOUT_OPENSSH= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+}
+
+src_prepare() {
+ for module in pam_deny pam_passwdqc pam_permit pam_krb5; do
+ sed -i -e "s:${module}::" "${S}"/modules.inc || die
+ done
+}
+
+src_install() {
+ freebsd_src_install "LIBDIR=/$(get_libdir)/security"
+
+ dodoc "${FILESDIR}/README.pamd"
+}
diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.1.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.1.ebuild
new file mode 100644
index 000000000000..4c29c927a781
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit bsdmk freebsd multilib pam
+
+DESCRIPTION="FreeBSD's PAM authentication modules"
+SLOT="0"
+
+IUSE="kerberos nis"
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+EXTRACTONLY="lib/"
+
+RDEPEND=">=sys-auth/openpam-20050201-r1
+ kerberos? ( dev-libs/openssl:0=
+ virtual/krb5 )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S=${WORKDIR}/lib/libpam/modules
+
+pkg_setup() {
+ # Avoid installing pam_ssh as that has its own ebuild.
+ mymakeopts="${mymakeopts} WITHOUT_OPENSSH= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+}
+
+src_prepare() {
+ for module in pam_deny pam_passwdqc pam_permit pam_krb5; do
+ sed -i -e "s:${module}::" "${S}"/modules.inc || die
+ done
+}
+
+src_install() {
+ freebsd_src_install "LIBDIR=/$(get_libdir)/security"
+
+ dodoc "${FILESDIR}/README.pamd"
+}
diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-8.2.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-8.2.ebuild
new file mode 100644
index 000000000000..a04f7b0eb72d
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-8.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit bsdmk freebsd multilib pam
+
+DESCRIPTION="FreeBSD's PAM authentication modules"
+SLOT="0"
+KEYWORDS="~x86-fbsd ~sparc-fbsd"
+
+IUSE="kerberos nis"
+
+SRC_URI="mirror://gentoo/${LIB}.tar.bz2"
+
+RDEPEND=">=sys-auth/openpam-20050201-r1
+ kerberos? ( dev-libs/openssl
+ virtual/krb5 )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S=${WORKDIR}/lib/libpam/modules
+
+pkg_setup() {
+ # Avoid installing pam_ssh as that has its own ebuild.
+ mymakeopts="${mymakeopts} NO_OPENSSH= "
+ use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${WORKDIR}"/lib
+
+ for module in pam_deny pam_passwdqc pam_permit; do
+ sed -i -e "s:${module}::" "${S}"/modules.inc
+ done
+
+ # Avoid using static versions; use gentoo /lib/security dir
+ epatch "${FILESDIR}"/${PN}-6.0-gentoo.patch
+}
+
+src_install() {
+ mkinstall "LIBDIR=/$(get_libdir)/security" || die "install failed"
+
+ dodoc "${FILESDIR}/README.pamd"
+}
diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1-r1.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1-r1.ebuild
new file mode 100644
index 000000000000..0d4662e54e14
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit bsdmk freebsd multilib pam
+
+DESCRIPTION="FreeBSD's PAM authentication modules"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+IUSE="kerberos nis"
+
+SRC_URI="mirror://gentoo/${LIB}.tar.bz2"
+
+RDEPEND=">=sys-auth/openpam-20050201-r1
+ kerberos? ( dev-libs/openssl
+ virtual/krb5 )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S=${WORKDIR}/lib/libpam/modules
+
+PATCHES=( "${FILESDIR}"/${PN}-9.0-gentoo.patch )
+
+pkg_setup() {
+ # Avoid installing pam_ssh as that has its own ebuild.
+ mymakeopts="${mymakeopts} NO_OPENSSH= "
+ use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+}
+
+src_unpack() {
+ freebsd_src_unpack
+
+ for module in pam_deny pam_passwdqc pam_permit pam_krb5; do
+ sed -i -e "s:${module}::" "${S}"/modules.inc
+ done
+}
+
+src_install() {
+ mkinstall "LIBDIR=/$(get_libdir)/security" || die "install failed"
+
+ dodoc "${FILESDIR}/README.pamd"
+}
diff --git a/sys-freebsd/freebsd-pam-modules/metadata.xml b/sys-freebsd/freebsd-pam-modules/metadata.xml
new file mode 100644
index 000000000000..a00f3aeb1f81
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>bsd@gentoo.org</email>
+ <name>BSD Project</name>
+</maintainer>
+</pkgmetadata>