Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Dec 2011 15:29:29 -0900 (AKST)
From:      Mel.Flynn@rachie.is-a-geek.net
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        MAINTAINER <marcus@FreeBSD.org>
Subject:   ports/163492: [patch] security/pam_ldap: Install schema files.
Message-ID:  <201112210029.pBL0TTZL099925@datakitty.lan.rachie.is-a-geek.net>
Resent-Message-ID: <201112210050.pBL0o9uf057959@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         163492
>Category:       ports
>Synopsis:       [patch] security/pam_ldap: Install schema files.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 21 00:50:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Mel Flynn
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD datakitty.lan.rachie.is-a-geek.net 8.2-STABLE FreeBSD 8.2-STABLE #5: Fri Nov 11 11:35:54 AKST 2011 mel@datakitty.lan.rachie.is-a-geek.net:/data/obj/data/RELENG_8/src/sys/GENERIC amd64


	
>Description:
While trying to implement service authorization I spent a few brain
cycles and google searches for the schema for it, only to find that they
come with the pam_ldap module.

>How-To-Repeat:
make -C ${PORTSDIR:-"/usr/ports"}/security/pam_ldap clean install

ldapns.schema is nowhere to be found.
>Fix:

--- pam_ldap.patch begins here ---
# Add schemas to pam_ldap data directory
--- Makefile.orig	2011-02-24 16:32:06.000000000 -0900
+++ Makefile	2011-12-20 13:24:46.000000000 -0900
@@ -7,7 +7,7 @@
 
 PORTNAME=	pam_ldap
 PORTVERSION=	1.8.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security net
 MASTER_SITES=	http://www.padl.com/download/ \
 		ftp://ftp.padl.com/pub/
@@ -28,6 +28,7 @@
 		--with-ldap-secret-file=${PREFIX}/etc/ldap.secret
 
 PKGMESSAGE=	${WRKDIR}/pkg-message
+PORTDATA=	*.schema
 
 MAN5=		pam_ldap.5
 
@@ -35,8 +36,15 @@
 	@${REINPLACE_CMD} -e 's|/usr/bin/perl|${LOCALBASE}/bin/perl|' \
 	    	${WRKSRC}/vers_string
 
+pre-install:
+	@if [ ! -d ${DATADIR} ]; then \
+		${MKDIR} ${DATADIR}; \
+		fi
+
 post-install:
-	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' < ${PKGDIR}/pkg-message \
+	@${INSTALL_DATA} ${WRKSRC}/*.schema ${DATADIR}
+	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+		-e 's|%%DATADIR%%|${DATADIR}|' < ${PKGDIR}/pkg-message \
 		| /usr/bin/fmt 75 79 > ${PKGMESSAGE}
 	@${CAT} ${PKGMESSAGE}
 
--- pkg-message.orig	2005-08-27 11:20:04.000000000 -0800
+++ pkg-message	2011-12-20 13:21:00.000000000 -0900
@@ -5,4 +5,9 @@
 on 5.X and higher with a line similar to the following:
 
 login	auth	sufficient	%%PREFIX%%/lib/pam_ldap.so
+
+--------------------------------------------------------------------------------
+
+To use additional attributes supported by this module, you may need to add
+one or more schema files installed in %%DATADIR%% to your slapd.conf
 ================================================================================
--- pam_ldap.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112210029.pBL0TTZL099925>