Subject: pkg/33732: Add krb5 auth to freeradius package
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Kevin Sullivan <ksulliva@psc.edu>
List: pkgsrc-bugs
Date: 06/14/2006 18:15:01
>Number:         33732
>Category:       pkg
>Synopsis:       Add krb5 auth to freeradius package
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 14 18:15:00 +0000 2006
>Originator:     Kevin Sullivan
>Release:        NetBSD 3.0
>Organization:
Kevin Sullivan
Pittsburgh Supercomputing Center
>Environment:
	
	
System: NetBSD sludge.psc.edu 3.0 NetBSD 3.0 (PSCNETBSDXEN0) #0: Fri Feb 3 10:39:46 EST 2006 ksulliva@sludge.psc.edu:/home/ksulliva/kern/PSCNETBSDXEN0 i386
Architecture: i386
Machine: i386
>Description:
The freeradius package in pkgsrc unconditionally disables krb5.  This patch
will enable it.  I've tested it on a (mostly stock) i386 3.0 system using
the heimdal libraries that ship with the system.  It should also work with
MIT kerberos but I haven't tested this.
>How-To-Repeat:
Install freeradius.  Try to use krb5.
>Fix:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/freeradius/Makefile,v
retrieving revision 1.48
diff -u -r1.48 Makefile
--- Makefile	10 Apr 2006 15:25:04 -0000	1.48
+++ Makefile	14 Jun 2006 18:00:04 -0000
@@ -33,7 +33,6 @@
 CONFIGURE_ARGS+=	--with-ltdl-include=${PREFIX}/include
 CONFIGURE_ARGS+=        --without-rlm_ippool
 CONFIGURE_ARGS+=        --without-rlm_smb
-CONFIGURE_ARGS+=	--without-rlm_krb5
 CONFIGURE_ARGS+=	--without-rlm_pam
 CONFIGURE_ARGS+=	--without-rlm_sql_iodbc
 CONFIGURE_ARGS+=	--without-rlm_sql_oracle
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/net/freeradius/options.mk,v
retrieving revision 1.8
diff -u -r1.8 options.mk
--- options.mk	31 May 2006 18:22:24 -0000	1.8
+++ options.mk	14 Jun 2006 18:00:04 -0000
@@ -5,7 +5,7 @@
 PKG_OPTIONS_OPTIONAL_GROUPS=	dbm
 PKG_OPTIONS_GROUP.dbm=	bdb gdbm
 
-PKG_SUPPORTED_OPTIONS=	ldap mysql pgsql snmp
+PKG_SUPPORTED_OPTIONS=	ldap mysql pgsql snmp kerberos
 PKG_SUGGESTED_OPTIONS=	gdbm
 
 .include "../../mk/bsd.options.mk"
@@ -74,3 +74,18 @@
 .else
 CONFIGURE_ARGS+=	--without-snmp
 .endif
+
+###
+### Use kerberos 5
+###
+.if !empty(PKG_OPTIONS:Mkerberos)
+.  include "../../mk/krb5.buildlink3.mk"
+CONFIGURE_ARGS+=        --with-rlm_krb5
+.  if defined(KRB5_TYPE) && ${KRB5_TYPE} == "heimdal"
+CONFIGURE_ARGS+=	--enable-heimdal-krb5
+.  endif
+PLIST_SRC+=             ${PKGDIR}/PLIST.kerberos
+.else
+CONFIGURE_ARGS+=        --without-rlm_krb5
+.endif
+
Index: PLIST.kerberos
===================================================================
diff -urN PLIST.kerberos PLIST.kerberos
--- PLIST.kerberos   1969-12-31 19:00:00.000000000 -0500
+++ PLIST.kerberos       2006-06-13 08:11:31.000000000 -0400
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+lib/rlm_krb5-${PKGVERSION}.la
+lib/rlm_krb5.la

>Unformatted: