Patch to enable KERBEROS_V4 with slapd (taken against openldap devel release) =================================================================== RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/sasl.c,v retrieving revision 1.59 diff -c -r1.59 sasl.c *** sasl.c 2001/02/02 12:49:26 1.59 --- sasl.c 2001/04/05 23:45:31 *************** *** 480,485 **** --- 480,502 ---- conn->c_sasl_context = ctx; if( sc == SASL_OK ) { + { + struct sockaddr_in sin; + int l; + Sockbuf *sb = conn->c_sb; + int fd; + ber_sockbuf_ctrl(sb,LBER_SB_OPT_GET_FD,&fd); + l = sizeof(sin); + + if(getsockname(fd,(struct sockaddr*)&sin,&l)==0) { + sasl_setprop(ctx,SASL_IP_LOCAL, (void*)&sin); + } + l = sizeof(sin); + if(getpeername(fd,(struct sockaddr*)&sin,&l)==0) { + sasl_setprop(ctx,SASL_IP_REMOTE, (void*)&sin); + } + } + sc = sasl_setprop( ctx, SASL_SEC_PROPS, &sasl_secprops );