Veselin Terzic wrote:
> 1. will the latest "squid_ldap_auth" work with squid-2.4stable1 ?
Sure. Any Squid version in fact. The method Squid uses to verify
passwords haven't changed in many many years, only the list of available
helpers changes.
> 2. do you plan to have the LDAP port argument besides the default port
> 389 ?
Good idea. Patch attached.
Note: The patch changes the meaning of -p to match the openldap tools
(port number). The persistent connection option is now -P.
-- Henrik
? a.out
Index: squid_ldap_auth.8
===================================================================
RCS file: /server/cvs-server/squid/squid/src/auth/basic/helpers/LDAP/squid_ldap_auth.8,v
retrieving revision 1.3
diff -u -w -r1.3 squid_ldap_auth.8
--- squid_ldap_auth.8 2001/05/10 07:29:01 1.3
+++ squid_ldap_auth.8 2001/09/05 07:50:31
@@ -51,7 +51,7 @@
This to limit the damage in case someone could get hold of a copy of your
Squid configuration file.
.TP
-.BI -p
+.BI -P
Use a persistent LDAP connection. Normally the LDAP connection
is only open while validating a username to preserve resources
at the LDAP server. This option causes the LDAP connection to
@@ -72,6 +72,9 @@
or only to
.B find
the base object
+.TP
+.BI -p " ldapport"
+Specify an alternate TCP port where the ldap server is listening
.
.SH EXAMPLES
For directories using the RFC2307 layout with a single domain, all
Index: squid_ldap_auth.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/auth/basic/helpers/LDAP/squid_ldap_auth.c,v
retrieving revision 1.14
diff -u -w -r1.14 squid_ldap_auth.c
--- squid_ldap_auth.c 2001/08/16 00:16:20 1.14
+++ squid_ldap_auth.c 2001/09/05 07:50:33
@@ -112,6 +112,7 @@
char *ldapServer;
LDAP *ld = NULL;
int tryagain;
+ int port = LDAP_PORT;
setbuf(stdout, NULL);
@@ -119,7 +120,7 @@
char *value = "";
char option = argv[1][1];
switch (option) {
- case 'p':
+ case 'P':
case 'R':
break;
default:
@@ -176,9 +177,12 @@
case 'w':
bindpasswd = value;
break;
- case 'p':
+ case 'P':
persistent = !persistent;
break;
+ case 'p':
+ port = atoi(value);
+ break;
case 'R':
noreferrals = !noreferrals;
break;
@@ -221,9 +225,9 @@
tryagain = 1;
recover:
if (ld == NULL) {
- if ((ld = ldap_init(ldapServer, LDAP_PORT)) == NULL) {
+ if ((ld = ldap_init(ldapServer, port)) == NULL) {
fprintf(stderr, "\nUnable to connect to LDAP server:%s port:%d\n",
- ldapServer, LDAP_PORT);
+ ldapServer, port);
exit(1);
}
squid_ldap_set_referrals(ld, !noreferrals);
Received on Wed Sep 05 2001 - 02:03:48 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:03 MST