Henning Brauer wrote:
>
> On Wed, Aug 08, 2001 at 11:27:34AM -0700, Adam McKenna wrote:
> > So, basically my options are patching by hand,
>
> shouldn't be to complicated. the qmail-ldap-control patch itself is a
> wrapper around the control file reading routines.
>
> > or using the older qmail-ldap.
> > Are there any major problems with the 0301 qmail-ldap that the newer one
> > fixes, or would I be alright with running that version?
>
> It has some small bugs, I remember qmail-local crashing on
> DeliveryMode=reply,localdelivery. 0301 is ok IMHO. But another poster here
> offered an updated qmail-ldap-control patch, I'd take this one.
>
> --
> * Henning Brauer, [EMAIL PROTECTED], http://www.bsws.de *
> * Roedingsmarkt 14, 20459 Hamburg, Germany *
> Unix is very simple, but it takes a genius to understand the simplicity.
> (Dennis Ritchie)
here is the patch for qmail-ldap-1.03-20010501.patch
...remove sections: Makefile, qmail-reply.c on the original one and
apply the newer patch.
Christian
P.S. If anyone is interested I made a patch that seems to work also with
qmail-ldap-20010802-i
--- qmail-1.03/Makefile.chris Wed Aug 8 21:12:03 2001
+++ qmail-1.03/Makefile Wed Aug 8 21:24:48 2001
@@ -6,6 +6,8 @@
# -DQLDAP_CLUSTER for enabling cluster support
# to use cleartext passwords (a bad idea on production systems) add
# -DCLEARTEXTPASSWD to the LDAPFLAGS
+# To use connection less LDAP support add -DUSE_CLDAP to the LDAPFLAGS.
+# This is however not tested since slapd does not support this yet.
LDAPFLAGS=-DQLDAP_CLUSTER
# Perhaps you have different ldap libraries, change them here
@@ -30,6 +32,21 @@
# Path to OpenSSL binary
OPENSSLBIN=/usr/local/bin/openssl
+# -DUSE_RFC2307
+# -> Follow the RFC2307
+#
+# -DUSE_RFC822
+# -> Follow the RFC822
+#
+# See the QLDAPINSTALL file for more about this.
+#RFCFLAGS=-DUSE_RFC2307 -DUSE_RFC822
+
+# to enable having the configuration (~control/* in the LDAP database
+# to, uncomment the following line and read QLDAPINSTALL.
+# -DUSE_CONTROLDB Search LDAP for control files
+# -DQLDAP_BAILOUT First search LDAP, then FS
+#CONTROLDB=-DUSE_CONTROLDB
+
# to make the Netscape download progress bar work with qmail-pop3d
# uncomment the next line (allready done)
MNW=-DMAKE_NETSCAPE_WORK
@@ -58,6 +75,17 @@
#INCTAI=../libtai-0.60
#LIBTAI=../libtai-0.60
+ifdef DEBIAN
+# Under Debian, with the packages libopenldap-dev, libopenldap1,
+# openssl and libssl09-dev installed, use these entries instead.
+LDAPLIBS=-L/usr/lib -lldap -llber-openldap
+LDAPINCLUDES=-I/usr/include/openldap
+TLSINCLUDES=-I/usr/include/openssl
+TLSLIBS=-L/usr/lib -lssl -lcrypto
+OPENSSLBIN=/usr/bin
+endif
+
+
# Just for me, make from time to time a backup
BACKUPPATH=/backup/qmail-backup/qmail-ldap.`date "+%Y%m%d-%H%M"`.tar
# STOP editing HERE !!!
@@ -66,6 +94,12 @@
SHELL=/bin/sh
+ifdef CONTROLDB
+DEBUGLIB1 = qldap-debug.o
+DEBUGLIBS = qldap-debug.o envread.o error_str.o
+endif
+
+
default: it qldap
qldap: qmail-quotawarn qmail-reply auth_pop auth_imap digest qmail-ldaplookup
@@ -89,7 +123,7 @@
auth_imap.o: \
compile auth_imap.c error.h qldap-errno.h readwrite.h stralloc.h env.h \
str.h timeoutread.h auth_mod.h qldap-mdm.h exit.h
- ./compile $(LDAPFLAGS) $(HDIRMAKE) $(DEBUG) auth_imap.c
+ ./compile $(LDAPFLAGS) $(HDIRMAKE) $(DEBUG) $(CONTROLDB) $(RFCFLAGS)
+auth_imap.c
auth_imap: \
load auth_imap.o checkpassword.o check.o control.o getln.a qldap-debug.o \
@@ -108,7 +142,7 @@
compile auth_pop.c error.h qldap-errno.h readwrite.h stralloc.h env.h \
str.h timeoutread.h auth_mod.h qldap-mdm.h exit.h fmt.h sig.h wait.h \
scan.h alloc.h
- ./compile $(LDAPFLAGS) $(HDIRMAKE) $(DEBUG) auth_pop.c
+ ./compile $(LDAPFLAGS) $(HDIRMAKE) $(DEBUG) $(CONTROLDB) $(RFCFLAGS) auth_pop.c
auth_pop: \
load auth_pop.o checkpassword.o check.o control.o getln.a qldap-debug.o \
@@ -392,14 +426,14 @@
check.o: \
compile check.c check.h str.h str_len.c
- ./compile $(LDAPFLAGS) check.c
+ ./compile $(LDAPFLAGS) $(RFCFLAGS) check.c
checkpassword.o: \
compile checkpassword.c qmail-ldap.h stralloc.h auth_mod.h qldap-ldaplib.h \
qldap-errno.h readwrite.h error.h str.h open.h substdio.h getln.h select.h \
digest_md4.h digest_md5.h digest_rmd160.h digest_sha1.h dns.h \
ipalloc.h timeoutconn.h byte.h scan.h fmt.h alloc.h qldap-debug.h
- ./compile $(LDAPFLAGS) $(SHADOWOPTS) $(LDAPINCLUDES) checkpassword.c
+ ./compile $(LDAPFLAGS) $(SHADOWOPTS) $(LDAPINCLUDES) $(DEBUG) $(RFCFLAGS)
+checkpassword.c
chkshsgr: \
load chkshsgr.o
@@ -420,7 +454,7 @@
clean: \
TARGETS
- rm -f `cat TARGETS`
+ rm -f `cat TARGETS` *~ .#* *.s
coe.o: \
compile coe.c coe.h
@@ -477,7 +511,7 @@
control.o: \
compile control.c readwrite.h open.h getln.h stralloc.h gen_alloc.h \
substdio.h error.h control.h alloc.h scan.h
- ./compile control.c
+ ./compile $(LDAPINCLUDES) $(CONTROLDB) $(RFCFLAGS) $(DEBUG) control.c
date822fmt.o: \
compile date822fmt.c datetime.h fmt.h date822fmt.h
@@ -749,7 +783,7 @@
load forward.o qmail.o strerr.a alloc.a fd.a wait.a sig.a env.a \
substdio.a error.a str.a fs.a auto_qmail.o
./load forward qmail.o strerr.a alloc.a fd.a wait.a sig.a \
- env.a substdio.a error.a str.a fs.a auto_qmail.o
+ env.a substdio.a error.a str.a fs.a auto_qmail.o $(LDAPLIBS)
forward.0: \
forward.1
@@ -1245,7 +1279,8 @@
qldap-ldaplib.o: \
compile qmail-ldap.h qldap-errno.h qldap-ldaplib.h alloc.h stralloc.h \
error.h control.h auto_qmail.h str.h qldap-ldaplib.c byte.h fmt.h
- ./compile $(LDAPFLAGS) $(LDAPINCLUDES) $(DEBUG) qldap-ldaplib.c
+ ./compile $(LDAPFLAGS) $(LDAPINCLUDES) $(DEBUG) $(RFCFLAGS) \
+ $(CONTROLDB) qldap-ldaplib.c
qldap-mdm.o: \
compile qldap-mdm.c qldap-errno.h wait.h
@@ -1323,11 +1358,11 @@
control.o date822fmt.o constmap.o qmail.o case.a fd.a wait.a open.a \
getln.a sig.a getopt.a datetime.a token822.o env.a stralloc.a alloc.a \
substdio.a error.a str.a fs.a auto_qmail.o
- ./load qmail-inject headerbody.o hfield.o newfield.o \
+ ./load qmail-inject headerbody.o hfield.o newfield.o $(DEBUGLIB1) \
quote.o now.o control.o date822fmt.o constmap.o qmail.o \
case.a fd.a wait.a open.a getln.a sig.a getopt.a datetime.a \
token822.o env.a stralloc.a alloc.a substdio.a error.a \
- str.a fs.a auto_qmail.o
+ str.a fs.a auto_qmail.o $(LDAPLIBS)
qmail-inject.0: \
qmail-inject.8
@@ -1339,7 +1374,7 @@
hfield.h token822.h gen_alloc.h control.h env.h gen_alloc.h \
gen_allocdefs.h error.h qmail.h substdio.h now.h datetime.h exit.h \
quote.h headerbody.h auto_qmail.h newfield.h stralloc.h constmap.h
- ./compile qmail-inject.c
+ ./compile $(CONTROLDB) $(RFCFLAGS) qmail-inject.c
qmail-limits.0: \
qmail-limits.7
@@ -1376,7 +1411,7 @@
gen_alloc.h fmt.h str.h now.h datetime.h qmail-ldap.h quote.h qmail.h \
substdio.h slurpclose.h myctime.h gfrom.h auto_patrn.h auto_qmail.h \
qldap-errno.h qldap-mdm.h
- ./compile $(LDAPFLAGS) $(MDIRMAKE) $(HDIRMAKE) qmail-local.c
+ ./compile $(LDAPFLAGS) $(MDIRMAKE) $(HDIRMAKE) $(RFCFLAGS) qmail-local.c
qmail-log.0: \
qmail-log.5
@@ -1398,7 +1433,7 @@
alloc.h error.h str.h qldap-debug.h qldap-ldaplib.h check.h substdio.h \
fmt.h scan.h readwrite.h byte.h getln.h digest_md4.h \
digest_md5.h digest_rmd160.h digest_sha1.h open.h
- ./compile $(LDAPFLAGS) $(SHADOWOPTS) qmail-ldaplookup.c
+ ./compile $(LDAPFLAGS) $(SHADOWOPTS) $(CONTROLDB) $(RFCFLAGS)
+qmail-ldaplookup.c
qmail-lspawn: \
load qmail-lspawn.o spawn.o prot.o slurpclose.o coe.o control.o check.o \
@@ -1422,7 +1457,8 @@
slurpclose.h auto_qmail.h auto_uids.h qlx.h qmail-ldap.h check.h \
qldap-ldaplib.h qldap-errno.h qldap-debug.h env.h auto_usera.h \
auto_uids.h fmt.h sig.h seek.h
- ./compile $(LDAPFLAGS) $(HDIRMAKE) $(LDAPINCLUDES) qmail-lspawn.c
+ ./compile $(LDAPFLAGS) $(HDIRMAKE) $(LDAPINCLUDES) \
+ $(CONTROLDB) $(RFCFLAGS) $(DEBUG) qmail-lspawn.c
qmail-newmrh: \
load qmail-newmrh.o cdbmss.o getln.a open.a cdbmake.a seek.a case.a \
@@ -1493,7 +1529,7 @@
substdio.h alloc.h open.h prioq.h datetime.h gen_alloc.h scan.h fmt.h \
str.h exit.h maildir.h strerr.h readwrite.h timeoutread.h \
timeoutwrite.h maildir++.h
- ./compile $(LDAPFLAGS) $(MNW) $(MDIRMAKE) qmail-pop3d.c
+ ./compile $(LDAPFLAGS) $(MNW) $(MDIRMAKE) $(RFCFLAGS) qmail-pop3d.c
qmail-popup: \
load qmail-popup.o commands.o timeoutread.o timeoutwrite.o now.o \
@@ -1517,9 +1553,9 @@
load qmail-pw2u.o constmap.o control.o open.a getln.a case.a getopt.a \
stralloc.a alloc.a substdio.a error.a str.a fs.a auto_usera.o \
auto_break.o auto_qmail.o
- ./load qmail-pw2u constmap.o control.o open.a getln.a \
+ ./load qmail-pw2u constmap.o control.o open.a getln.a $(DEBUGLIBS) \
case.a getopt.a stralloc.a alloc.a substdio.a error.a str.a \
- fs.a auto_usera.o auto_break.o auto_qmail.o
+ fs.a auto_usera.o auto_break.o auto_qmail.o $(LDAPLIBS)
qmail-pw2u.0: \
qmail-pw2u.8
@@ -1538,7 +1574,7 @@
sgetopt.h subgetopt.h control.h constmap.h stralloc.h gen_alloc.h \
fmt.h str.h scan.h open.h error.h getln.h auto_break.h auto_qmail.h \
auto_usera.h
- ./compile qmail-pw2u.c
+ ./compile $(DEBUG) $(CONTROLDB) $(RFCFLAGS) qmail-pw2u.c
qmail-qmqpc: \
load qmail-qmqpc.o slurpclose.o timeoutread.o timeoutwrite.o \
@@ -1547,7 +1583,8 @@
./load qmail-qmqpc slurpclose.o timeoutread.o \
timeoutwrite.o timeoutconn.o ip.o control.o auto_qmail.o \
sig.a ndelay.a open.a getln.a substdio.a stralloc.a alloc.a \
- error.a fs.a dns.o str.a ipalloc.o `cat dns.lib` `cat socket.lib`
+ error.a fs.a dns.o str.a ipalloc.o `cat dns.lib` `cat socket.lib` \
+ $(LDAPLIBS) $(DEBUGLIBS)
qmail-qmqpc.0: \
qmail-qmqpc.8
@@ -1557,7 +1594,7 @@
compile qmail-qmqpc.c substdio.h getln.h readwrite.h exit.h \
stralloc.h gen_alloc.h slurpclose.h error.h sig.h ip.h timeoutconn.h \
timeoutread.h timeoutwrite.h auto_qmail.h control.h fmt.h
- ./compile $(LDAPFLAGS) qmail-qmqpc.c
+ ./compile $(LDAPFLAGS) $(CONTROLDB) $(RFCFLAGS) qmail-qmqpc.c
qmail-qmqpd: \
load qmail-qmqpd.o received.o now.o date822fmt.o qmail.o auto_qmail.o \
@@ -1580,10 +1617,10 @@
date822fmt.o now.o qmail.o cdb.a fd.a wait.a datetime.a open.a \
getln.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a \
str.a fs.a auto_qmail.o
- ./load qmail-qmtpd rcpthosts.o control.o constmap.o \
+ ./load qmail-qmtpd rcpthosts.o control.o constmap.o $(DEBUGLIB1) \
received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
datetime.a open.a getln.a sig.a case.a env.a stralloc.a \
- alloc.a substdio.a error.a str.a fs.a auto_qmail.o
+ alloc.a substdio.a error.a str.a fs.a auto_qmail.o $(LDAPLIBS)
qmail-qmtpd.0: \
qmail-qmtpd.8
@@ -1593,7 +1630,7 @@
compile qmail-qmtpd.c stralloc.h gen_alloc.h substdio.h qmail.h \
substdio.h now.h datetime.h str.h fmt.h env.h sig.h rcpthosts.h \
auto_qmail.h readwrite.h control.h received.h
- ./compile qmail-qmtpd.c
+ ./compile $(CONTROLDB) $(RFCFLAGS) qmail-qmtpd.c
qmail-qread: \
load qmail-qread.o fmtqfn.o readsubdir.o date822fmt.o datetime.a \
@@ -1659,7 +1696,7 @@
compile qmail-quotawarn.c readwrite.h sig.h byte.h case.h datetime.h \
env.h error.h exit.h newfield.h open.h seek.h str.h strerr.h stralloc.h \
substdio.h wait.h qmail-ldap.h
- ./compile qmail-quotawarn.c
+ ./compile $(RFCFLAGS) qmail-quotawarn.c
qmail-remote: \
load qmail-remote.o control.o constmap.o timeoutread.o timeoutwrite.o \
@@ -1670,7 +1707,8 @@
timeoutwrite.o timeoutconn.o tcpto.o now.o dns.o ip.o \
ipalloc.o ipme.o quote.o ndelay.a case.a sig.a open.a \
lock.a seek.a getln.a stralloc.a alloc.a substdio.a error.a \
- str.a fs.a auto_qmail.o `cat dns.lib` `cat socket.lib` ${TLSLIBS}
+ str.a fs.a auto_qmail.o `cat dns.lib` `cat socket.lib` ${TLSLIBS} \
+ $(LDAPLIBS) $(DEBUGLIBS)
qmail-remote.0: \
qmail-remote.8
@@ -1682,7 +1720,7 @@
alloc.h quote.h ip.h ipalloc.h ip.h gen_alloc.h ipme.h ip.h ipalloc.h \
gen_alloc.h gen_allocdefs.h str.h now.h datetime.h exit.h constmap.h \
tcpto.h readwrite.h timeoutconn.h timeoutread.h timeoutwrite.h
- ./compile ${TLSON} ${TLSINCLUDES} qmail-remote.c
+ ./compile ${TLSON} ${TLSINCLUDES} $(CONTROLDB) $(DEBUG) qmail-remote.c
qmail-reply: \
load qmail-reply.o case.a getln.a sig.a open.a seek.a env.a fd.a \
@@ -1695,7 +1733,7 @@
compile qmail-reply.c case.h env.h error.h exit.h getln.h qlx.h \
readwrite.h seek.h sig.h str.h strerr.h stralloc.h substdio.h \
wait.h auto_qmail.h qmail-ldap.h
- ./compile $(LDAPFLAGS) qmail-reply.c
+ ./compile $(LDAPFLAGS) $(RFCFLAGS) qmail-reply.c
qmail-rspawn: \
load qmail-rspawn.o spawn.o tcpto_clean.o now.o coe.o sig.a open.a \
@@ -1725,7 +1763,8 @@
prioq.o trigger.o fmtqfn.o quote.o now.o readsubdir.o \
qmail.o date822fmt.o datetime.a case.a ndelay.a getln.a \
wait.a seek.a fd.a sig.a open.a lock.a stralloc.a alloc.a \
- substdio.a error.a str.a fs.a auto_qmail.o auto_split.o
+ substdio.a error.a str.a fs.a auto_qmail.o auto_split.o \
+ $(LDAPLIBS) $(DEBUGLIBS)
qmail-send.0: \
qmail-send.8
@@ -1746,7 +1785,7 @@
scan.h case.h auto_qmail.h trigger.h newfield.h stralloc.h quote.h \
qmail.h substdio.h qsutil.h prioq.h datetime.h gen_alloc.h constmap.h \
fmtqfn.h readsubdir.h direntry.h
- ./compile $(LDAPFLAGS) qmail-send.c
+ ./compile $(LDAPFLAGS) $(CONTROLDB) qmail-send.c
qmail-showctl: \
load qmail-showctl.o auto_uids.o control.o open.a getln.a stralloc.a \
@@ -1755,7 +1794,7 @@
./load qmail-showctl auto_uids.o control.o open.a getln.a \
stralloc.a alloc.a substdio.a error.a str.a fs.a \
auto_qmail.o auto_break.o auto_patrn.o auto_spawn.o \
- auto_split.o
+ auto_split.o $(LDAPLIBS) $(DEBUGLIBS)
qmail-showctl.0: \
qmail-showctl.8
@@ -1766,7 +1805,7 @@
str.h control.h constmap.h stralloc.h gen_alloc.h direntry.h \
auto_uids.h auto_qmail.h auto_break.h auto_patrn.h auto_spawn.h \
auto_split.h
- ./compile qmail-showctl.c
+ ./compile $(DEBUG) $(CONTROLDB) qmail-showctl.c
qmail-smtpd: \
load qmail-smtpd.o rcpthosts.o commands.o timeoutread.o \
@@ -1774,12 +1813,12 @@
date822fmt.o now.o qmail.o cdb.a fd.a wait.a datetime.a getln.a \
open.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a str.a \
fs.a auto_qmail.o dns.lib socket.lib
- ./load qmail-smtpd rcpthosts.o commands.o timeoutread.o \
+ ./load qmail-smtpd rcpthosts.o commands.o timeoutread.o $(DEBUGLIB1) \
timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o \
received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
datetime.a getln.a open.a sig.a case.a env.a stralloc.a \
alloc.a substdio.a error.a fs.a auto_qmail.o dns.o str.a \
- `cat dns.lib` `cat socket.lib` ${TLSLIBS}
+ `cat dns.lib` `cat socket.lib` ${TLSLIBS} $(LDAPLIBS)
qmail-smtpd.0: \
qmail-smtpd.8
@@ -1791,7 +1830,7 @@
error.h ipme.h ip.h ipalloc.h ip.h gen_alloc.h ip.h qmail.h \
substdio.h str.h fmt.h scan.h byte.h case.h env.h now.h datetime.h \
exit.h rcpthosts.h timeoutread.h timeoutwrite.h commands.h
- ./compile ${TLSON} ${TLSINCLUDES} qmail-smtpd.c
+ ./compile ${TLSON} ${TLSINCLUDES} $(CONTROLDB) qmail-smtpd.c
qmail-start: \
load qmail-start.o prot.o fd.a auto_uids.o
@@ -2397,3 +2436,4 @@
backup: \
clean
tar cf $(BACKUPPATH) .
+