Add (optional, default off) support to kerberos5 for supporting openldap.

Tests with openldap20 where successful whereas openldap21 didn't like
the way hdb-ldap accessed openldap (doesn't like non-bind access).
To activate the support put a USE_OPENLDAP=yes in your make.conf.
The OPENLDAPBASE is also optional and points to /usr/local as default.

Approved by:	markm
MFC after:	2 weeks
This commit is contained in:
Michael Reifenberger 2003-06-18 09:11:34 +00:00
parent 777ca648ab
commit bdf5603500
10 changed files with 41 additions and 25 deletions

View File

@ -13,6 +13,13 @@ CFLAGS+=-I${INCLUDEOBJDIR} -DHAVE_CONFIG_H
CFLAGS+=-DINET6 CFLAGS+=-DINET6
.if defined(USE_OPENLDAP)
OPENLDAPBASE?= /usr/local
LDAPLIBS=-lldap -llber
LDAPCFLAGS=-I${OPENLDAPBASE}/include -DOPENLDAP=1
LDAPLDADD=-L${OPENLDAPBASE}/lib ${LDAPLIBS}
.endif
.if exists(${.OBJDIR}/../../include) .if exists(${.OBJDIR}/../../include)
INCLUDEOBJDIR= ${.OBJDIR}/../../include INCLUDEOBJDIR= ${.OBJDIR}/../../include
.else .else

View File

@ -8,7 +8,8 @@ CFLAGS+=-I${KRB5DIR}/include \
-I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/asn1 \
-I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/roken \
-I${.OBJDIR} \ -I${.OBJDIR} \
-I${ASN1OBJDIR} -I${ASN1OBJDIR} \
${LDAPCFLAGS}
SRCS= \ SRCS= \
common.c \ common.c \

View File

@ -11,13 +11,14 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kuser \ -I${KRB5DIR}/kuser \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= -L${KRB5OBJDIR} -lkrb5 \ LDADD= -L${KRB5OBJDIR} -lkrb5 \
-L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \ -L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPLIBS}
MAN= hpropd.8 MAN= hpropd.8
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -11,15 +11,16 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kuser \ -I${KRB5DIR}/kuser \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= \ LDADD= \
-L${KADM5SOBJDIR} -lkadm5srv \ -L${KADM5SOBJDIR} -lkadm5srv \
-L${KRB5OBJDIR} -lkrb5 \ -L${KRB5OBJDIR} -lkrb5 \
-L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \ -L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPLIBS}
NOMAN= yes NOMAN= yes
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -11,15 +11,16 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kuser \ -I${KRB5DIR}/kuser \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= \ LDADD= \
-L${KADM5SOBJDIR} -lkadm5srv \ -L${KADM5SOBJDIR} -lkadm5srv \
-L${KRB5OBJDIR} -lkrb5 \ -L${KRB5OBJDIR} -lkrb5 \
-L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \ -L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPLIBS}
NOMAN= yes NOMAN= yes
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -13,16 +13,17 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kadmin \ -I${KRB5DIR}/kadmin \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= -L${KRB5OBJDIR} -lkrb5 \ LDADD= -L${KRB5OBJDIR} -lkrb5 \
-L${ROKENOBJDIR} -lroken \ -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${KADM5SOBJDIR} -lkadm5srv \ -L${KADM5SOBJDIR} -lkadm5srv \
-L${HDBOBJDIR} -lhdb \ -L${HDBOBJDIR} -lhdb \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \
${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} \ ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPLIBS}
NOMAN= yes NOMAN= yes
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -19,13 +19,14 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kuser \ -I${KRB5DIR}/kuser \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= -L${KRB5OBJDIR} -lkrb5 \ LDADD= -L${KRB5OBJDIR} -lkrb5 \
-L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \ -L${HDBOBJDIR} -lhdb -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBHDB} ${LIBROKEN} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPLIBS}
MAN= kdc.8 MAN= kdc.8
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -12,13 +12,14 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kpasswd \ -I${KRB5DIR}/kpasswd \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= -L${KRB5OBJDIR} -lkrb5 -L${ROKENOBJDIR} -lroken \ LDADD= -L${KRB5OBJDIR} -lkrb5 -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${KADM5SOBJDIR} -lkadm5srv -L${HDBOBJDIR} -lhdb \ -L${KADM5SOBJDIR} -lkadm5srv -L${HDBOBJDIR} -lhdb \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBROKEN} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPLIBS}
MAN= kpasswdd.8 MAN= kpasswdd.8
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -32,18 +32,19 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kadmin \ -I${KRB5DIR}/kadmin \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= -L${KADM5COBJDIR} -lkadm5clnt -L${KADM5SOBJDIR} -lkadm5srv \ LDADD= -L${KADM5COBJDIR} -lkadm5clnt -L${KADM5SOBJDIR} -lkadm5srv \
-L${KRB5OBJDIR} -lkrb5 \ -L${KRB5OBJDIR} -lkrb5 \
-L${ROKENOBJDIR} -lroken \ -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${HDBOBJDIR} -lhdb \ -L${HDBOBJDIR} -lhdb \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err \ -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err \
-L${SLOBJDIR} -lsl -lreadline -lcurses -L${SLOBJDIR} -lsl -lreadline -lcurses ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \
${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} \ ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \
${LIBSL} ${LIBREADLINE} ${LIBCURSES} ${LIBSL} ${LIBREADLINE} ${LIBCURSES} ${LDAPLIBS}
MAN= kadmin.8 MAN= kadmin.8
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -10,14 +10,15 @@ CFLAGS+= -I${KRB5DIR}/include \
-I${KRB5DIR}/kdc \ -I${KRB5DIR}/kdc \
-I${ASN1OBJDIR} \ -I${ASN1OBJDIR} \
-I${HDBOBJDIR} \ -I${HDBOBJDIR} \
-I${.OBJDIR} -I${.OBJDIR} \
${LDAPCFLAGS}
LDADD= -L${HDBOBJDIR} -lhdb \ LDADD= -L${HDBOBJDIR} -lhdb \
-L${KRB5OBJDIR} -lkrb5 \ -L${KRB5OBJDIR} -lkrb5 \
-L${ROKENOBJDIR} -lroken \ -L${ROKENOBJDIR} -lroken \
-L${VERSOBJDIR} -lvers \ -L${VERSOBJDIR} -lvers \
-L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \ DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPLIBS}
MAN= kstash.8 MAN= kstash.8
.include <bsd.prog.mk> .include <bsd.prog.mk>