From john@rwsrv05.mby.riverwillow.net.au  Mon Sep 21 21:43:30 2009
Return-Path: <john@rwsrv05.mby.riverwillow.net.au>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 858041065672
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Sep 2009 21:43:30 +0000 (UTC)
	(envelope-from john@rwsrv05.mby.riverwillow.net.au)
Received: from nskntmtas05p.mx.bigpond.com (nskntmtas05p.mx.bigpond.com [61.9.168.149])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F4AD8FC13
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Sep 2009 21:43:29 +0000 (UTC)
Received: from nskntotgx01p.mx.bigpond.com ([58.172.203.5])
          by nskntmtas05p.mx.bigpond.com with ESMTP
          id <20090921214328.JZZM1919.nskntmtas05p.mx.bigpond.com@nskntotgx01p.mx.bigpond.com>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Mon, 21 Sep 2009 21:43:28 +0000
Received: from mail3.riverwillow.net.au ([58.172.203.5])
          by nskntotgx01p.mx.bigpond.com with ESMTP
          id <20090921214327.GEVE22446.nskntotgx01p.mx.bigpond.com@mail3.riverwillow.net.au>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Mon, 21 Sep 2009 21:43:27 +0000
Received: from rwsrv05.mby.riverwillow.net.au (localhost [127.0.0.1])
	by mail3.riverwillow.net.au (8.14.3/8.14.3) with ESMTP id n8LLhNpL053413
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 22 Sep 2009 07:43:23 +1000 (AEST)
Received: (from john@localhost)
	by rwsrv05.mby.riverwillow.net.au (8.14.3/8.14.3/Submit) id n8LLhNJx053412;
	Tue, 22 Sep 2009 07:43:23 +1000 (AEST)
Message-Id: <200909212143.n8LLhNJx053412@rwsrv05.mby.riverwillow.net.au>
Date: Tue, 22 Sep 2009 07:43:23 +1000 (AEST)
From: John Marshall <john@rwsrv05.mby.riverwillow.net.au>
Reply-To: John Marshall <john@rwsrv05.mby.riverwillow.net.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] 8.0-RC1 /usr/bin/krb5-config does not include necessary gssapi libraries
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         139037
>Category:       bin
>Synopsis:       [patch] 8.0-RC1 krb5-config(8) does not include necessary gssapi libraries
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bland
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 21 21:50:01 UTC 2009
>Closed-Date:    Tue Oct 20 01:29:54 UTC 2009
>Last-Modified:  Tue Oct 20 01:29:54 UTC 2009
>Originator:     John Marshall
>Release:        FreeBSD 8.0-RC1 i386
>Organization:
Riverwillow Pty Ltd
>Environment:
System: FreeBSD rwsrv05.mby.riverwillow.net.au 8.0-RC1 FreeBSD 8.0-RC1 #0: Fri Sep 18 13:35:00 AEST 2009 root@rwsrv05.mby.riverwillow.net.au:/spare/obj/usr/src/sys/RWSRV05 i386


	
>Description:

/usr/bin/krb5-config is a shell script called by application build
routines to discover the list of libraries required to implement
functionality which depends upon the base system kerberos
implementation.

The base system Heimdal build splits the gssapi functionality into
different libraries (e.g. libgssapi, libgssapi_krb5, libgssapi_spnego)
but only lists the first of those via the krb5-config script.
Applications using krb5-config at build time to determine the list of
libraries they need for gssapi functionality will likely fail at runtime
due to missing libraries.  An example is the cyrus-sasl2 port.  This
patch rectifies that problem by adding the missing libraries to the
generated list.

This problem was discussed on freebsd-current@

This patch solves the problem but I'm not sure whether it is the proper
solution or only treating the symptoms of something deeper.  If a better
solution is not immediately apparent, I believe we should commit this
patch prior to release rather than releasing a broken system.

>How-To-Repeat:

See discussion and test results in freebsd-current@
http://lists.freebsd.org/pipermail/freebsd-current/2009-September/011711.html
http://lists.freebsd.org/pipermail/freebsd-current/2009-September/011751.html
http://lists.freebsd.org/pipermail/freebsd-current/2009-September/011767.html


>Fix:

	

--- krb5-config_Makefile.diff begins here ---
--- src/kerberos5/usr.bin/krb5-config/Makefile.orig	2009-08-03 18:13:06.000000000 +1000
+++ src/kerberos5/usr.bin/krb5-config/Makefile	2009-09-21 14:01:50.000000000 +1000
@@ -13,6 +13,7 @@
 	    -e "s,@libdir\@,${LIBDIR},g" \
 	    -e "s,@includedir\@,${INCLUDEDIR},g" \
 	    -e "s,@LIB_crypt\@,-lcrypt,g" \
+	    -e "s,-lgssapi,-lgssapi -lgssapi_krb5 -lgssapi_spnego," \
 	    -e "s,@LIB_dbopen\@,,g" \
 	    -e "s,@LIB_hcrypto_appl\@,-lcrypto,g" \
 	    -e "s,@LIB_pkinit\@,-lhx509,g" \
--- krb5-config_Makefile.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Wed Oct 14 21:31:51 UTC 2009 
State-Changed-Why:  
This is fixed in HEAD I believe, and bland@ will MFC it to 8.x for 8.0 AFAIK. 


Responsible-Changed-From-To: freebsd-bugs->bland 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Wed Oct 14 21:31:51 UTC 2009 
Responsible-Changed-Why:  
This is fixed in HEAD I believe, and bland@ will MFC it to 8.x for 8.0 AFAIK. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139037 
State-Changed-From-To: patched->closed 
State-Changed-By: bland 
State-Changed-When: Tue Oct 20 01:29:14 UTC 2009 
State-Changed-Why:  
Fix MFCed to stable/8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139037 
>Unformatted:
