From f8fe0e9db7a23a8488637dc583e31e3347fca287 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 13 Apr 2017 10:07:32 +0200 Subject: gnu: Add nss-pam-ldapd. * gnu/packages/openldap.scm (nss-pam-ldapd): New variable. --- gnu/packages/openldap.scm | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'gnu/packages/openldap.scm') diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index 627319bda8..b67510647d 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2017 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,8 +27,10 @@ #:use-module (gnu packages gnupg) #:use-module (gnu packages groff) #:use-module (gnu packages icu4c) + #:use-module (gnu packages linux) + #:use-module (gnu packages python) #:use-module (gnu packages tls) - #:use-module ((guix licenses) #:select (openldap2.8)) + #:use-module ((guix licenses) #:select (openldap2.8 lgpl2.1+)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) @@ -74,3 +77,35 @@ "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.") (license openldap2.8) (home-page "http://www.openldap.org/"))) + +(define-public nss-pam-ldapd + (package + (name "nss-pam-ldapd") + (version "0.9.7") + (source (origin + (method url-fetch) + (uri (string-append "https://arthurdejong.org/nss-pam-ldapd/" + "nss-pam-ldapd-" version ".tar.gz")) + (sha256 + (base32 + "1sw36w6zkzvabvjckqick032j5p5xi0qi3sgnh0znzxz31jqvf0d")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "--with-pam-seclib-dir=" + (assoc-ref %outputs "out") "/lib/security/") + (string-append "--with-ldap-conf-file=" + (assoc-ref %outputs "out") "/etc/nslcd.conf")))) + (inputs + `(("linux-pam" ,linux-pam) + ("openldap" ,openldap) + ("python" ,python-2))) + (home-page "https://arthurdejong.org/nss-pam-ldapd") + (synopsis "NSS and PAM modules for LDAP") + (description "nss-pam-ldapd provides a @dfn{Name Service Switch} (NSS) +module that allows your LDAP server to provide user account, group, host name, +alias, netgroup, and basically any other information that you would normally +get from @file{/etc} flat files or NIS. It also provides a @dfn{Pluggable +Authentication Module} (PAM) to do identity and authentication management with +an LDAP server.") + (license lgpl2.1+))) -- cgit v1.2.3 From 289a89801afaeee0522777078258ce103d0452e8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 25 Apr 2017 14:23:23 +0200 Subject: gnu: nss-pam-ldapd: Look for nslcd.conf in global /etc/ directory. * gnu/packages/openldap.scm (nss-pam-ldapd)[arguments]: Set "--with-ldap-conf-file" to look for global configuration file; add build phase to install example configuration file in the package output directory. --- gnu/packages/openldap.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'gnu/packages/openldap.scm') diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index b67510647d..61f7a9469f 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -94,8 +94,23 @@ `(#:configure-flags (list (string-append "--with-pam-seclib-dir=" (assoc-ref %outputs "out") "/lib/security/") - (string-append "--with-ldap-conf-file=" - (assoc-ref %outputs "out") "/etc/nslcd.conf")))) + ;; nslcd cannot be convinced to look at run-time for its + ;; configuration file at a location that differs from the + ;; configured location. + "--with-ldap-conf-file=/etc/nslcd.conf") + #:phases + (modify-phases %standard-phases + ;; This is necessary because we tell nslcd with configure flags that + ;; it should look for its configuration file at /etc/nslcd.conf. The + ;; build system tries to install a default configuration to that very + ;; location. + (add-after 'unpack 'override-nslcd.conf-install-path + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "Makefile.in" + (("\\$\\(DESTDIR\\)\\$\\(NSLCD_CONF_PATH\\)") + (string-append (assoc-ref outputs "out") + "/etc/nslcd.conf.example"))) + #t))))) (inputs `(("linux-pam" ,linux-pam) ("openldap" ,openldap) -- cgit v1.2.3 From fadae857b7fa07a657888b5fa9bdd2f8d024fccc Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 25 Apr 2017 16:27:41 +0200 Subject: gnu: nss-pam-ldapd: Add Kerberos support. * gnu/packages/openldap.scm (nss-pam-ldapd)[inputs]: Add mit-krb5. --- gnu/packages/openldap.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gnu/packages/openldap.scm') diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index 61f7a9469f..987719492f 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages gnupg) #:use-module (gnu packages groff) #:use-module (gnu packages icu4c) + #:use-module (gnu packages kerberos) #:use-module (gnu packages linux) #:use-module (gnu packages python) #:use-module (gnu packages tls) @@ -114,6 +115,7 @@ (inputs `(("linux-pam" ,linux-pam) ("openldap" ,openldap) + ("mit-krb5" ,mit-krb5) ("python" ,python-2))) (home-page "https://arthurdejong.org/nss-pam-ldapd") (synopsis "NSS and PAM modules for LDAP") -- cgit v1.2.3