openldap24 stable port information

Info4: <<
Package: openldap24%type_pkg[-64bit]
Version: 2.4.28
Revision: 1
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] = -64bit ) i386
Distribution: 10.6
Maintainer: Daniel Johnson
Source: mirror:custom:openldap-release/openldap-%v.tgz
CustomMirror: <<
asi-JP: ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/
asi-JP: ftp://ftp.u-aizu.ac.jp/pub/net/openldap/
asi-KR: ftp://ftp.holywar.net/pub/mirror/OpenLDAP/
eur-AT: ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/
eur-CH: ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/
eur-GR: ftp://ftp.ntua.gr/mirror/OpenLDAP/
eur-IT: ftp://it.openldap.org/pub/OpenLDAP/
eur-NL: ftp://ftp.nl.uu.net/pub/unix/db/openldap/
eur-PT: ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/
nam-US: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/
sam-BR: ftp://ftp.matrix.com.br/pub/openldap/
sam-CR: ftp://mirrors.ucr.ac.cr/openldap/
<<
Source-MD5: 196023e552eeb259e048edcd61a9645b
Depends: %N-shlibs (= %v-%r), daemonic, ( %type_raw[-64bit] = -64bit ) 64bit-cpu
BuildDepends: <<
cyrus-sasl2%type_pkg[-64bit]-dev (>= 2.1.25-1),
db53-aes%type_pkg[-64bit],
fink (>= 0.24.12-1),
system-openssl-dev
<<
Conflicts: openldap-ssl, openldap23, openldap24, openldap24-64bit
Replaces: openldap-ssl, openldap23, openldap24, openldap24-64bit
Provides: openldap
PatchFile: %{ni}.patch
PatchFile-MD5: 0492da596271831c1eae985c611f1199
NoSetLDFLAGS: True
SetLDFLAGS: -Wl,-dead_strip_dylibs
SetLibs: -lkrb5 -L%p/lib/system-openssl/lib -L%p/%lib -ldb-5.3
SetCPPFLAGS: -I%p/lib/system-openssl/include -I%p/include/db5 -DBIND_8_COMPAT
UseMaxBuildJobs: true
ConfigureParams: --libexecdir=%p/sbin --mandir=%p/share/man --with-cyrus-sasl --enable-ldap --disable-dependency-tracking --enable-dynamic --enable-shared --disable-static --libdir='${prefix}/%lib'
CompileScript: <<
#!/bin/bash -ev
if [ "%type_raw[-64bit]" == "-64bit" ]; then
export CC="gcc -m64"
fi
%{default_script}
<<
InstallScript: <<
make install DESTDIR=%d
<<
DocFiles: ANNOUNCEMENT CHANGES COPYRIGHT LICENSE README build/LICENSE-2.0.1 doc/drafts/draft*
ConfFiles: <<
%p/etc/openldap/ldap.conf
%p/etc/openldap/slapd.conf
<<
SplitOff: <<
Package: %N-shlibs
Depends: <<
cyrus-sasl2%type_pkg[-64bit]-shlibs (>= 2.1.25-1),
db53-aes%type_pkg[-64bit]-shlibs,
( %type_raw[-64bit] = -64bit ) 64bit-cpu
<<
Description: Shared libraries for LDAP
Files: %lib/*-2.4.2*.dylib
Shlibs: <<
%p/%lib/liblber-2.4.2.dylib 11.0.0 %n (>= 2.4.28-1) %type_num[-64bit]
%p/%lib/libldap-2.4.2.dylib 11.0.0 %n (>= 2.4.28-1) %type_num[-64bit]
%p/%lib/libldap_r-2.4.2.dylib 11.0.0 %n (>= 2.4.28-1) %type_num[-64bit]
<<
DocFiles: ANNOUNCEMENT CHANGES COPYRIGHT LICENSE README build/LICENSE-2.0.1
<<
SplitOff2: <<
Package: %N-dev
Depends: %N-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Conflicts: openldap-ssl-dev, openldap23-dev, openldap24-dev, openldap24-64bit-dev
Replaces: openldap-ssl-dev, openldap23-dev, openldap24-dev, openldap24-64bit-dev
Description: Libraries and headers for LDAP development
Files: include %lib/*.la %lib/*.dylib share/man/man3
BuildDependsOnly: True
DocFiles: COPYRIGHT LICENSE README build/LICENSE-2.0.1
<<
DaemonicName: slapd
DaemonicFile: <<

LDAP Server
LDAP Server


%p/sbin/slapd
%p/etc/openldap/slapd.conf



<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
daemonic remove slapd
fi
<<
Description: LDAP directory services implementation
DescDetail: <<
OpenLDAP is an open source implementation of the Lightweight Directory
Access Protocol. The suite includes:
* slapd - stand-alone LDAP server
* slurpd - stand-alone LDAP replication server
* libraries implementing the LDAP protocol, and
* utilities, tools, and sample clients.
<<
DescUsage: <<
To create a startup item that starts slapd after reboot just run as root
'daemonic enable slapd'. To remove the slapd startup item just run as root
'daemonic remove slapd'.
<<
DescPort: <<
Patch taken from:
http://packages.debian.org/lenny/libldap-2.4-2
<<
DescPackaging: <<
Disabled static libs and cleaned dependency_libs in *.la files.
Dependent packages no longer need to depend on our dependencies.
<<
License: Restrictive/Distributable
Homepage: http://www.openldap.org

InfoTest: <<
# Tests take a LONG time to run. Really. I mean it. A Looooooooong time.
TestSuiteSize: large
TestScript: <<
rm tests/scripts/test048-syncrepl-multiproxy
make check || exit 2
<<
<<
<<

openldap24 stable port .patch

diff -ruN openldap-2.4.25.orig/include/ldap.h openldap-2.4.25/include/ldap.h
--- openldap-2.4.25.orig/include/ldap.h 2011-01-06 13:43:19.000000000 -0500
+++ openldap-2.4.25/include/ldap.h 2011-04-07 16:26:19.000000000 -0400
@@ -2518,5 +2518,25 @@
LDAPControl **ctrls,
LDAPDerefRes **drp ));

+/*
+ * hacks for NTLM
+ */
+#define LDAP_AUTH_NTLM_REQUEST ((ber_tag_t) 0x8aU)
+#define LDAP_AUTH_NTLM_RESPONSE ((ber_tag_t) 0x8bU)
+LDAP_F( int )
+ldap_ntlm_bind LDAP_P((
+ LDAP *ld,
+ LDAP_CONST char *dn,
+ ber_tag_t tag,
+ struct berval *cred,
+ LDAPControl **sctrls,
+ LDAPControl **cctrls,
+ int *msgidp ));
+LDAP_F( int )
+ldap_parse_ntlm_bind_result LDAP_P((
+ LDAP *ld,
+ LDAPMessage *res,
+ struct berval *challenge));
+
LDAP_END_DECL
#endif /* _LDAP_H */
diff -ruN openldap-2.4.25.orig/libraries/libldap/Makefile.in openldap-2.4.25/libraries/libldap/Makefile.in
--- openldap-2.4.25.orig/libraries/libldap/Makefile.in 2011-03-24 14:22:43.000000000 -0400
+++ openldap-2.4.25/libraries/libldap/Makefile.in 2011-04-07 16:28:12.000000000 -0400
@@ -27,7 +27,7 @@
init.c options.c print.c string.c util-int.c schema.c \
charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
tls2.c tls_o.c tls_g.c tls_m.c \
- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
+ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
assertion.c deref.c ldif.c fetch.c

OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
@@ -40,7 +40,7 @@
init.lo options.lo print.lo string.lo util-int.lo schema.lo \
charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
tls2.lo tls_o.lo tls_g.lo tls_m.lo \
- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
+ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
assertion.lo deref.lo ldif.lo fetch.lo

LDAP_INCDIR= ../../include
diff -ruN openldap-2.4.25.orig/libraries/libldap/ntlm.c openldap-2.4.25/libraries/libldap/ntlm.c
--- openldap-2.4.25.orig/libraries/libldap/ntlm.c 1969-12-31 19:00:00.000000000 -0500
+++ openldap-2.4.25/libraries/libldap/ntlm.c 2011-04-07 16:26:19.000000000 -0400
@@ -0,0 +1,138 @@
+/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04 20:38:21 kurt Exp $ */
+/*
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+/* Mostly copied from sasl.c */
+
+#include "portable.h"
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include "ldap-int.h"
+
+int
+ldap_ntlm_bind(
+ LDAP *ld,
+ LDAP_CONST char *dn,
+ ber_tag_t tag,
+ struct berval *cred,
+ LDAPControl **sctrls,
+ LDAPControl **cctrls,
+ int *msgidp )
+{
+ BerElement *ber;
+ int rc;
+ ber_int_t id;
+
+ Debug( LDAP_DEBUG_TRACE, "ldap_ntlm_bind\n", 0, 0, 0 );
+
+ assert( ld != NULL );
+ assert( LDAP_VALID( ld ) );
+ assert( msgidp != NULL );
+
+ if( msgidp == NULL ) {
+ ld->ld_errno = LDAP_PARAM_ERROR;
+ return ld->ld_errno;
+ }
+
+ /* create a message to send */
+ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
+ ld->ld_errno = LDAP_NO_MEMORY;
+ return ld->ld_errno;
+ }
+
+ assert( LBER_VALID( ber ) );
+
+ LDAP_NEXT_MSGID( ld, id );
+ rc = ber_printf( ber, "{it{istON}" /*}*/,
+ id, LDAP_REQ_BIND,
+ ld->ld_version, dn, tag,
+ cred );
+
+ /* Put Server Controls */
+ if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
+ ber_free( ber, 1 );
+ return ld->ld_errno;
+ }
+
+ if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
+ ld->ld_errno = LDAP_ENCODING_ERROR;
+ ber_free( ber, 1 );
+ return ld->ld_errno;
+ }
+
+ /* send the message */
+ *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );
+
+ if(*msgidp < 0)
+ return ld->ld_errno;
+
+ return LDAP_SUCCESS;
+}
+
+int
+ldap_parse_ntlm_bind_result(
+ LDAP *ld,
+ LDAPMessage *res,
+ struct berval *challenge)
+{
+ ber_int_t errcode;
+ ber_tag_t tag;
+ BerElement *ber;
+ ber_len_t len;
+
+ Debug( LDAP_DEBUG_TRACE, "ldap_parse_ntlm_bind_result\n", 0, 0, 0 );
+
+ assert( ld != NULL );
+ assert( LDAP_VALID( ld ) );
+ assert( res != NULL );
+
+ if ( ld == NULL || res == NULL ) {
+ return LDAP_PARAM_ERROR;
+ }
+
+ if( res->lm_msgtype != LDAP_RES_BIND ) {
+ ld->ld_errno = LDAP_PARAM_ERROR;
+ return ld->ld_errno;
+ }
+
+ if ( ld->ld_error ) {
+ LDAP_FREE( ld->ld_error );
+ ld->ld_error = NULL;
+ }
+ if ( ld->ld_matched ) {
+ LDAP_FREE( ld->ld_matched );
+ ld->ld_matched = NULL;
+ }
+
+ /* parse results */
+
+ ber = ber_dup( res->lm_ber );
+
+ if( ber == NULL ) {
+ ld->ld_errno = LDAP_NO_MEMORY;
+ return ld->ld_errno;
+ }
+
+ tag = ber_scanf( ber, "{ioa" /*}*/,
+ &errcode, challenge, &ld->ld_error );
+ ber_free( ber, 0 );
+
+ if( tag == LBER_ERROR ) {
+ ld->ld_errno = LDAP_DECODING_ERROR;
+ return ld->ld_errno;
+ }
+
+ ld->ld_errno = errcode;
+
+ return( ld->ld_errno );
+}
+
diff -ruN openldap-2.4.25.orig/libraries/libldap_r/Makefile.in openldap-2.4.25/libraries/libldap_r/Makefile.in
--- openldap-2.4.25.orig/libraries/libldap_r/Makefile.in 2011-03-24 14:22:43.000000000 -0400
+++ openldap-2.4.25/libraries/libldap_r/Makefile.in 2011-04-07 16:28:55.000000000 -0400
@@ -29,7 +29,7 @@
init.c options.c print.c string.c util-int.c schema.c \
charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
tls2.c tls_o.c tls_g.c tls_m.c \
- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
+ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
assertion.c deref.c ldif.c fetch.c
SRCS = threads.c rdwr.c rmutex.c tpool.c rq.c \
thr_posix.c thr_cthreads.c thr_thr.c thr_nt.c \
@@ -47,7 +47,7 @@
init.lo options.lo print.lo string.lo util-int.lo schema.lo \
charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
tls2.lo tls_o.lo tls_g.lo tls_m.lo \
- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
+ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
assertion.lo deref.lo ldif.lo fetch.lo

LDAP_INCDIR= ../../include

openldap24 _unstable_ port .patch