Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165638 - sys-auth/nss_ldap-254 fails build with kerberos USE flag and app-crypt/heimdal-0.7.2-r3 due to undeclared GSS_S_COMPLETE
Summary: sys-auth/nss_ldap-254 fails build with kerberos USE flag and app-crypt/heimda...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo LDAP project
URL: http://bugzilla.padl.com/show_bug.cgi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-06 15:46 UTC by Martin von Gagern
Modified: 2007-11-08 03:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nss_ldap-254-gssapi-headers.patch (nss_ldap-254-gssapi-headers.patch,2.22 KB, patch)
2007-02-07 10:32 UTC, Martin von Gagern
Details | Diff
nss_ldap-257.2-gssapi-headers.patch (nss_ldap-257.2-gssapi-headers.patch,2.29 KB, patch)
2007-10-24 12:38 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2007-02-06 15:46:28 UTC
gcc -DHAVE_CONFIG_H   -DLDAP_REFERRALS -DLDAP_DEPRECATED -D_REENTRANT  -march=prescott -O2 -Wall -fPIC -c ldap-nss.c
ldap-nss.c: In function 'do_bind':
ldap-nss.c:1890: warning: implicit declaration of function 'gss_krb5_ccache_name'
ldap-nss.c:1891: error: 'GSS_S_COMPLETE' undeclared (first use in this function)
ldap-nss.c:1891: error: (Each undeclared identifier is reported only once
ldap-nss.c:1891: error: for each function it appears in.)
make: *** [ldap-nss.o] Error 1

This macro is defined in the include file gssapi/gssapi.h provided by heimdal.
(Note: it is really heimdal/gssapi.h, but gssapi is a symlink to heimdal.)
However the include section in ldap-nss.c looks like this:

#ifdef HAVE_GSSAPI_H
#include <gssapi.h>
#elif defined(HAVE_GSSAPI_GSSAPI_KRB5_H)
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_krb5.h>
#endif

As you can see, the first include fails because we have our include file in a sub directory, and the second one fails because this form is only used if there is a gssapi_krb5.h as well, and at least my heimdal did not provide such a one.

Possible solutions:
1. have heimdal provide a gssapi_krb5.h as well
2. symlink gssapi.h to main include dir
3. patch nss_ldap to look for alternative header file instead
4. patch nss_ldap to look for alternative header file as well
I don't know enough about gssapi and its headers to decide which of these solutions would be best suited.

bug 119281 discusses similar issues for uw-imap and pine. There it seems to be an enhancement request to newly add heimdal compatibility.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-02-07 06:06:19 UTC
provide a patch against nss_ldap to make it look elsewhere for headers please.
Comment 2 Martin von Gagern 2007-02-07 10:32:09 UTC
Created attachment 109412 [details, diff]
nss_ldap-254-gssapi-headers.patch

(In reply to comment #1)
> provide a patch against nss_ldap to make it look elsewhere for headers please.

Here you are. :-)
Comment 3 Martin von Gagern 2007-02-07 10:33:07 UTC
Reported upstream as well: http://bugzilla.padl.com/show_bug.cgi?id=308
Comment 4 Bryan Jacobs 2007-07-23 22:24:42 UTC
(In reply to comment #3)
> Reported upstream as well: http://bugzilla.padl.com/show_bug.cgi?id=308
> 

Heimdal 1.0 provides gssapi_krb5.h.
Comment 5 Martin von Gagern 2007-09-20 09:02:48 UTC
Still an issue with sys-auth/nss_ldap-257. My patch from comment #2 still works. Please apply patch in official ebuild until upstream catches up.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-10-09 23:43:30 UTC
257.2 is in the tree now, and upstream has the other kerberos changes.
Comment 7 Martin von Gagern 2007-10-24 12:38:09 UTC
Created attachment 134217 [details, diff]
nss_ldap-257.2-gssapi-headers.patch

Old patch fails for 257.2, but is still needed with app-crypt/heimdal-0.7.2-r3. Recreated patch.
Comment 8 Martin von Gagern 2007-10-24 12:42:34 UTC
Reopening, as I still needed this patch in order to build against the only Heimdal implementation currently available in the official portage tree.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-08 03:17:49 UTC
258 is in the tree now with this fix.