Issue 884 - GSSAPI interoperabity with ActiveDirectory
Summary: GSSAPI interoperabity with ActiveDirectory
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-11-10 15:44 UTC by Norbert Klasen
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Norbert Klasen 2000-11-10 15:44:47 UTC
Full_Name: Norbert Klasen
Version: head
OS: linux
URL: 
Submission from: (NULL) (134.2.217.40)


On GSSAPI binds AD sends the BindResponse indicating succes with an empty 
serverSaslCreds field:

0000 30   18: SEQUENCE {
0006 02    1:   INTEGER = 4
0009 61    9:   [APPLICATION 1] {
000F 0A    1:     ENUM = 0
0012 04    0:     STRING = ''
0014 04    0:     STRING = ''
0016 87    0:     [CONTEXT 7]
0018        :   }
0018        : }

However ldap_int_sasl_bind fails on this with LDAP_LOCAL_ERROR. I guess OpenLDAP

expects serverSaslCreds to be absent since this field is optional. My patch
checks 
if there really is some data in the last serverSaslCreds and only aborts then.

--- libraries/libldap/cyrus.c.orig      Fri Nov 10 11:16:31 2000
+++ libraries/libldap/cyrus.c   Fri Nov 10 11:20:33 2000
@@ -576,7 +576,7 @@
 
                if( rc == LDAP_SUCCESS && saslrc == SASL_OK ) {
                        /* we're done, no need to step */
-                       if( scred ) {
+                       if( scred && (scred->bv_len > 0) ) {
                                /* but server provided us with data! */
                                Debug( LDAP_DEBUG_TRACE,
                                        "ldap_int_sasl_bind: rc=%d sasl=%d
len=%ld\n",

Comment 1 Kurt Zeilenga 2000-11-10 21:07:30 UTC
At 03:44 PM 11/10/00 +0000, klasen@zdv.uni-tuebingen.de wrote:
>Full_Name: Norbert Klasen
>Version: head
>OS: linux
>URL: 
>Submission from: (NULL) (134.2.217.40)
>
>
>On GSSAPI binds AD sends the BindResponse indicating succes with an empty 
>serverSaslCreds field:
>
>0000 30   18: SEQUENCE {
>0006 02    1:   INTEGER = 4
>0009 61    9:   [APPLICATION 1] {
>000F 0A    1:     ENUM = 0
>0012 04    0:     STRING = ''
>0014 04    0:     STRING = ''
>0016 87    0:     [CONTEXT 7]
>0018        :   }
>0018        : }
>
>However ldap_int_sasl_bind fails on this with LDAP_LOCAL_ERROR. I guess OpenLDAP
>
>expects serverSaslCreds to be absent since this field is optional. My patch
>checks 
>if there really is some data in the last serverSaslCreds and only aborts then.

Please note that the presence of an empty OPTIONAL field is not
semantically the same as the absence of the field.

Comment 2 Norbert Klasen 2000-11-14 15:40:03 UTC
Hi Kurt,
> >OpenLDAP
> >expects serverSaslCreds to be absent since this field is optional. My patch
> >checks
> >if there really is some data in the last serverSaslCreds and only aborts then.
> 
> Please note that the presence of an empty OPTIONAL field is not
> semantically the same as the absence of the field.

But is it wrong of AD to send empty serverSaslCreds along with SUCCESS,
ie. why should OpenLDAP fail on receiving such a BindResponse?

-- 
Norbert Klasen
DFN Directory Services                           tel: +49 7071 29 70335
ZDV, Universität Tübingen                        fax: +49 7071 29 5912
Wächterstr. 76, 72074 Tübingen              http://www.directory.dfn.de
Germany                             norbert.klasen@zdv.uni-tuebingen.de
Comment 3 Kurt Zeilenga 2000-12-27 10:44:21 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 4 Kurt Zeilenga 2000-12-27 18:43:52 UTC
I've applied a change to HEAD which should improve interoperability
with MS AD.  Please test.

Thanks, Kurt

Comment 5 Kurt Zeilenga 2001-01-16 21:13:45 UTC
changed state Test to Release
Comment 6 Kurt Zeilenga 2001-01-16 21:27:48 UTC
changed notes
Comment 7 Kurt Zeilenga 2001-05-02 23:24:09 UTC
changed notes
changed state Release to Closed
Comment 8 Kurt Zeilenga 2002-06-19 01:34:18 UTC
moved from Software Bugs to Archive.Software Bugs
Comment 9 OpenLDAP project 2014-08-01 21:06:55 UTC
fix applied to HEAD
applied to re2.0