From mel@datakitty.lan.rachie.is-a-geek.net  Wed Dec 21 00:43:53 2011
Return-Path: <mel@datakitty.lan.rachie.is-a-geek.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 68BA9106566B;
	Wed, 21 Dec 2011 00:43:53 +0000 (UTC)
	(envelope-from mel@datakitty.lan.rachie.is-a-geek.net)
Received: from datakitty.lan.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27])
	by mx1.freebsd.org (Postfix) with ESMTP id DEA6B8FC13;
	Wed, 21 Dec 2011 00:43:52 +0000 (UTC)
Received: from datakitty.lan.rachie.is-a-geek.net (localhost [127.0.0.1])
	by datakitty.lan.rachie.is-a-geek.net (8.14.5/8.14.5) with ESMTP id pBL0TTBc099926;
	Tue, 20 Dec 2011 15:29:29 -0900 (AKST)
	(envelope-from mel@datakitty.lan.rachie.is-a-geek.net)
Received: (from mel@localhost)
	by datakitty.lan.rachie.is-a-geek.net (8.14.5/8.14.5/Submit) id pBL0TTZL099925;
	Tue, 20 Dec 2011 15:29:29 -0900 (AKST)
	(envelope-from mel)
Message-Id: <201112210029.pBL0TTZL099925@datakitty.lan.rachie.is-a-geek.net>
Date: Tue, 20 Dec 2011 15:29:29 -0900 (AKST)
From: Mel.Flynn@datakitty.lan.rachie.is-a-geek.net
Reply-To: rflynn@acsalaska.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: MAINTAINER <marcus@freebsd.org>
Subject: [patch] security/pam_ldap: Install schema files.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         163492
>Category:       ports
>Synopsis:       [patch] security/pam_ldap: Install schema files.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    marcus
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 21 00:50:09 UTC 2011
>Closed-Date:    Tue Dec 27 00:27:45 UTC 2011
>Last-Modified:  Tue Dec 27 00:30:11 UTC 2011
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->marcus 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Dec 21 00:50:19 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163492 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Tue Dec 27 00:27:34 UTC 2011 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163492 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/163492: commit references a PR
Date: Tue, 27 Dec 2011 00:27:38 +0000 (UTC)

 marcus      2011-12-27 00:27:29 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/pam_ldap    Makefile 
   Log:
   Install schema files with pam_ldap.
   
   PR:             163492
   Submitted by:   Mel.Flynn@datakitty.lan.rachie.is-a-geek.net
   
   Revision  Changes    Path
   1.48      +8 -2      ports/security/pam_ldap/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
