diff -ru diablo-5-CUR-20031207-02/XMakefile.inc diablo-5-CUR-20031207-02-pixie/XMakefile.inc --- diablo-5-CUR-20031207-02/XMakefile.inc Sun Dec 7 22:04:45 2003 +++ diablo-5-CUR-20031207-02-pixie/XMakefile.inc Tue Jan 13 14:27:31 2004 @@ -4,23 +4,23 @@ */ .set VERS 5 -.set SUBREV CUR-20031207-02 +.set SUBREV CUR-20031028-00 /* .set SUBREV REL */ .set DLIB "$(BD)obj/libdiablo.a" .set FLIB "$(BD)obj/libfilter.a" .set RLIB "$(BD)obj/libdreader.a" .set CDEFINES '-DVERS="$(VERS)"' '-DSUBREV="$(SUBREV)"' #if __GNUC__ -.set CFLAGS -g -O2 -Wall -Wstrict-prototypes "-I$(BD)" $(CDEFINES) +.set CFLAGS -g -O2 -Wall -Wstrict-prototypes "-I$(BD)" $(CDEFINES) "-I/usr/local/include" "-I../" .set LSTATIC -static .set CC gcc #else -.set CFLAGS -g -O "-I$(BD)." $(CDEFINES) +.set CFLAGS -g -O "-I$(BD)." $(CDEFINES) .set LSTATIC .set CC cc #endif -.set LFLAGS -L$(BD)obj -lfilter -ldiablo -lutil -lm +.set LFLAGS -L$(BD)obj -lfilter -ldiablo -lutil -lm -lldap -L/usr/local/lib .set IDIR /news .set MDIR /news/man .set INSTALL install @@ -29,7 +29,8 @@ * Remove the -ldes entry if you don't have the crypto stuff installed */ #ifdef __FreeBSD__ -.set LFLAGS -L$(BD)obj -lfilter -ldiablo -lutil -lm -ldes -lmd -lradius -lz +.set LFLAGS -L$(BD)obj -lfilter -ldiablo -lutil -lm -lmd -lradius -lz -lldap -L/usr/local/lib +.set CFLAGS -I/usr/local/include -I../ -g -O "-I$(BD)." $(CDEFINES) #endif #ifdef __APPLE_CC__ @@ -45,7 +46,7 @@ #ifdef __linux__ .set CFLAGS -g -O2 -Wall -Wstrict-prototypes "-I$(BD)" $(CDEFINES) -D_FILE_OFFSET_BITS=64 .set CFLAGS -g -O2 -Wall -Wstrict-prototypes "-I$(BD)" $(CDEFINES) -D_FILE_OFFSET_BITS=64 -.set LFLAGS "-L$(BD)obj" -lfilter -ldiablo -lm -lz -lrt +.set LFLAGS "-L$(BD)obj" -lfilter -ldiablo -lm -lz #endif #ifdef __osf__ Only in diablo-5-CUR-20031207-02-pixie: XMakefile.inc.orig diff -ru diablo-5-CUR-20031207-02/dreaderd/dns.c diablo-5-CUR-20031207-02-pixie/dreaderd/dns.c --- diablo-5-CUR-20031207-02/dreaderd/dns.c Wed Dec 3 17:37:31 2003 +++ diablo-5-CUR-20031207-02-pixie/dreaderd/dns.c Tue Jan 13 14:34:27 2004 @@ -919,8 +919,11 @@ } ldap_free_urldesc(ludp); + /* patch */ + sprintf(ldapuser, "uid=%s,%s", user, ludp->lud_dn); - if ((msgid = ldap_bind_s(ld, ldapuser, ldappass, LDAP_AUTH_SIMPLE)) != + //if ((msgid = ldap_bind_s(ld, ldapuser, ldappass, LDAP_AUTH_SIMPLE)) != + if ((msgid = ldap_bind_s(ld, ldapuser, pass, LDAP_AUTH_SIMPLE)) != LDAP_SUCCESS) { /* Bind failed - fail auth attempt */ logit(LOG_ERR,"LDAP bind failed: %s\n", confst); @@ -929,88 +932,11 @@ ld = NULL; return(NULL); } + result="100 Success"; if (DebugOpt) printf("Connection to LDAP server established\n"); } - - /* - * Setup the search parameters and substitute the user, pass and domain - * fields into the search URL - */ - { - char *src = confst; - char *dst = url; - - while (*src) { - if (user && strncmp(src, "$USER$", 6) == 0) { - src += 6; - strcpy(dst, user); - dst += strlen(user); - } else if (pass && strncmp(src, "$PASSWD$", 8) == 0) { - src += 8; - strcpy(dst, pass); - dst += strlen(pass); - } else if (realm && strncmp(src, "$REALM$", 7) == 0) { - src += 7; - strcpy(dst, realm); - dst += strlen(realm); - } else { - *dst++ = *src++; - } - } - *dst = 0; - if (DebugOpt) - printf("URL: %s\n", url); - } - - if (ldap_url_parse(url, &ludp) != 0) { - logit(LOG_ERR,"Unable to parse LDAP URL: %s\n", url); - free(confst); - return(NULL); - } - - /* - * Perform the search - */ - if ((rcode = ldap_search_s(ld, ludp->lud_dn, ludp->lud_scope, ludp->lud_filter, ludp->lud_attrs, 0, &res)) != LDAP_SUCCESS) { - logit(LOG_ERR,"LDAP search for %s failed: %s\n", url, ldap_err2string(rcode)); - free(confst); - ldap_unbind_s(ld); - ldap_free_urldesc(ludp); - ld = NULL; - return(NULL); - } - - ldap_free_urldesc(ludp); - - /* - * Parse the results. - */ - if (DebugOpt) - printf("Results:\n"); - for (m = ldap_first_entry(ld, res); m != NULL; - m = ldap_next_entry(ld, m)) { - BerElement *ber; - char *attr; - int i; - - for (attr = ldap_first_attribute(ld, m, &ber); attr != NULL; - attr = ldap_next_attribute(ld, m, ber)) { - char **vals; - - if (DebugOpt) - printf("attr: %s\n", attr); - if ((vals = ldap_get_values(ld, m, attr)) != NULL) { - for (i = 0; vals[i] != NULL; ++i) { - if (strcmp(pass,vals[i])==0) result="100 Success"; - if (DebugOpt) - printf(" val: %s\n", vals[i]); - } - ldap_value_free(vals); - } - } - } - ldap_msgfree(res); + // ldap_free_urldesc(ludp); #ifdef LDAP_DO_UNBIND ldap_unbind_s(ld); ld = NULL; Only in diablo-5-CUR-20031207-02-pixie/dreaderd: dns.c.orig diff -ru diablo-5-CUR-20031207-02/lib/vendor.h diablo-5-CUR-20031207-02-pixie/lib/vendor.h --- diablo-5-CUR-20031207-02/lib/vendor.h Sun Mar 2 23:10:37 2003 +++ diablo-5-CUR-20031207-02-pixie/lib/vendor.h Tue Jan 13 14:27:31 2004 @@ -129,7 +129,7 @@ * be add to LFLAGS in XMakefile.inc */ -#undef LDAP_ENABLED +#define LDAP_ENABLED /* * Enable a new and more flexible form of LDAP authentication. @@ -164,7 +164,7 @@ * */ -#undef NEW_LDAP +#define NEW_LDAP /* * Enable PAM authentication. Requires a PAM library and -lpam to be added Only in diablo-5-CUR-20031207-02-pixie/lib: vendor.h.orig