-Controlul accesului a prevenit cererea d-voastrã
-de a fi acceptatã la acest moment. Vã rugãm contactaþi
-providerul d-voastrã daca credeþi cã acest lucru
-este incorect.
+Controlul accesului a prevenit cererea d-voastrã de a fi
+acceptatã la acest moment. Vã rugãm contactaþi providerul
+d-voastrã daca credeþi cã acest lucru este incorect.
-
+
-Aveti nevoie de Netscape versiunea 2.0 sau mai mare, sau Microsoft
+Aveþi nevoie de Netscape versiunea 2.0 sau mai mare, sau Microsoft
Internet Explorer 3.0, sau un browser care cunoaºte HTTP/1.1 pentru
a vã putea autentica. Vã rugãm contactaþi
administratorul cache-ului daca aveþi dificultãþi în autentificare
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_CACHE_MGR_ACCESS_DENIED squid-2.5.STABLE10/errors/Romanian/ERR_CACHE_MGR_ACCESS_DENIED
--- squid-2.5.STABLE9/errors/Romanian/ERR_CACHE_MGR_ACCESS_DENIED Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_CACHE_MGR_ACCESS_DENIED Wed Apr 27 16:28:24 2005
@@ -1,11 +1,10 @@
-
+
-Aveti nevoie de Netscape versiunea 2.0 sau mai mare, sau Microsoft
+Aveþi nevoie de Netscape versiunea 2.0 sau mai mare, sau Microsoft
Internet Explorer 3.0, sau un browser care cunoaºte HTTP/1.1 pentru
a vã putea autentica. Vã rugãm contactaþi
administratorul cache-ului daca aveþi dificultãþi în autentificare
sau, dacã sunteþi administratorul, citiþi în documentaþia
Squid-ului secþiunea despre interfaþa managerului de cache ºi
verificaþi logurile pentru mesaje de eroare mai detaliate.
-
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_CANNOT_FORWARD squid-2.5.STABLE10/errors/Romanian/ERR_CANNOT_FORWARD
--- squid-2.5.STABLE9/errors/Romanian/ERR_CANNOT_FORWARD Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_CANNOT_FORWARD Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
Calculatorul sau reþeaua destinaþie s-ar putea sã fie inoperabile.
-Repetaþi cererea mai târziu.
-
+Vã rog repetaþi cererea.
+
Serverul de DNS a returnat:
@@ -30,4 +28,4 @@
Cache-ul nu a putut rezolva numele host-ului scris în URL.
Verificaþi dacã adresa este corectã.
-
+
@@ -23,4 +22,4 @@
Acest cache nu va înainta cererea dumneavoastrã din cauzã cã încearcã
sã stabileascã o relaþie de echivalenþã. Poate cã clientul %i este un
cache care a fost configurat greºit.
-
+
-Acest lucru ar putea fi cauzat de un URL FTP cu o cale absolutã
-(fapt care nu este coform cu standardul RFC 1738). Dacã aceasta
-este cauza, atunci fiºierul poate fi gãsit la adresa
-%B.
-
+
-An FTP authentication failure occurred
-while trying to retrieve the URL:
+O eroare de autentificare FTP s-a întâmplat
+în timp ce încercam sã citesc URL-ul:
%U
-Squid sent the following FTP command:
+Squid a trimis urmãtoarea comandã FTP:
-The following URL could not be retrieved:
+Urmãtorul URL nu a putut fi citit:
%U
-Squid sent the following FTP command:
+Squid a trimis urmãtoarea comandã FTP:
-This might be caused by an FTP URL with an absolute path (which does
-not comply with RFC 1738). If this is the cause, then the file
-can be found at %B.
-
@@ -25,4 +24,4 @@
Verificaþi calea, drepturile, spaþiul liber ºi
încercaþi din nou.
-
+
-The FTP server was too busy while trying to retrieve the URL:
+Serverul de FTP a fost prea ocupat în timp ce am încercat sã
+citesc URL-ul:
%U
-Squid sent the following FTP command:
+Squid a trimis urmãtoarea comandã FTP:
-While trying to process the request:
+În timp ce încercam sã procesez cererea:
-The HTTP Response message received from the contacted server
-could not be understood or was otherwise malformed. Please contact
-the site operator. Your cache administrator may be able to provide
-you with more details about the exact nature of the problem if needed.
+Mesajul de rãspuns HTTP primit de la serverul contactat
+nu a putut fi înþeles sau a fost deformat. Vã rog sã contactaþi
+operatorul serverului. Administratorul proxy-ului s-ar putea
+sã vã fie de ajutor cu mai multe detalii despre natura exactã a
+aceastei probleme dacã vã este necesar.
-
Caracter(e) ilegal în numele calculatorului; underscore (_) nu este acceptat
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_LIFETIME_EXP squid-2.5.STABLE10/errors/Romanian/ERR_LIFETIME_EXP
--- squid-2.5.STABLE9/errors/Romanian/ERR_LIFETIME_EXP Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_LIFETIME_EXP Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -15,11 +14,11 @@
-
-Durate de viaþã a conexiunii a expirat
+Durata de viaþã a conexiunii a expirat
Squid a terminat conexiunea din cauzã cã a depãºit durata maximã
admisã pentru o conexiune.
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_NO_RELAY squid-2.5.STABLE10/errors/Romanian/ERR_NO_RELAY
--- squid-2.5.STABLE9/errors/Romanian/ERR_NO_RELAY Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_NO_RELAY Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -21,4 +20,4 @@
Nu este definit nici un calculator relay Wais pentru acest cache! Strigaþi la administrator!
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_ONLY_IF_CACHED_MISS squid-2.5.STABLE10/errors/Romanian/ERR_ONLY_IF_CACHED_MISS
--- squid-2.5.STABLE9/errors/Romanian/ERR_ONLY_IF_CACHED_MISS Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_ONLY_IF_CACHED_MISS Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -15,15 +14,17 @@
-
-Un document cu cale corectã de altfel nu a fost gãsit în cache ºi
-directiva
only-if-cached
(numai dacã este deja în cache)
+Un document valid nu a fost gãsit în cache ºi directiva
+only-if-cached
(numai dacã este deja în cache)
a fost specificatã.
-Aþi cerut un document cu directiva only-if-cached
+
+Aþi cerut un document cu directiva de control only-if-cached
(numai dacã existã deja în cache). Documentul nu a fost gãsit în
-cache, sau a necesitat o revalidare, revalidare interzisã
+cache, sau a necesitat o revalidare interzisã
de directivaonly-if-cached
.
-
+
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_READ_ERROR squid-2.5.STABLE10/errors/Romanian/ERR_READ_ERROR
--- squid-2.5.STABLE9/errors/Romanian/ERR_READ_ERROR Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_READ_ERROR Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -26,4 +25,4 @@
O condiþie de eroare în timp ce citeam date din reþea. Vã rog
retrimiteþi cererea.
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_READ_TIMEOUT squid-2.5.STABLE10/errors/Romanian/ERR_READ_TIMEOUT
--- squid-2.5.STABLE9/errors/Romanian/ERR_READ_TIMEOUT Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_READ_TIMEOUT Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -27,4 +26,4 @@
O depãºire de duratã s-a întâmplat îm timp ce citeam date din reþea.
Serverul sau reþeaua ar putea fi inpoerabile sau congestionate. Încercaþi
din nou.
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_SHUTTING_DOWN squid-2.5.STABLE10/errors/Romanian/ERR_SHUTTING_DOWN
--- squid-2.5.STABLE9/errors/Romanian/ERR_SHUTTING_DOWN Wed Aug 28 15:08:09 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_SHUTTING_DOWN Wed Apr 27 16:28:24 2005
@@ -1,19 +1,18 @@
-
-ERROR: The requested URL could not be retrieved
+
+EROARE: URL-ul cerut nu a putut fi citit
-ERROR
-The requested URL could not be retrieved
+EROARE
+URL-ul cerut nu a putut fi citit
-While trying to retrieve the URL:
+În timp ce citeam URL-ul:
%U
-The following error was encountered:
-
+Am întâlnit urmãtoarea eroare:
-This cache is in the process of shutting down and can not
-service your request at this time. Please retry your
-request again soon.
-
+Acest cache este în curs de oprire ºi nu poate servi
+cererea d-voastrã în acest moment. Vã rog sã reîncercaþi
+în curând.
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_SOCKET_FAILURE squid-2.5.STABLE10/errors/Romanian/ERR_SOCKET_FAILURE
--- squid-2.5.STABLE9/errors/Romanian/ERR_SOCKET_FAILURE Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_SOCKET_FAILURE Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -25,5 +24,5 @@
Squid nu a reuºit sã creeze un socket TCP, probabil din cauza încãrcãrii
-excesive. Încercaþi mai târziu.
-
+excesive. Încercaþi mai târziu.
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_TOO_BIG squid-2.5.STABLE10/errors/Romanian/ERR_TOO_BIG
--- squid-2.5.STABLE9/errors/Romanian/ERR_TOO_BIG Wed Aug 28 15:08:09 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_TOO_BIG Wed Apr 27 16:28:24 2005
@@ -1,28 +1,29 @@
-
-ERROR: The requested URL could not be retrieved
+
+EROARE: URL-ul cerut nu a putut fi citit
-ERROR
-The requested URL could not be retrieved
+EROARE
+URL-ul cerut nu a putut fi citit
-While trying to retrieve the URL:
+În timp ce citeam URL-ul:
%U
-The following error was encountered:
+Am întâlnit urmãtoarea eroare:
-
-The request or reply is too large.
+Cererea sau rãspunsul sunt prea mari.
-If you are making a POST or PUT request, then your request body
-(the thing you are trying to upload) is too large. If you are
-making a GET request, then the reply body (what you are trying
-to download) is too large. These limits have been established
-by the Internet Service Provider who operates this cache. Please
-contact them directly if you feel this is an error.
+Dacã faceþi o cerere de tipul POST sau PUT, atunci conþinutul
+cererii d-voastre (datele care încercaþi sã le trimiteþi) sunt
+prea mari. Dacã faceþi o cerere de tipul GET, atunci rãspunsul
+serverului (ceaa ce încercaþi sã aduceþi) este prea mare. Aceste
+limite au fost stabilite de cãtre providerul de internet (ISP-ul)
+care administreazã acest cache. Va rugãm sã îi contactaþi direct
+dacã consideraþi cã acest lucru este o eroare.
-Your cache administrator is %w.
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_UNSUP_REQ squid-2.5.STABLE10/errors/Romanian/ERR_UNSUP_REQ
--- squid-2.5.STABLE9/errors/Romanian/ERR_UNSUP_REQ Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_UNSUP_REQ Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -22,4 +21,4 @@
Squid nu suportã toate cererile sub toate protocoalele.
De exemplu, nu puteþi sã POST o cerere Gopher.
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_URN_RESOLVE squid-2.5.STABLE10/errors/Romanian/ERR_URN_RESOLVE
--- squid-2.5.STABLE9/errors/Romanian/ERR_URN_RESOLVE Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_URN_RESOLVE Wed Apr 27 16:28:24 2005
@@ -1,14 +1,13 @@
-
-EROARE: URL-ul cerut nu a putut fi citit
-
+
+EROARE: URN-ul cerut nu a putut fi citit
-ERROR
-URL-ul cerut nu a putut fi citit
+EROARE
+Un URL pentru URN-ul cerut nu a putut fi citit
-În timp ce citeam URL-ul:
+În timp ce citeam URN-ul:
%U
Am întâlnit urmãtoarea eroare:
@@ -21,4 +20,4 @@
Hei, nu te aºtepta la prea multe de la URN-uri pe %T :)
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_WRITE_ERROR squid-2.5.STABLE10/errors/Romanian/ERR_WRITE_ERROR
--- squid-2.5.STABLE9/errors/Romanian/ERR_WRITE_ERROR Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_WRITE_ERROR Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -24,6 +23,6 @@
%E
-O condiþie de eroare a survenit în timp ce scriam date în reþea. Reîncercaþi
-operaþia.
-
+O condiþie de eroare a survenit în timp ce scriam date în reþea. Vã rog
+reîncercaþi operaþia.
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/ERR_ZERO_SIZE_OBJECT squid-2.5.STABLE10/errors/Romanian/ERR_ZERO_SIZE_OBJECT
--- squid-2.5.STABLE9/errors/Romanian/ERR_ZERO_SIZE_OBJECT Mon Aug 26 19:17:21 2002
+++ squid-2.5.STABLE10/errors/Romanian/ERR_ZERO_SIZE_OBJECT Wed Apr 27 16:28:24 2005
@@ -1,10 +1,9 @@
-
+
EROARE: URL-ul cerut nu a putut fi citit
-
-ERROR
+EROARE
URL-ul cerut nu a putut fi citit
@@ -21,4 +20,4 @@
Squid nu a recepþionat nici o informaþie ca urmare a acestei cereri.
-
+Administratorul cache-ului d-voastrã este %w.
diff -ruN squid-2.5.STABLE9/errors/Romanian/README squid-2.5.STABLE10/errors/Romanian/README
--- squid-2.5.STABLE9/errors/Romanian/README Thu Jan 14 16:59:12 1999
+++ squid-2.5.STABLE10/errors/Romanian/README Wed Apr 27 16:28:24 2005
@@ -1,2 +1,2 @@
-Thank you to Iusty Pop Daniel for
+Thank you to Iustin Pop Daniel for
creating these error pages in Romanian!
diff -ruN squid-2.5.STABLE9/helpers/Makefile.in squid-2.5.STABLE10/helpers/Makefile.in
--- squid-2.5.STABLE9/helpers/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/Makefile.in Fri Mar 18 17:55:41 2005
@@ -80,6 +80,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/LDAP/Makefile.am squid-2.5.STABLE10/helpers/basic_auth/LDAP/Makefile.am
--- squid-2.5.STABLE9/helpers/basic_auth/LDAP/Makefile.am Sun Aug 11 19:13:37 2002
+++ squid-2.5.STABLE10/helpers/basic_auth/LDAP/Makefile.am Fri Mar 18 17:53:55 2005
@@ -1,7 +1,7 @@
#
# Makefile for the Squid LDAP authentication helper
#
-# $Id: Makefile.am,v 1.1.2.4 2002/08/12 01:13:37 hno Exp $
+# $Id: Makefile.am,v 1.1.2.5 2005/03/19 00:53:55 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -11,5 +11,5 @@
EXTRA_DIST = squid_ldap_auth.8
squid_ldap_auth_SOURCES = squid_ldap_auth.c
-LDADD = -L$(top_builddir)/lib -lmiscutil -lldap -llber $(XTRA_LIBS)
+LDADD = -L$(top_builddir)/lib -lmiscutil -lldap $(LIB_LBER) $(XTRA_LIBS)
INCLUDES = -I$(top_srcdir)/include
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/LDAP/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/LDAP/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/LDAP/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/LDAP/Makefile.in Fri Mar 18 17:55:41 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid LDAP authentication helper
#
-# $Id: Makefile.in,v 1.8.2.13 2004/07/10 12:11:41 hno Exp $
+# $Id: Makefile.in,v 1.8.2.14 2005/03/19 00:55:41 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
@@ -127,7 +128,7 @@
EXTRA_DIST = squid_ldap_auth.8
squid_ldap_auth_SOURCES = squid_ldap_auth.c
-LDADD = -L$(top_builddir)/lib -lmiscutil -lldap -llber $(XTRA_LIBS)
+LDADD = -L$(top_builddir)/lib -lmiscutil -lldap $(LIB_LBER) $(XTRA_LIBS)
INCLUDES = -I$(top_srcdir)/include
subdir = helpers/basic_auth/LDAP
mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/LDAP/squid_ldap_auth.c squid-2.5.STABLE10/helpers/basic_auth/LDAP/squid_ldap_auth.c
--- squid-2.5.STABLE9/helpers/basic_auth/LDAP/squid_ldap_auth.c Sun Feb 20 12:07:44 2005
+++ squid-2.5.STABLE10/helpers/basic_auth/LDAP/squid_ldap_auth.c Fri Apr 22 14:29:29 2005
@@ -252,15 +252,24 @@
if (version == -1) {
version = LDAP_VERSION2;
}
- if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version)
- != LDAP_OPT_SUCCESS) {
+ if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version) != LDAP_SUCCESS) {
fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
version);
exit(1);
}
- if (use_tls && (version == LDAP_VERSION3) && (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)) {
- fprintf(stderr, "Could not Activate TLS connection\n");
+ if (use_tls) {
+#ifdef LDAP_OPT_X_TLS
+ if (version == LDAP_VERSION3 && ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) {
+ fprintf(stderr, "Could not Activate TLS connection\n");
+ exit(1);
+ } else {
+ fprintf(stderr, "TLS requires LDAP version 3\n");
+ exit(1);
+ }
+#else
+ fprintf(stderr, "TLS not supported with your LDAP library\n");
exit(1);
+#endif
}
#endif
squid_ldap_set_timelimit(ld, timelimit);
@@ -516,7 +525,7 @@
rfc1738_unescape(user);
rfc1738_unescape(passwd);
if (!validUsername(user)) {
- printf("ERR\n");
+ printf("ERR No such user\n");
continue;
}
tryagain = (ld != NULL);
@@ -530,7 +539,7 @@
ld = NULL;
goto recover;
}
- printf("ERR\n");
+ printf("ERR %s\n", ldap_err2string(squid_ldap_errno(ld)));
} else {
printf("OK\n");
}
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/MSNT/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/MSNT/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/MSNT/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/MSNT/Makefile.in Fri Mar 18 17:55:41 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.7.2.15 2004/07/10 12:11:41 hno Exp $
+# $Id: Makefile.in,v 1.7.2.16 2005/03/19 00:55:41 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/MSNT/rfcnb-util.c squid-2.5.STABLE10/helpers/basic_auth/MSNT/rfcnb-util.c
--- squid-2.5.STABLE9/helpers/basic_auth/MSNT/rfcnb-util.c Wed Jun 26 13:11:16 2002
+++ squid-2.5.STABLE10/helpers/basic_auth/MSNT/rfcnb-util.c Wed Mar 9 07:28:32 2005
@@ -410,7 +410,7 @@
RFCNB_saved_errno = errno;
return (RFCNBE_Bad);
}
- bzero((char *) &Socket, sizeof(Socket));
+ memset((char *) &Socket, 0, sizeof(Socket));
memcpy((char *) &Socket.sin_addr, (char *) &Dest_IP, sizeof(Dest_IP));
Socket.sin_port = htons(port);
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/MSNT/smbencrypt.c squid-2.5.STABLE10/helpers/basic_auth/MSNT/smbencrypt.c
--- squid-2.5.STABLE9/helpers/basic_auth/MSNT/smbencrypt.c Wed Jun 26 13:11:17 2002
+++ squid-2.5.STABLE10/helpers/basic_auth/MSNT/smbencrypt.c Wed Mar 9 07:33:01 2005
@@ -158,7 +158,7 @@
E_P16((uchar *) passwd, (uchar *) p16);
/* clear out local copy of user's password (just being paranoid). */
- bzero(passwd, sizeof(passwd));
+ memset(passwd, 0, sizeof(passwd));
}
/****************************************************************************
@@ -194,16 +194,16 @@
} else if (is_kana(*s)) {
s++;
} else {
- if (islower(*s))
- *s = toupper(*s);
+ if (islower((int)(unsigned char)*s))
+ *s = toupper((int)(unsigned char)*s);
s++;
}
} else
#endif /* KANJI_WIN95_COMPATIBILITY */
#endif /* UNUSED_CODE */
{
- if (islower(*s))
- *s = toupper(*s);
+ if (islower((int)(unsigned char)*s))
+ *s = toupper((int)(unsigned char)*s);
s++;
}
}
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/MSNT/smblib-util.c squid-2.5.STABLE10/helpers/basic_auth/MSNT/smblib-util.c
--- squid-2.5.STABLE9/helpers/basic_auth/MSNT/smblib-util.c Wed Jun 26 13:11:17 2002
+++ squid-2.5.STABLE10/helpers/basic_auth/MSNT/smblib-util.c Fri Mar 25 19:50:50 2005
@@ -146,7 +146,7 @@
}
/* Now plug in the bits we need */
- bzero(SMB_Hdr(pkt), SMB_negp_len);
+ memset(SMB_Hdr(pkt), 0, SMB_negp_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBnegprot;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
@@ -255,7 +255,6 @@
Con_Handle->Encrypt_Key_Len = SVAL(SMB_Hdr(pkt), SMB_negrLM_ekl_offset);
p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset);
- fprintf(stderr, "%d", (int) (SMB_Hdr(pkt) + SMB_negrLM_buf_offset));
memcpy(Con_Handle->Encrypt_Key, p, 8);
p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset + Con_Handle->Encrypt_Key_Len);
@@ -397,7 +396,7 @@
/* Now plug in the values ... */
- bzero(SMB_Hdr(pkt), SMB_tcon_len);
+ memset(SMB_Hdr(pkt), 0, SMB_tcon_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtcon;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/MSNT/smblib.c squid-2.5.STABLE10/helpers/basic_auth/MSNT/smblib.c
--- squid-2.5.STABLE9/helpers/basic_auth/MSNT/smblib.c Wed Jun 26 13:11:17 2002
+++ squid-2.5.STABLE10/helpers/basic_auth/MSNT/smblib.c Wed Mar 9 07:28:32 2005
@@ -330,7 +330,7 @@
return (SMBlibE_BAD); /* Should handle the error */
}
- bzero(SMB_Hdr(pkt), SMB_ssetpLM_len);
+ memset(SMB_Hdr(pkt), 0, SMB_ssetpLM_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
@@ -393,7 +393,7 @@
return (-1); /* Should handle the error */
}
- bzero(SMB_Hdr(pkt), SMB_ssetpNTLM_len);
+ memset(SMB_Hdr(pkt), 0, SMB_ssetpNTLM_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/Makefile.in Fri Mar 18 17:55:41 2005
@@ -15,7 +15,7 @@
# Makefile for storage modules in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.7.2.12 2004/07/10 12:11:41 hno Exp $
+# $Id: Makefile.in,v 1.7.2.13 2005/03/19 00:55:41 hno Exp $
#
SHELL = @SHELL@
@@ -85,6 +85,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/NCSA/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/NCSA/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/NCSA/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/NCSA/Makefile.in Fri Mar 18 17:55:43 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.8.2.11 2004/07/10 12:11:41 hno Exp $
+# $Id: Makefile.in,v 1.8.2.12 2005/03/19 00:55:43 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/NCSA/ncsa_auth.c squid-2.5.STABLE10/helpers/basic_auth/NCSA/ncsa_auth.c
--- squid-2.5.STABLE9/helpers/basic_auth/NCSA/ncsa_auth.c Sat Sep 25 14:53:17 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/NCSA/ncsa_auth.c Fri Apr 22 14:29:29 2005
@@ -138,9 +138,9 @@
rfc1738_unescape(passwd);
u = hash_lookup(hash, user);
if (u == NULL) {
- printf("ERR\n");
+ printf("ERR No such user\n");
} else if (strcmp(u->passwd, (char *) crypt(passwd, u->passwd))) {
- printf("ERR\n");
+ printf("ERR Wrong password\n");
} else {
printf("OK\n");
}
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/PAM/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/PAM/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/PAM/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/PAM/Makefile.in Fri Mar 18 17:55:43 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid PAM authentication helper
#
-# $Id: Makefile.in,v 1.7.2.13 2004/07/10 12:11:41 hno Exp $
+# $Id: Makefile.in,v 1.7.2.14 2005/03/19 00:55:43 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/SASL/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/SASL/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/SASL/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/SASL/Makefile.in Fri Mar 18 17:55:44 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid SASL authentication helper
#
-# $Id: Makefile.in,v 1.1.2.17 2004/07/10 12:11:41 hno Exp $
+# $Id: Makefile.in,v 1.1.2.18 2005/03/19 00:55:44 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/SMB/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/SMB/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/SMB/Makefile.in Sat Jul 10 06:11:41 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/SMB/Makefile.in Fri Mar 18 17:55:45 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.7.2.13 2004/07/10 12:11:41 hno Exp $
+# $Id: Makefile.in,v 1.7.2.14 2005/03/19 00:55:45 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -93,6 +93,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/YP/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/YP/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/YP/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/YP/Makefile.in Fri Mar 18 17:55:46 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.9.2.12 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.9.2.13 2005/03/19 00:55:46 hno Exp $
#
#
@@ -87,6 +87,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/YP/yp_auth.c squid-2.5.STABLE10/helpers/basic_auth/YP/yp_auth.c
--- squid-2.5.STABLE9/helpers/basic_auth/YP/yp_auth.c Sun Aug 11 19:13:47 2002
+++ squid-2.5.STABLE10/helpers/basic_auth/YP/yp_auth.c Sun Apr 24 10:28:16 2005
@@ -71,13 +71,13 @@
if (!nispasswd) {
/* User does not exist */
- printf("ERR\n");
+ printf("ERR No such user\n");
} else if (strcmp(nispasswd, (char *) crypt(passwd, nispasswd)) == 0) {
/* All ok !, thanks... */
printf("OK\n");
} else {
/* Password incorrect */
- printf("ERR\n");
+ printf("ERR Wrong password\n");
}
}
exit(0);
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/getpwnam/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/getpwnam/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/getpwnam/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/getpwnam/Makefile.in Fri Mar 18 17:55:46 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.8.2.11 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.8.2.12 2005/03/19 00:55:46 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/getpwnam/getpwnam_auth.c squid-2.5.STABLE10/helpers/basic_auth/getpwnam/getpwnam_auth.c
--- squid-2.5.STABLE9/helpers/basic_auth/getpwnam/getpwnam_auth.c Sun Aug 11 19:13:47 2002
+++ squid-2.5.STABLE10/helpers/basic_auth/getpwnam/getpwnam_auth.c Sun Apr 24 10:28:16 2005
@@ -70,10 +70,10 @@
rfc1738_unescape(passwd);
pwd = getpwnam(user);
if (pwd == NULL) {
- printf(ERR);
+ printf("ERR No such user\n");
} else {
if (strcmp(pwd->pw_passwd, (char *) crypt(passwd, pwd->pw_passwd))) {
- printf(ERR);
+ printf("ERR Wrong password\n");
} else {
printf(OK);
}
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/multi-domain-NTLM/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/multi-domain-NTLM/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/multi-domain-NTLM/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/multi-domain-NTLM/Makefile.in Fri Mar 18 17:55:46 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.5.2.12 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.5.2.13 2005/03/19 00:55:46 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/winbind/Makefile.in squid-2.5.STABLE10/helpers/basic_auth/winbind/Makefile.in
--- squid-2.5.STABLE9/helpers/basic_auth/winbind/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/basic_auth/winbind/Makefile.in Fri Mar 18 17:55:46 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.1.2.13 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.1.2.14 2005/03/19 00:55:46 hno Exp $
#
SHELL = @SHELL@
@@ -86,6 +86,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/basic_auth/winbind/wbntlm.h squid-2.5.STABLE10/helpers/basic_auth/winbind/wbntlm.h
--- squid-2.5.STABLE9/helpers/basic_auth/winbind/wbntlm.h Sun Feb 20 12:07:44 2005
+++ squid-2.5.STABLE10/helpers/basic_auth/winbind/wbntlm.h Wed Mar 9 07:30:37 2005
@@ -48,7 +48,7 @@
#endif
#ifdef __GNUC__ /* this is really a gcc-ism */
-#define warn(X...) fprintf(stderr,"%s[%d](%s:%d): ", myname, mypid, \
+#define warn(X...) fprintf(stderr,"%s[%ld](%s:%d): ", myname, (long)mypid, \
((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
__LINE__);\
fprintf(stderr,X)
diff -ruN squid-2.5.STABLE9/helpers/digest_auth/Makefile.in squid-2.5.STABLE10/helpers/digest_auth/Makefile.in
--- squid-2.5.STABLE9/helpers/digest_auth/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/digest_auth/Makefile.in Fri Mar 18 17:55:47 2005
@@ -15,7 +15,7 @@
# Makefile for digest auth helpers in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.6.2.10 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.6.2.11 2005/03/19 00:55:47 hno Exp $
#
SHELL = @SHELL@
@@ -85,6 +85,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/digest_auth/password/Makefile.in squid-2.5.STABLE10/helpers/digest_auth/password/Makefile.in
--- squid-2.5.STABLE9/helpers/digest_auth/password/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/digest_auth/password/Makefile.in Fri Mar 18 17:55:48 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.8.2.10 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.8.2.11 2005/03/19 00:55:48 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/digest_auth/password/digest_pw_auth.c squid-2.5.STABLE10/helpers/digest_auth/password/digest_pw_auth.c
--- squid-2.5.STABLE9/helpers/digest_auth/password/digest_pw_auth.c Wed Oct 16 22:55:48 2002
+++ squid-2.5.STABLE10/helpers/digest_auth/password/digest_pw_auth.c Fri Apr 22 14:29:29 2005
@@ -149,7 +149,7 @@
}
u = hash_lookup(hash, user);
if (u == NULL) {
- printf("ERR\n");
+ printf("ERR No such user\n");
} else {
DigestCalcHA1("md5", user, realm, u->passwd, NULL, NULL, HA1, HHA1);
printf("%s\n", HHA1);
diff -ruN squid-2.5.STABLE9/helpers/external_acl/Makefile.in squid-2.5.STABLE10/helpers/external_acl/Makefile.in
--- squid-2.5.STABLE9/helpers/external_acl/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/external_acl/Makefile.in Fri Mar 18 17:55:48 2005
@@ -15,7 +15,7 @@
# Makefile for storage modules in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.2.2.7 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.2.2.8 2005/03/19 00:55:48 hno Exp $
#
SHELL = @SHELL@
@@ -85,6 +85,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/external_acl/ip_user/Makefile.in squid-2.5.STABLE10/helpers/external_acl/ip_user/Makefile.in
--- squid-2.5.STABLE9/helpers/external_acl/ip_user/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/external_acl/ip_user/Makefile.in Fri Mar 18 17:55:49 2005
@@ -16,7 +16,7 @@
#
# Makefile for the ip_user external_acl helper by Rodrigo Campos
#
-# $Id: Makefile.in,v 1.1.2.8 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.1.2.9 2005/03/19 00:55:49 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/external_acl/ldap_group/ChangeLog squid-2.5.STABLE10/helpers/external_acl/ldap_group/ChangeLog
--- squid-2.5.STABLE9/helpers/external_acl/ldap_group/ChangeLog Sun Nov 7 08:25:18 2004
+++ squid-2.5.STABLE10/helpers/external_acl/ldap_group/ChangeLog Tue Mar 22 15:45:27 2005
@@ -1,3 +1,22 @@
+Version 2.17-2.5
+
+2005-03-19 Henrik Nordstrom
+
+ Bug #1258: LDAP helpers fails to compile with SUN LDAP SDK
+
+2005-02-05 Henrik Nordstrom
+
+ Define LDAP_NO_ATTRS if not defined in LDAP API headers
+
+2005-02-04 Henrik Nordstrom
+
+ Fix LDAP helpers to send a proper NO_ATTR search when looking
+ for the user DN
+
+2005-01-30 Oliver Hookins
+
+ LDAP helper documentation updates
+
Version 2.16-2.5
2004-10-21 Henrik Nordstrom
diff -ruN squid-2.5.STABLE9/helpers/external_acl/ldap_group/Makefile.am squid-2.5.STABLE10/helpers/external_acl/ldap_group/Makefile.am
--- squid-2.5.STABLE9/helpers/external_acl/ldap_group/Makefile.am Wed Dec 11 17:23:30 2002
+++ squid-2.5.STABLE10/helpers/external_acl/ldap_group/Makefile.am Fri Mar 18 17:54:10 2005
@@ -1,7 +1,7 @@
#
# Makefile for the Squid LDAP authentication helper
#
-# $Id: Makefile.am,v 1.1.2.3 2002/12/12 00:23:30 hno Exp $
+# $Id: Makefile.am,v 1.1.2.4 2005/03/19 00:54:10 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -11,4 +11,4 @@
EXTRA_DIST = squid_ldap_group.8
squid_ldap_group_SOURCES = squid_ldap_group.c
-LDADD = -lldap -llber $(XTRA_LIBS)
+LDADD = -lldap $(LIB_LBER) $(XTRA_LIBS)
diff -ruN squid-2.5.STABLE9/helpers/external_acl/ldap_group/Makefile.in squid-2.5.STABLE10/helpers/external_acl/ldap_group/Makefile.in
--- squid-2.5.STABLE9/helpers/external_acl/ldap_group/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/external_acl/ldap_group/Makefile.in Fri Mar 18 17:55:49 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid LDAP authentication helper
#
-# $Id: Makefile.in,v 1.1.2.10 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.1.2.11 2005/03/19 00:55:49 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
@@ -127,7 +128,7 @@
EXTRA_DIST = squid_ldap_group.8
squid_ldap_group_SOURCES = squid_ldap_group.c
-LDADD = -lldap -llber $(XTRA_LIBS)
+LDADD = -lldap $(LIB_LBER) $(XTRA_LIBS)
subdir = helpers/external_acl/ldap_group
mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/autoconf.h
diff -ruN squid-2.5.STABLE9/helpers/external_acl/ldap_group/squid_ldap_group.8 squid-2.5.STABLE10/helpers/external_acl/ldap_group/squid_ldap_group.8
--- squid-2.5.STABLE9/helpers/external_acl/ldap_group/squid_ldap_group.8 Sun Jan 30 12:28:56 2005
+++ squid-2.5.STABLE10/helpers/external_acl/ldap_group/squid_ldap_group.8 Tue Mar 22 15:54:27 2005
@@ -1,4 +1,4 @@
-.TH squid_ldap_group 8 "14 January 2005" "Squid LDAP Group"
+.TH squid_ldap_group 8 "30 January 2005" "Version 2.17-2.5"
.
.SH NAME
squid_ldap_group - Squid LDAP external acl group helper
diff -ruN squid-2.5.STABLE9/helpers/external_acl/ldap_group/squid_ldap_group.c squid-2.5.STABLE10/helpers/external_acl/ldap_group/squid_ldap_group.c
--- squid-2.5.STABLE9/helpers/external_acl/ldap_group/squid_ldap_group.c Sat Feb 5 03:53:07 2005
+++ squid-2.5.STABLE10/helpers/external_acl/ldap_group/squid_ldap_group.c Tue Mar 22 15:54:27 2005
@@ -44,6 +44,7 @@
#endif
#define PROGRAM_NAME "squid_ldap_group"
+#define VERSION "2.17-2.5"
/* Globals */
@@ -401,6 +402,7 @@
ldapServer = "localhost";
if (!basedn || !searchfilter) {
+ fprintf(stderr, "\n" PROGRAM_NAME " version " VERSION "\n\n");
fprintf(stderr, "Usage: " PROGRAM_NAME " -b basedn -f filter [options] ldap_server_name\n\n");
fprintf(stderr, "\t-b basedn (REQUIRED)\tbase dn under where to search for groups\n");
fprintf(stderr, "\t-f filter (REQUIRED)\tgroup search filter pattern. %%v = user,\n\t\t\t\t%%a = group\n");
@@ -488,19 +490,28 @@
if (version == -1) {
version = LDAP_VERSION2;
}
- if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version)
- != LDAP_OPT_SUCCESS) {
+ if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version) != LDAP_SUCCESS) {
fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
version);
ldap_unbind(ld);
ld = NULL;
break;
}
- if (use_tls && (version == LDAP_VERSION3) && (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)) {
- fprintf(stderr, "Could not Activate TLS connection\n");
- ldap_unbind(ld);
- ld = NULL;
- break;
+ if (use_tls) {
+#ifdef LDAP_OPT_X_TLS
+ if (version == LDAP_VERSION3 && ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) {
+ fprintf(stderr, "Could not Activate TLS connection\n");
+ ldap_unbind(ld);
+ ld = NULL;
+ break;
+ } else {
+ fprintf(stderr, "TLS requires LDAP version 3\n");
+ exit(1);
+ }
+#else
+ fprintf(stderr, "TLS not supported with your LDAP library\n");
+ exit(1);
+#endif
}
#endif
squid_ldap_set_timelimit(ld, timelimit);
diff -ruN squid-2.5.STABLE9/helpers/external_acl/unix_group/Makefile.in squid-2.5.STABLE10/helpers/external_acl/unix_group/Makefile.in
--- squid-2.5.STABLE9/helpers/external_acl/unix_group/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/external_acl/unix_group/Makefile.in Fri Mar 18 17:55:49 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid LDAP authentication helper
#
-# $Id: Makefile.in,v 1.1.2.8 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.1.2.9 2005/03/19 00:55:49 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/external_acl/wbinfo_group/Makefile.in squid-2.5.STABLE10/helpers/external_acl/wbinfo_group/Makefile.in
--- squid-2.5.STABLE9/helpers/external_acl/wbinfo_group/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/external_acl/wbinfo_group/Makefile.in Fri Mar 18 17:55:49 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid LDAP authentication helper
#
-# $Id: Makefile.in,v 1.1.2.7 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.1.2.8 2005/03/19 00:55:49 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/external_acl/winbind_group/Makefile.in squid-2.5.STABLE10/helpers/external_acl/winbind_group/Makefile.in
--- squid-2.5.STABLE9/helpers/external_acl/winbind_group/Makefile.in Sat Jul 10 06:11:42 2004
+++ squid-2.5.STABLE10/helpers/external_acl/winbind_group/Makefile.in Fri Mar 18 17:55:49 2005
@@ -16,7 +16,7 @@
#
# Makefile for the wb_group external_acl helper
#
-# $Id: Makefile.in,v 1.1.2.9 2004/07/10 12:11:42 hno Exp $
+# $Id: Makefile.in,v 1.1.2.10 2005/03/19 00:55:49 hno Exp $
#
SHELL = @SHELL@
@@ -86,6 +86,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/external_acl/winbind_group/wb_check_group.c squid-2.5.STABLE10/helpers/external_acl/winbind_group/wb_check_group.c
--- squid-2.5.STABLE9/helpers/external_acl/winbind_group/wb_check_group.c Fri Sep 12 04:11:22 2003
+++ squid-2.5.STABLE10/helpers/external_acl/winbind_group/wb_check_group.c Fri Mar 25 19:50:50 2005
@@ -364,7 +364,7 @@
if ((p = strchr(buf, '\r')) != NULL)
*p = '\0'; /* strip \r */
- debug("Got '%s' from Squid (length: %d).\n",buf,strlen(buf));
+ debug("Got '%s' from Squid (length: %d).\n",buf,(int)strlen(buf));
if (buf[0] == '\0') {
warn("Invalid Request\n");
diff -ruN squid-2.5.STABLE9/helpers/external_acl/winbind_group/wbntlm.h squid-2.5.STABLE10/helpers/external_acl/winbind_group/wbntlm.h
--- squid-2.5.STABLE9/helpers/external_acl/winbind_group/wbntlm.h Sun May 11 06:51:49 2003
+++ squid-2.5.STABLE10/helpers/external_acl/winbind_group/wbntlm.h Wed Mar 9 07:30:37 2005
@@ -50,7 +50,7 @@
#endif
#ifdef __GNUC__ /* this is really a gcc-ism */
-#define warn(X...) fprintf(stderr,"%s[%d](%s:%d): ", myname, mypid, \
+#define warn(X...) fprintf(stderr,"%s[%ld](%s:%d): ", myname, (long)mypid, \
((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
__LINE__);\
fprintf(stderr,X)
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/Makefile.in squid-2.5.STABLE10/helpers/ntlm_auth/Makefile.in
--- squid-2.5.STABLE9/helpers/ntlm_auth/Makefile.in Sat Jul 10 06:11:44 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/Makefile.in Fri Mar 18 17:55:49 2005
@@ -15,7 +15,7 @@
# Makefile for storage modules in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.7.2.12 2004/07/10 12:11:44 hno Exp $
+# $Id: Makefile.in,v 1.7.2.13 2005/03/19 00:55:49 hno Exp $
#
SHELL = @SHELL@
@@ -85,6 +85,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/Makefile.in squid-2.5.STABLE10/helpers/ntlm_auth/SMB/Makefile.in
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/Makefile.in Sat Jul 10 06:11:45 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/Makefile.in Fri Mar 18 17:55:49 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.8.2.11 2004/07/10 12:11:45 hno Exp $
+# $Id: Makefile.in,v 1.8.2.12 2005/03/19 00:55:49 hno Exp $
#
SHELL = @SHELL@
@@ -86,6 +86,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/ntlm.h squid-2.5.STABLE10/helpers/ntlm_auth/SMB/ntlm.h
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/ntlm.h Sun Feb 20 12:07:44 2005
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/ntlm.h Wed Mar 9 07:30:37 2005
@@ -53,7 +53,7 @@
static const char *__foo;
extern char debug_enabled;
#define debug(X...) if (debug_enabled) { \
- fprintf(stderr,"ntlm-auth[%d](%s:%d): ", getpid(), \
+ fprintf(stderr,"ntlm-auth[%ld](%s:%d): ", (long)getpid(), \
((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
__LINE__);\
fprintf(stderr,X); }
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/ntlm_auth.c squid-2.5.STABLE10/helpers/ntlm_auth/SMB/ntlm_auth.c
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/ntlm_auth.c Mon Jul 22 05:20:44 2002
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/ntlm_auth.c Wed Mar 9 07:30:37 2005
@@ -327,7 +327,7 @@
alarm(0);
signal(SIGALRM, SIG_DFL);
if (got_timeout != 0) {
- fprintf(stderr, "ntlm-auth[%d]: Timeout during authentication.\n", getpid());
+ fprintf(stderr, "ntlm-auth[%ld]: Timeout during authentication.\n", (long)getpid());
SEND("BH Timeout during authentication");
got_timeout = 0;
return;
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/Makefile.in squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/Makefile.in
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/Makefile.in Sun Feb 20 18:35:48 2005
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/Makefile.in Fri Mar 18 17:55:50 2005
@@ -82,6 +82,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/rfcnb-util.c squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/rfcnb-util.c
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/rfcnb-util.c Tue Feb 17 16:09:56 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/rfcnb-util.c Wed Mar 9 07:28:32 2005
@@ -384,7 +384,7 @@
RFCNB_saved_errno = errno;
return (RFCNBE_Bad);
}
- bzero((char *) &Socket, sizeof(Socket));
+ memset((char *) &Socket, 0, sizeof(Socket));
memcpy((char *) &Socket.sin_addr, (char *) &Dest_IP, sizeof(Dest_IP));
Socket.sin_port = htons(port);
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smbencrypt.c squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/smbencrypt.c
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smbencrypt.c Wed Aug 29 08:57:37 2001
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/smbencrypt.c Wed Mar 9 07:33:01 2005
@@ -149,7 +149,7 @@
E_P16((uchar *) passwd, (uchar *) p16);
/* clear out local copy of user's password (just being paranoid). */
- bzero(passwd, sizeof(passwd));
+ memset(passwd, 0, sizeof(passwd));
}
/****************************************************************************
@@ -199,7 +199,7 @@
* else
* #endif *//* KANJI_WIN95_COMPATIBILITY */
{
- if (islower(*s))
+ if (islower((int)(unsigned char)*s))
*s = toupper(*s);
s++;
}
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smblib-util.c squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/smblib-util.c
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smblib-util.c Tue Feb 17 16:09:56 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/smblib-util.c Wed Mar 9 07:28:32 2005
@@ -269,7 +269,7 @@
}
/* Now plug in the bits we need */
- bzero(SMB_Hdr(pkt), SMB_negp_len);
+ memset(SMB_Hdr(pkt), 0, SMB_negp_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBnegprot;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
@@ -520,7 +520,7 @@
/* Now plug in the values ... */
- bzero(SMB_Hdr(pkt), SMB_tcon_len);
+ memset(SMB_Hdr(pkt), 0, SMB_tcon_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtcon;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
@@ -637,7 +637,7 @@
}
/* Now plug in the values ... */
- bzero(SMB_Hdr(pkt), SMB_tdis_len);
+ memset(SMB_Hdr(pkt), 0, SMB_tdis_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtdis;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Tree_Handle->con->pid);
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smblib.c squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/smblib.c
--- squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smblib.c Tue Feb 17 16:09:56 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/SMB/smbval/smblib.c Wed Mar 9 07:28:32 2005
@@ -374,7 +374,7 @@
fprintf(stderr, "SMB_Logon_server: Couldn't allocate packet\n");
return (SMBlibE_BAD); /* Should handle the error */
}
- bzero(SMB_Hdr(pkt), SMB_ssetpLM_len);
+ memset(SMB_Hdr(pkt), 0, SMB_ssetpLM_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
@@ -437,7 +437,7 @@
fprintf(stderr, "SMB_Logon_server: Couldn't allocate packet\n");
return (-1); /* Should handle the error */
}
- bzero(SMB_Hdr(pkt), SMB_ssetpNTLM_len);
+ memset(SMB_Hdr(pkt), 0, SMB_ssetpNTLM_len);
SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF); /* Plunk in IDF */
*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/fakeauth/Makefile.in squid-2.5.STABLE10/helpers/ntlm_auth/fakeauth/Makefile.in
--- squid-2.5.STABLE9/helpers/ntlm_auth/fakeauth/Makefile.in Sat Jul 10 06:11:47 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/fakeauth/Makefile.in Fri Mar 18 17:55:50 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.8.2.10 2004/07/10 12:11:47 hno Exp $
+# $Id: Makefile.in,v 1.8.2.11 2005/03/19 00:55:50 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/fakeauth/fakeauth_auth.c squid-2.5.STABLE10/helpers/ntlm_auth/fakeauth/fakeauth_auth.c
--- squid-2.5.STABLE9/helpers/ntlm_auth/fakeauth/fakeauth_auth.c Fri Jan 7 14:12:27 2005
+++ squid-2.5.STABLE10/helpers/ntlm_auth/fakeauth/fakeauth_auth.c Wed Mar 9 07:33:01 2005
@@ -177,7 +177,7 @@
d = buf;
for (; l; l--) {
- if (*sc == '\0' || !isprint(*sc)) {
+ if (*sc == '\0' || !isprint((int)(unsigned char)*sc)) {
fprintf(stderr, "ntlmGetString: bad ascii: %04x\n", *sc);
return (NULL);
}
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/no_check/Makefile.in squid-2.5.STABLE10/helpers/ntlm_auth/no_check/Makefile.in
--- squid-2.5.STABLE9/helpers/ntlm_auth/no_check/Makefile.in Sat Jul 10 06:11:47 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/no_check/Makefile.in Fri Mar 18 17:55:50 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.8.2.12 2004/07/10 12:11:47 hno Exp $
+# $Id: Makefile.in,v 1.8.2.13 2005/03/19 00:55:50 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/winbind/Makefile.in squid-2.5.STABLE10/helpers/ntlm_auth/winbind/Makefile.in
--- squid-2.5.STABLE9/helpers/ntlm_auth/winbind/Makefile.in Sat Jul 10 06:11:47 2004
+++ squid-2.5.STABLE10/helpers/ntlm_auth/winbind/Makefile.in Fri Mar 18 17:55:50 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.1.2.13 2004/07/10 12:11:47 hno Exp $
+# $Id: Makefile.in,v 1.1.2.14 2005/03/19 00:55:50 hno Exp $
#
SHELL = @SHELL@
@@ -86,6 +86,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/helpers/ntlm_auth/winbind/wbntlm.h squid-2.5.STABLE10/helpers/ntlm_auth/winbind/wbntlm.h
--- squid-2.5.STABLE9/helpers/ntlm_auth/winbind/wbntlm.h Sun Feb 20 12:07:45 2005
+++ squid-2.5.STABLE10/helpers/ntlm_auth/winbind/wbntlm.h Wed Mar 9 07:30:38 2005
@@ -48,7 +48,7 @@
#endif
#if defined(__GNUC__) || defined(__ICC) /* this is really a gcc-ism */
-#define warn(X...) fprintf(stderr,"%s[%d](%s:%d): ", myname, mypid, \
+#define warn(X...) fprintf(stderr,"%s[%ld](%s:%d): ", myname, (long)mypid, \
((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
__LINE__);\
fprintf(stderr,X)
diff -ruN squid-2.5.STABLE9/icons/Makefile.in squid-2.5.STABLE10/icons/Makefile.in
--- squid-2.5.STABLE9/icons/Makefile.in Sat Jul 10 06:11:47 2004
+++ squid-2.5.STABLE10/icons/Makefile.in Fri Mar 18 17:55:51 2005
@@ -13,7 +13,7 @@
@SET_MAKE@
-# $Id: Makefile.in,v 1.21.2.12 2004/07/10 12:11:47 hno Exp $
+# $Id: Makefile.in,v 1.21.2.13 2005/03/19 00:55:51 hno Exp $
#
SHELL = @SHELL@
@@ -83,6 +83,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/include/autoconf.h.in squid-2.5.STABLE10/include/autoconf.h.in
--- squid-2.5.STABLE9/include/autoconf.h.in Mon Aug 9 07:55:49 2004
+++ squid-2.5.STABLE10/include/autoconf.h.in Fri Apr 22 19:32:27 2005
@@ -575,6 +575,9 @@
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
+/* Define if you have the strtoll function. */
+#undef HAVE_STRTOLL
+
/* Define if you have the sysconf function. */
#undef HAVE_SYSCONF
@@ -623,6 +626,9 @@
/* Define if you have the header file. */
#undef HAVE_FCNTL_H
+/* Define if you have the header file. */
+#undef HAVE_FNMATCH_H
+
/* Define if you have the header file. */
#undef HAVE_GETOPT_H
@@ -883,6 +889,9 @@
/* Version number of package */
#undef VERSION
+
+/* Support large cache files > 2GB */
+#undef LARGE_CACHE_FILES
/* Enable hostname sanity checks */
#undef CHECK_HOSTNAMES
diff -ruN squid-2.5.STABLE9/include/config.h squid-2.5.STABLE10/include/config.h
--- squid-2.5.STABLE9/include/config.h Sun Feb 20 04:02:56 2005
+++ squid-2.5.STABLE10/include/config.h Fri Apr 22 19:32:27 2005
@@ -1,5 +1,5 @@
/*
- * $Id: config.h,v 1.4.2.2 2005/02/20 11:02:56 hno Exp $
+ * $Id: config.h,v 1.4.2.5 2005/04/23 01:32:27 hno Exp $
*
* AUTHOR: Duane Wessels
*
@@ -130,6 +130,8 @@
#if !defined(CACHEMGR_HOSTNAME)
#define CACHEMGR_HOSTNAME ""
+#else
+#define CACHEMGR_HOSTNAME_DEFINED 1
#endif
#if SQUID_UDP_SO_SNDBUF > 16384
@@ -162,6 +164,7 @@
#define xisdigit(x) isdigit((unsigned char)x)
#define xisascii(x) isascii((unsigned char)x)
#define xislower(x) islower((unsigned char)x)
+#define xisupper(x) isupper((unsigned char)x)
#define xisalpha(x) isalpha((unsigned char)x)
#define xisalnum(x) isalnum((unsigned char)x)
#define xisgraph(x) isgraph((unsigned char)x)
diff -ruN squid-2.5.STABLE9/include/rfc1035.h squid-2.5.STABLE10/include/rfc1035.h
--- squid-2.5.STABLE9/include/rfc1035.h Wed Dec 17 18:04:22 2003
+++ squid-2.5.STABLE10/include/rfc1035.h Tue May 10 05:48:20 2005
@@ -1,5 +1,5 @@
/*
- * $Id: rfc1035.h,v 1.6.2.1 2003/12/18 01:04:22 robertc Exp $
+ * $Id: rfc1035.h,v 1.6.2.2 2005/05/10 11:48:20 hno Exp $
*
* AUTHOR: Duane Wessels
*
@@ -56,18 +56,46 @@
unsigned short rdlength;
char *rdata;
};
-extern unsigned short rfc1035BuildAQuery(const char *hostname,
+typedef struct _rfc1035_query rfc1035_query;
+struct _rfc1035_query {
+ char name[RFC1035_MAXHOSTNAMESZ];
+ unsigned short qtype;
+ unsigned short qclass;
+};
+typedef struct _rfc1035_message rfc1035_message;
+struct _rfc1035_message {
+ unsigned short id;
+ unsigned int qr:1;
+ unsigned int opcode:4;
+ unsigned int aa:1;
+ unsigned int tc:1;
+ unsigned int rd:1;
+ unsigned int ra:1;
+ unsigned int rcode:4;
+ unsigned short qdcount;
+ unsigned short ancount;
+ unsigned short nscount;
+ unsigned short arcount;
+ rfc1035_query *query;
+ rfc1035_rr *answer;
+};
+
+extern ssize_t rfc1035BuildAQuery(const char *hostname,
char *buf,
- size_t * szp);
-extern unsigned short rfc1035BuildPTRQuery(const struct in_addr,
+ size_t sz,
+ unsigned short qid,
+ rfc1035_query * query);
+extern ssize_t rfc1035BuildPTRQuery(const struct in_addr,
char *buf,
- size_t * szp);
-extern unsigned short rfc1035RetryQuery(char *);
-extern int rfc1035AnswersUnpack(const char *buf,
size_t sz,
- rfc1035_rr ** records,
- unsigned short *id);
-extern void rfc1035RRDestroy(rfc1035_rr * rr, int n);
+ unsigned short qid,
+ rfc1035_query * query);
+extern void rfc1035SetQueryID(char *, unsigned short qid);
+extern int rfc1035MessageUnpack(const char *buf,
+ size_t sz,
+ rfc1035_message ** answer);
+extern int rfc1035QueryCompare(const rfc1035_query *, const rfc1035_query *);
+extern void rfc1035MessageDestroy(rfc1035_message * message);
extern int rfc1035_errno;
extern const char *rfc1035_error_message;
diff -ruN squid-2.5.STABLE9/include/version.h squid-2.5.STABLE10/include/version.h
--- squid-2.5.STABLE9/include/version.h Wed Feb 23 16:54:54 2005
+++ squid-2.5.STABLE10/include/version.h Mon May 16 16:41:14 2005
@@ -9,5 +9,5 @@
*/
#ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1109202891
+#define SQUID_RELEASE_TIME 1116283270
#endif
diff -ruN squid-2.5.STABLE9/lib/GNUregex.c squid-2.5.STABLE10/lib/GNUregex.c
--- squid-2.5.STABLE9/lib/GNUregex.c Sun Feb 20 12:07:45 2005
+++ squid-2.5.STABLE10/lib/GNUregex.c Sat Mar 5 14:00:40 2005
@@ -1,5 +1,5 @@
/*
- * $Id: GNUregex.c,v 1.12.2.2 2005/02/20 19:07:45 hno Exp $
+ * $Id: GNUregex.c,v 1.12.2.3 2005/03/05 21:00:40 hno Exp $
*/
/* Extended regular expression matching and search library,
@@ -4440,18 +4440,18 @@
if (!s) {
if (!re_comp_buf.buffer)
- return "No previous regular expression";
+ return (char *)"No previous regular expression";
return 0;
}
if (!re_comp_buf.buffer) {
re_comp_buf.buffer = (unsigned char *) malloc(200);
if (re_comp_buf.buffer == NULL)
- return "Memory exhausted";
+ return (char *)"Memory exhausted";
re_comp_buf.allocated = 200;
re_comp_buf.fastmap = (char *) malloc(1 << BYTEWIDTH);
if (re_comp_buf.fastmap == NULL)
- return "Memory exhausted";
+ return (char *)"Memory exhausted";
}
/* Since `re_exec' always passes NULL for the `regs' argument, we
* don't need to initialize the pattern buffer fields which affect it. */
diff -ruN squid-2.5.STABLE9/lib/Makefile.in squid-2.5.STABLE10/lib/Makefile.in
--- squid-2.5.STABLE9/lib/Makefile.in Sun Feb 20 18:35:48 2005
+++ squid-2.5.STABLE10/lib/Makefile.in Mon Apr 18 18:12:13 2005
@@ -14,7 +14,7 @@
@SET_MAKE@
#
-# $Id: Makefile.in,v 1.57.2.15 2005/02/21 01:35:48 hno Exp $
+# $Id: Makefile.in,v 1.57.2.17 2005/04/19 00:12:13 hno Exp $
#
SHELL = @SHELL@
@@ -84,6 +84,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
@@ -191,8 +192,8 @@
libmiscutil_a_DEPENDENCIES = @LIBOBJS@
@NEED_OWN_MD5_TRUE@am__objects_1 = md5.$(OBJEXT)
@NEED_OWN_MD5_FALSE@am__objects_1 =
-@NEED_OWN_SNPRINTF_TRUE@am__objects_2 = snprintf.$(OBJEXT)
@NEED_OWN_SNPRINTF_FALSE@am__objects_2 =
+@NEED_OWN_SNPRINTF_TRUE@am__objects_2 = snprintf.$(OBJEXT)
am_libmiscutil_a_OBJECTS = Array.$(OBJEXT) base64.$(OBJEXT) \
getfullhostname.$(OBJEXT) hash.$(OBJEXT) heap.$(OBJEXT) \
html_quote.$(OBJEXT) iso3307.$(OBJEXT) $(am__objects_1) \
diff -ruN squid-2.5.STABLE9/lib/rfc1035.c squid-2.5.STABLE10/lib/rfc1035.c
--- squid-2.5.STABLE9/lib/rfc1035.c Sun Jan 16 19:46:29 2005
+++ squid-2.5.STABLE10/lib/rfc1035.c Wed May 11 08:24:28 2005
@@ -1,6 +1,6 @@
/*
- * $Id: rfc1035.c,v 1.22.2.7 2005/01/17 02:46:29 hno Exp $
+ * $Id: rfc1035.c,v 1.22.2.11 2005/05/11 14:24:28 hno Exp $
*
* Low level DNS protocol routines
* AUTHOR: Duane Wessels
@@ -40,6 +40,7 @@
*/
#include "config.h"
+#include "util.h"
#if HAVE_STDIO_H
#include
@@ -82,30 +83,9 @@
#endif
-typedef struct _rfc1035_header rfc1035_header;
int rfc1035_errno;
const char *rfc1035_error_message;
-struct _rfc1035_header {
- unsigned short id;
- unsigned int qr:1;
- unsigned int opcode:4;
- unsigned int aa:1;
- unsigned int tc:1;
- unsigned int rd:1;
- unsigned int ra:1;
- unsigned int rcode:4;
- unsigned short qdcount;
- unsigned short ancount;
- unsigned short nscount;
- unsigned short arcount;
-};
-
-static const char *Alphanum =
-"abcdefghijklmnopqrstuvwxyz"
-"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-"0123456789";
-
/*
* rfc1035HeaderPack()
@@ -113,10 +93,10 @@
* Packs a rfc1035_header structure into a buffer.
* Returns number of octets packed (should always be 12)
*/
-static off_t
-rfc1035HeaderPack(char *buf, size_t sz, rfc1035_header * hdr)
+static int
+rfc1035HeaderPack(char *buf, size_t sz, rfc1035_message * hdr)
{
- off_t off = 0;
+ int off = 0;
unsigned short s;
unsigned short t;
assert(sz >= 12);
@@ -158,10 +138,10 @@
* bytes to follow. Labels must be smaller than 64 octets.
* Returns number of octets packed.
*/
-static off_t
+static int
rfc1035LabelPack(char *buf, size_t sz, const char *label)
{
- off_t off = 0;
+ int off = 0;
size_t len = label ? strlen(label) : 0;
if (label)
assert(!strchr(label, '.'));
@@ -183,18 +163,18 @@
* Note message compression is not supported here.
* Returns number of octets packed.
*/
-static off_t
+static int
rfc1035NamePack(char *buf, size_t sz, const char *name)
{
- off_t off = 0;
- char *copy = strdup(name);
+ int off = 0;
+ char *copy = xstrdup(name);
char *t;
/*
* NOTE: use of strtok here makes names like foo....com valid.
*/
for (t = strtok(copy, "."); t; t = strtok(NULL, "."))
off += rfc1035LabelPack(buf + off, sz - off, t);
- free(copy);
+ xfree(copy);
off += rfc1035LabelPack(buf + off, sz - off, NULL);
assert(off <= sz);
return off;
@@ -206,14 +186,14 @@
* Packs a QUESTION section of a message.
* Returns number of octets packed.
*/
-static off_t
+static int
rfc1035QuestionPack(char *buf,
size_t sz,
const char *name,
unsigned short type,
unsigned short class)
{
- off_t off = 0;
+ int off = 0;
unsigned short s;
off += rfc1035NamePack(buf + off, sz - off, name);
s = htons(type);
@@ -229,8 +209,8 @@
/*
* rfc1035HeaderUnpack()
*
- * Unpacks a RFC1035 message header buffer into a rfc1035_header
- * structure.
+ * Unpacks a RFC1035 message header buffer into the header fields
+ * of the rfc1035_message structure.
*
* Updates the buffer offset, which is the same as number of
* octects unpacked since the header starts at offset 0.
@@ -238,7 +218,7 @@
* Returns 0 (success) or 1 (error)
*/
static int
-rfc1035HeaderUnpack(const char *buf, size_t sz, off_t * off, rfc1035_header * h)
+rfc1035HeaderUnpack(const char *buf, size_t sz, int *off, rfc1035_message * h)
{
unsigned short s;
unsigned short t;
@@ -299,9 +279,9 @@
* Returns 0 (success) or 1 (error)
*/
static int
-rfc1035NameUnpack(const char *buf, size_t sz, off_t * off, unsigned short *rdlength, char *name, size_t ns, int rdepth)
+rfc1035NameUnpack(const char *buf, size_t sz, int *off, unsigned short *rdlength, char *name, size_t ns, int rdepth)
{
- off_t no = 0;
+ int no = 0;
unsigned char c;
size_t len;
assert(ns > 0);
@@ -311,8 +291,8 @@
if (c > 191) {
/* blasted compression */
unsigned short s;
- off_t ptr;
- if (rdepth > 64) /* infinite pointer loop */
+ int ptr;
+ if (rdepth > 64) /* infinite pointer loop */
return 1;
memcpy(&s, buf + (*off), sizeof(s));
s = ntohs(s);
@@ -367,12 +347,12 @@
* Returns 0 (success) or 1 (error)
*/
static int
-rfc1035RRUnpack(const char *buf, size_t sz, off_t * off, rfc1035_rr * RR)
+rfc1035RRUnpack(const char *buf, size_t sz, int *off, rfc1035_rr * RR)
{
unsigned short s;
unsigned int i;
unsigned short rdlength;
- off_t rdata_off;
+ int rdata_off;
if (rfc1035NameUnpack(buf, sz, off, NULL, RR->name, RFC1035_MAXHOSTNAMESZ, 0)) {
RFC1035_UNPACK_DEBUG;
memset(RR, '\0', sizeof(*RR));
@@ -411,26 +391,26 @@
RR->rdlength = rdlength;
switch (RR->type) {
case RFC1035_TYPE_PTR:
- RR->rdata = malloc(RFC1035_MAXHOSTNAMESZ);
+ RR->rdata = xmalloc(RFC1035_MAXHOSTNAMESZ);
rdata_off = *off;
- RR->rdlength = 0; /* Filled in by rfc1035NameUnpack */
+ RR->rdlength = 0; /* Filled in by rfc1035NameUnpack */
if (rfc1035NameUnpack(buf, sz, &rdata_off, &RR->rdlength, RR->rdata, RFC1035_MAXHOSTNAMESZ, 0))
return 1;
- if (rdata_off != ((*off) + rdlength)) {
+ if (rdata_off > ((*off) + rdlength)) {
/*
* This probably doesn't happen for valid packets, but
* I want to make sure that NameUnpack doesn't go beyond
* the RDATA area.
*/
RFC1035_UNPACK_DEBUG;
- free(RR->rdata);
+ xfree(RR->rdata);
memset(RR, '\0', sizeof(*RR));
return 1;
}
break;
case RFC1035_TYPE_A:
default:
- RR->rdata = malloc(rdlength);
+ RR->rdata = xmalloc(rdlength);
memcpy(RR->rdata, buf + (*off), rdlength);
break;
}
@@ -439,15 +419,6 @@
return 0;
}
-static unsigned short
-rfc1035Qid(void)
-{
- static unsigned short qid = 0x0001;
- if (++qid == 0xFFFF)
- qid = 0x0001;
- return qid;
-}
-
static void
rfc1035SetErrno(int n)
{
@@ -485,7 +456,7 @@
}
}
-void
+static void
rfc1035RRDestroy(rfc1035_rr * rr, int n)
{
if (rr == NULL)
@@ -493,13 +464,87 @@
assert(n > 0);
while (n--) {
if (rr[n].rdata)
- free(rr[n].rdata);
+ xfree(rr[n].rdata);
}
- free(rr);
+ xfree(rr);
}
/*
- * rfc1035AnswersUnpack()
+ * rfc1035QueryUnpack()
+ *
+ * Unpacks a RFC1035 Query Record into 'query' from a message buffer.
+ *
+ * Updates the new message buffer offset.
+ *
+ * Returns 0 (success) or 1 (error)
+ */
+static int
+rfc1035QueryUnpack(const char *buf, size_t sz, int *off, rfc1035_query * query)
+{
+ unsigned short s;
+ if (rfc1035NameUnpack(buf, sz, off, NULL, query->name, RFC1035_MAXHOSTNAMESZ, 0)) {
+ RFC1035_UNPACK_DEBUG;
+ memset(query, '\0', sizeof(*query));
+ return 1;
+ }
+ if (*off + 4 > sz) {
+ RFC1035_UNPACK_DEBUG;
+ memset(query, '\0', sizeof(*query));
+ return 1;
+ }
+ memcpy(&s, buf + *off, 2);
+ *off += 2;
+ query->qtype = ntohs(s);
+ memcpy(&s, buf + *off, 2);
+ *off += 2;
+ query->qclass = ntohs(s);
+ return 0;
+}
+
+void
+rfc1035MessageDestroy(rfc1035_message * msg)
+{
+ if (!msg)
+ return;
+ if (msg->query)
+ xfree(msg->query);
+ if (msg->answer)
+ rfc1035RRDestroy(msg->answer, msg->ancount);
+ xfree(msg);
+}
+
+/*
+ * rfc1035QueryCompare()
+ *
+ * Compares two rfc1035_query entries
+ *
+ * Returns 0 (equal) or !=0 (different)
+ */
+int
+rfc1035QueryCompare(const rfc1035_query * a, const rfc1035_query * b)
+{
+ size_t la, lb;
+ if (a->qtype != b->qtype)
+ return 1;
+ if (a->qclass != b->qclass)
+ return 1;
+ la = strlen(a->name);
+ lb = strlen(b->name);
+ if (la != lb) {
+ /* Trim root label(s) */
+ while (la > 0 && a->name[la - 1] == '.')
+ la--;
+ while (lb > 0 && b->name[lb - 1] == '.')
+ lb--;
+ }
+ if (la != lb)
+ return 1;
+
+ return strncasecmp(a->name, b->name, la);
+}
+
+/*
+ * rfc1035MessageUnpack()
*
* Takes the contents of a DNS reply and fills in an array
* of resource record structures. The records array is allocated
@@ -510,60 +555,52 @@
*/
int
-rfc1035AnswersUnpack(const char *buf,
+rfc1035MessageUnpack(const char *buf,
size_t sz,
- rfc1035_rr ** records,
- unsigned short *id)
+ rfc1035_message ** answer)
{
- off_t off = 0;
- int l;
+ int off = 0;
int i;
int nr = 0;
- rfc1035_header hdr;
+ rfc1035_message *msg;
rfc1035_rr *recs;
- memset(&hdr, '\0', sizeof(hdr));
- if (rfc1035HeaderUnpack(buf + off, sz - off, &off, &hdr)) {
+ rfc1035_query *querys;
+ msg = xcalloc(1, sizeof(*msg));
+ if (rfc1035HeaderUnpack(buf + off, sz - off, &off, msg)) {
RFC1035_UNPACK_DEBUG;
rfc1035SetErrno(rfc1035_unpack_error);
+ xfree(msg);
return -rfc1035_unpack_error;
}
- *id = hdr.id;
rfc1035_errno = 0;
rfc1035_error_message = NULL;
- if (hdr.rcode) {
+ i = (int) msg->qdcount;
+ if (i != 1) {
+ /* This can not be an answer to our queries.. */
RFC1035_UNPACK_DEBUG;
- rfc1035SetErrno((int) hdr.rcode);
- return -rfc1035_errno;
+ rfc1035SetErrno(rfc1035_unpack_error);
+ xfree(msg);
+ return -rfc1035_unpack_error;
}
- i = (int) hdr.qdcount;
- /* skip question */
- while (i--) {
- do {
- l = (int) (unsigned char) *(buf + off);
- off++;
- if (l > 191) { /* compression */
- off++;
- break;
- } else if (l > RFC1035_MAXLABELSZ) {
- /* illegal combination of compression bits */
- RFC1035_UNPACK_DEBUG;
- rfc1035SetErrno(rfc1035_unpack_error);
- return -rfc1035_unpack_error;
- } else {
- off += l;
- }
- } while (l > 0); /* a zero-length label terminates */
- off += 4; /* qtype, qclass */
- if (off > sz) {
+ querys = msg->query = xcalloc((int) msg->qdcount, sizeof(*querys));
+ for (i = 0; i < (int) msg->qdcount; i++) {
+ if (rfc1035QueryUnpack(buf, sz, &off, &querys[i])) {
RFC1035_UNPACK_DEBUG;
rfc1035SetErrno(rfc1035_unpack_error);
+ rfc1035MessageDestroy(msg);
return -rfc1035_unpack_error;
}
}
- if (hdr.ancount == 0)
+ *answer = msg;
+ if (msg->rcode) {
+ RFC1035_UNPACK_DEBUG;
+ rfc1035SetErrno((int) msg->rcode);
+ return -rfc1035_errno;
+ }
+ if (msg->ancount == 0)
return 0;
- recs = calloc((int)hdr.ancount, sizeof(*recs));
- for (i = 0; i < (int)hdr.ancount; i++) {
+ recs = msg->answer = xcalloc((int) msg->ancount, sizeof(*recs));
+ for (i = 0; i < (int) msg->ancount; i++) {
if (off >= sz) { /* corrupt packet */
RFC1035_UNPACK_DEBUG;
break;
@@ -579,11 +616,11 @@
* we expected to unpack some answers (ancount != 0), but
* didn't actually get any.
*/
- free(recs);
+ rfc1035MessageDestroy(msg);
+ *answer = NULL;
rfc1035SetErrno(rfc1035_unpack_error);
return -rfc1035_unpack_error;
}
- *records = recs;
return nr;
}
@@ -595,21 +632,15 @@
* probably be at least 512 octets. The 'szp' initially
* specifies the size of the buffer, on return it contains
* the size of the message (i.e. how much to write).
- * Return value is the query ID.
+ * Returns the size of the query
*/
-unsigned short
-rfc1035BuildAQuery(const char *hostname, char *buf, size_t * szp)
+ssize_t
+rfc1035BuildAQuery(const char *hostname, char *buf, size_t sz, unsigned short qid, rfc1035_query * query)
{
- static rfc1035_header h;
+ static rfc1035_message h;
size_t offset = 0;
- size_t sz = *szp;
memset(&h, '\0', sizeof(h));
- /* the first char of hostname must be alphanmeric */
- if (NULL == strchr(Alphanum, *hostname)) {
- rfc1035SetErrno(3);
- return 0;
- }
- h.id = rfc1035Qid();
+ h.id = qid;
h.qr = 0;
h.rd = 1;
h.opcode = 0; /* QUERY */
@@ -620,9 +651,13 @@
hostname,
RFC1035_TYPE_A,
RFC1035_CLASS_IN);
+ if (query) {
+ query->qtype = RFC1035_TYPE_A;
+ query->qclass = RFC1035_CLASS_IN;
+ xstrncpy(query->name, hostname, sizeof(query->name));
+ }
assert(offset <= sz);
- *szp = (size_t) offset;
- return h.id;
+ return offset;
}
/*
@@ -633,14 +668,13 @@
* probably be at least 512 octets. The 'szp' initially
* specifies the size of the buffer, on return it contains
* the size of the message (i.e. how much to write).
- * Return value is the query ID.
+ * Returns the size of the query
*/
-unsigned short
-rfc1035BuildPTRQuery(const struct in_addr addr, char *buf, size_t * szp)
+ssize_t
+rfc1035BuildPTRQuery(const struct in_addr addr, char *buf, size_t sz, unsigned short qid, rfc1035_query * query)
{
- static rfc1035_header h;
+ static rfc1035_message h;
size_t offset = 0;
- size_t sz = *szp;
static char rev[32];
unsigned int i;
memset(&h, '\0', sizeof(h));
@@ -650,7 +684,7 @@
(i >> 8) & 255,
(i >> 16) & 255,
(i >> 24) & 255);
- h.id = rfc1035Qid();
+ h.id = qid;
h.qr = 0;
h.rd = 1;
h.opcode = 0; /* QUERY */
@@ -661,9 +695,13 @@
rev,
RFC1035_TYPE_PTR,
RFC1035_CLASS_IN);
+ if (query) {
+ query->qtype = RFC1035_TYPE_PTR;
+ query->qclass = RFC1035_CLASS_IN;
+ xstrncpy(query->name, rev, sizeof(query->name));
+ }
assert(offset <= sz);
- *szp = offset;
- return h.id;
+ return offset;
}
/*
@@ -671,13 +709,11 @@
* just need a new ID for it. Lucky for us ID
* is the first field in the message buffer.
*/
-unsigned short
-rfc1035RetryQuery(char *buf)
+void
+rfc1035SetQueryID(char *buf, unsigned short qid)
{
- unsigned short qid = rfc1035Qid();
unsigned short s = htons(qid);
memcpy(buf, &s, sizeof(s));
- return qid;
}
#if DRIVER
diff -ruN squid-2.5.STABLE9/lib/rfc1123.c squid-2.5.STABLE10/lib/rfc1123.c
--- squid-2.5.STABLE9/lib/rfc1123.c Wed Oct 17 13:46:43 2001
+++ squid-2.5.STABLE10/lib/rfc1123.c Wed Mar 9 07:51:39 2005
@@ -1,6 +1,6 @@
/*
- * $Id: rfc1123.c,v 1.29 2001/10/17 19:46:43 hno Exp $
+ * $Id: rfc1123.c,v 1.29.2.2 2005/03/09 14:51:39 hno Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
@@ -103,7 +103,7 @@
for (i = 0; i < 12; i++)
if (!strncmp(month_names[i], month, 3))
return i;
- return 0;
+ return -1;
}
static int
@@ -125,105 +125,80 @@
}
static struct tm *
-parse_date1(const char *str)
+parse_date_elements(const char *day, const char *month, const char *year,
+ const char *time, const char *zone)
{
- /* Thursday, 10-Jun-93 01:29:59 GMT */
- const char *s;
static struct tm tm;
- assert(NULL != str);
- memset(&tm, '\0', sizeof(struct tm));
- s = strchr(str, ',');
- if (NULL == s)
- return NULL;
- s++;
- while (*s == ' ')
- s++;
- /* backup if month is only one digit */
- if (xisdigit(*s) && !xisdigit(*(s + 1)))
- s--;
- if (!strchr(s, '-'))
- return NULL;
- if ((int) strlen(s) < 18)
+ char *t;
+ memset(&tm, 0, sizeof(tm));
+
+ if (!day || !month || !year || !time)
return NULL;
- memset(&tm, '\0', sizeof(tm));
- tm.tm_mday = make_num(s);
- tm.tm_mon = make_month(s + 3);
- tm.tm_year = make_num(s + 7);
- /*
- * Y2K: Arjan de Vet
- * if tm.tm_year < 70, assume it's after the year 2000.
- */
- if (tm.tm_year < 70)
+ tm.tm_mday = atoi(day);
+ tm.tm_mon = make_month(month);
+ if (tm.tm_mon < 0)
+ return NULL;
+ tm.tm_year = atoi(year);
+ if (strlen(year) == 4)
+ tm.tm_year -= 1900;
+ else if (tm.tm_year < 70)
tm.tm_year += 100;
- tm.tm_hour = make_num(s + 10);
- tm.tm_min = make_num(s + 13);
- tm.tm_sec = make_num(s + 16);
+ else if (tm.tm_year > 19000)
+ tm.tm_year -= 19000;
+ tm.tm_hour = make_num(time);
+ t = strchr(time, ':');
+ if (!t)
+ return NULL;
+ t++;
+ tm.tm_min = atoi(t);
+ t = strchr(t, ':');
+ if (t)
+ tm.tm_sec = atoi(t + 1);
return tmSaneValues(&tm) ? &tm : NULL;
}
static struct tm *
-parse_date2(const char *str)
+parse_date(const char *str)
{
- /* Thu, 10 Jan 1993 01:29:59 GMT */
- const char *s;
- static struct tm tm;
- assert(NULL != str);
- memset(&tm, '\0', sizeof(struct tm));
- s = strchr(str, ',');
- if (NULL == s)
- return NULL;
- s++;
- while (*s == ' ')
- s++;
- /* backup if month is only one digit */
- if (xisdigit(*s) && !xisdigit(*(s + 1)))
- s--;
- if (strchr(s, '-'))
- return NULL;
- if ((int) strlen(s) < 20)
- return NULL;
- memset(&tm, '\0', sizeof(tm));
- tm.tm_mday = make_num(s);
- tm.tm_mon = make_month(s + 3);
- tm.tm_year = (100 * make_num(s + 7) - 1900) + make_num(s + 9);
- tm.tm_hour = make_num(s + 12);
- tm.tm_min = make_num(s + 15);
- tm.tm_sec = make_num(s + 18);
- return tmSaneValues(&tm) ? &tm : NULL;
-}
+ struct tm *tm;
+ char *tmp = xstrdup(str);
+ char *t;
+ char *wday = NULL;
+ char *day = NULL;
+ char *month = NULL;
+ char *year = NULL;
+ char *time = NULL;
+ char *zone = NULL;
+
+ for (t = strtok(tmp, ", "); t; t = strtok(NULL, ", ")) {
+ if (xisdigit(*t)) {
+ if (!day) {
+ day = t;
+ t = strchr(t, '-');
+ if (t) {
+ *t++ = '\0';
+ month = t;
+ t = strchr(t, '-');
+ if (!t)
+ return NULL;
+ *t++ = '\0';
+ year = t;
+ }
+ } else if (strchr(t, ':'))
+ time = t;
+ else if (!year)
+ year = t;
+ } else if (!wday)
+ wday = t;
+ else if (!month)
+ month = t;
+ else if (!zone)
+ zone = t;
+ }
+ tm = parse_date_elements(day, month, year, time, zone);
-static struct tm *
-parse_date3(const char *str)
-{
- /* Wed Jun 9 01:29:59 1993 GMT */
- static struct tm tm;
- char *s;
- static char buf[128];
- while (*str && *str == ' ')
- str++;
- xstrncpy(buf, str, 128);
- if (NULL == (s = strtok(buf, w_space)))
- return NULL;
- if (NULL == (s = strtok(NULL, w_space)))
- return NULL;
- tm.tm_mon = make_month(s);
- if (NULL == (s = strtok(NULL, w_space)))
- return NULL;
- tm.tm_mday = atoi(s);
- if (NULL == (s = strtok(NULL, ":")))
- return NULL;
- tm.tm_hour = atoi(s);
- if (NULL == (s = strtok(NULL, ":")))
- return NULL;
- tm.tm_min = atoi(s);
- if (NULL == (s = strtok(NULL, w_space)))
- return NULL;
- tm.tm_sec = atoi(s);
- if (NULL == (s = strtok(NULL, w_space)))
- return NULL;
- /* Y2K fix, richard.kettlewell@kewill.com */
- tm.tm_year = atoi(s) - 1900;
- return tmSaneValues(&tm) ? &tm : NULL;
+ xfree(tmp);
+ return tm;
}
time_t
@@ -233,15 +208,9 @@
time_t t;
if (NULL == str)
return -1;
- tm = parse_date1(str);
- if (NULL == tm) {
- tm = parse_date2(str);
- if (NULL == tm) {
- tm = parse_date3(str);
- if (NULL == tm)
- return -1;
- }
- }
+ tm = parse_date(str);
+ if (!tm)
+ return -1;
tm->tm_isdst = -1;
#ifdef HAVE_TIMEGM
t = timegm(tm);
diff -ruN squid-2.5.STABLE9/scripts/Makefile.in squid-2.5.STABLE10/scripts/Makefile.in
--- squid-2.5.STABLE9/scripts/Makefile.in Sat Jul 10 06:11:47 2004
+++ squid-2.5.STABLE10/scripts/Makefile.in Fri Mar 18 17:55:51 2005
@@ -85,6 +85,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/snmplib/Makefile.in squid-2.5.STABLE10/snmplib/Makefile.in
--- squid-2.5.STABLE9/snmplib/Makefile.in Sun Feb 20 18:35:48 2005
+++ squid-2.5.STABLE10/snmplib/Makefile.in Fri Mar 18 17:55:51 2005
@@ -80,6 +80,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/snmplib/mib.c squid-2.5.STABLE10/snmplib/mib.c
--- squid-2.5.STABLE9/snmplib/mib.c Wed Nov 28 01:01:46 2001
+++ squid-2.5.STABLE10/snmplib/mib.c Wed Mar 9 07:33:02 2005
@@ -127,11 +127,11 @@
char c1, c2;
while (*s1 && *s2) {
- if (isupper(*s1))
+ if (xisupper(*s1))
c1 = tolower(*s1);
else
c1 = *s1;
- if (isupper(*s2))
+ if (xisupper(*s2))
c2 = tolower(*s2);
else
c2 = *s2;
@@ -163,11 +163,11 @@
(*input == '.'))
return (0);
- if (isdigit(*input)) {
+ if (xisdigit(*input)) {
/*
* Read the number, then try to find it in the subtree.
*/
- while (isdigit(*input)) {
+ while (xisdigit(*input)) {
subid *= 10;
subid += *input++ - '0';
}
diff -ruN squid-2.5.STABLE9/snmplib/parse.c squid-2.5.STABLE10/snmplib/parse.c
--- squid-2.5.STABLE9/snmplib/parse.c Wed Oct 17 13:05:37 2001
+++ squid-2.5.STABLE10/snmplib/parse.c Wed Mar 9 07:33:02 2005
@@ -540,7 +540,7 @@
return get_token(fp, token);
}
for (cp = token; *cp; cp++)
- if (!isdigit(*cp))
+ if (!xisdigit(*cp))
return LABEL;
return NUMBER;
} else {
diff -ruN squid-2.5.STABLE9/snmplib/snmp_api.c squid-2.5.STABLE10/snmplib/snmp_api.c
--- squid-2.5.STABLE9/snmplib/snmp_api.c Tue Feb 12 18:43:43 2002
+++ squid-2.5.STABLE10/snmplib/snmp_api.c Wed May 4 12:03:47 2005
@@ -149,5 +149,8 @@
strncpy((char *) bufp, (char *) Community, CommunityLen);
bufp[CommunityLen] = '\0';
+ session->community = bufp;
+ session->community_len = CommunityLen;
+
return (bufp);
}
diff -ruN squid-2.5.STABLE9/src/HttpHdrCc.c squid-2.5.STABLE10/src/HttpHdrCc.c
--- squid-2.5.STABLE9/src/HttpHdrCc.c Thu Jan 11 17:37:13 2001
+++ squid-2.5.STABLE10/src/HttpHdrCc.c Fri Apr 22 14:18:43 2005
@@ -1,6 +1,6 @@
/*
- * $Id: HttpHdrCc.c,v 1.22 2001/01/12 00:37:13 wessels Exp $
+ * $Id: HttpHdrCc.c,v 1.22.2.1 2005/04/22 20:18:43 hno Exp $
*
* DEBUG: section 65 HTTP Cache Control Header
* AUTHOR: Alex Rousskov
@@ -103,15 +103,18 @@
const char *pos = NULL;
int type;
int ilen;
+ int nlen;
assert(cc && str);
/* iterate through comma separated list */
while (strListGetItem(str, ',', &item, &ilen, &pos)) {
- /* strip '=' statements @?@ */
- if ((p = strchr(item, '=')) && (p - item < ilen))
- ilen = p++ - item;
+ /* isolate directive name */
+ if ((p = memchr(item, '=', ilen)))
+ nlen = p++ - item;
+ else
+ nlen = ilen;
/* find type */
- type = httpHeaderIdByName(item, ilen,
+ type = httpHeaderIdByName(item, nlen,
CcFieldsInfo, CC_ENUM_END);
if (type < 0) {
debug(65, 2) ("hdr cc: unknown cache-directive: near '%s' in '%s'\n", item, strBuf(*str));
@@ -147,8 +150,13 @@
cc->max_stale = -1;
}
break;
+ case CC_OTHER:
+ if (strLen(cc->other))
+ strCat(cc->other, ", ");
+ stringAppend(&cc->other, item, ilen);
+ break;
default:
- /* note that we ignore most of '=' specs */
+ /* note that we ignore most of '=' specs (RFC-VIOLATION) */
break;
}
}
@@ -159,6 +167,8 @@
httpHdrCcDestroy(HttpHdrCc * cc)
{
assert(cc);
+ if (strBuf(cc->other))
+ stringClean(&cc->other);
memFree(cc, MEM_HTTP_HDR_CC);
}
@@ -200,6 +210,8 @@
pcount++;
}
}
+ if (strLen(cc->other))
+ packerPrintf(p, (pcount ? ", %s" : "%s"), strBuf(cc->other));
}
void
diff -ruN squid-2.5.STABLE9/src/HttpHdrContRange.c squid-2.5.STABLE10/src/HttpHdrContRange.c
--- squid-2.5.STABLE9/src/HttpHdrContRange.c Wed Oct 24 02:19:07 2001
+++ squid-2.5.STABLE10/src/HttpHdrContRange.c Fri Mar 25 19:50:50 2005
@@ -1,6 +1,6 @@
/*
- * $Id: HttpHdrContRange.c,v 1.14 2001/10/24 08:19:07 hno Exp $
+ * $Id: HttpHdrContRange.c,v 1.14.2.1 2005/03/26 02:50:50 hno Exp $
*
* DEBUG: section 68 HTTP Content-Range Header
* AUTHOR: Alex Rousskov
@@ -81,7 +81,7 @@
p++;
/* do we have last-pos ? */
if (p - field < flen) {
- ssize_t last_pos;
+ squid_off_t last_pos;
if (!httpHeaderParseSize(p, &last_pos))
return 0;
spec->length = size_diff(last_pos + 1, spec->offset);
@@ -101,8 +101,8 @@
if (!known_spec(spec->offset) || !known_spec(spec->length))
packerPrintf(p, "*");
else
- packerPrintf(p, "bytes %ld-%ld",
- (long int) spec->offset, (long int) spec->offset + spec->length - 1);
+ packerPrintf(p, "bytes %" PRINTF_OFF_T "-%" PRINTF_OFF_T "",
+ spec->offset, spec->offset + spec->length - 1);
}
/*
@@ -152,9 +152,9 @@
range->elength = range_spec_unknown;
else if (!httpHeaderParseSize(p, &range->elength))
return 0;
- debug(68, 8) ("parsed content-range field: %ld-%ld / %ld\n",
- (long int) range->spec.offset, (long int) range->spec.offset + range->spec.length - 1,
- (long int) range->elength);
+ debug(68, 8) ("parsed content-range field: %" PRINTF_OFF_T "-%" PRINTF_OFF_T " / %" PRINTF_OFF_T "\n",
+ range->spec.offset, range->spec.offset + range->spec.length - 1,
+ range->elength);
return 1;
}
@@ -187,7 +187,7 @@
}
void
-httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, ssize_t ent_len)
+httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, squid_off_t ent_len)
{
assert(cr && ent_len >= 0);
cr->spec = spec;
diff -ruN squid-2.5.STABLE9/src/HttpHdrRange.c squid-2.5.STABLE10/src/HttpHdrRange.c
--- squid-2.5.STABLE9/src/HttpHdrRange.c Wed Oct 24 02:19:07 2001
+++ squid-2.5.STABLE10/src/HttpHdrRange.c Fri Mar 25 19:50:50 2005
@@ -1,6 +1,6 @@
/*
- * $Id: HttpHdrRange.c,v 1.26 2001/10/24 08:19:07 hno Exp $
+ * $Id: HttpHdrRange.c,v 1.26.2.1 2005/03/26 02:50:50 hno Exp $
*
* DEBUG: section 64 HTTP Range Header
* AUTHOR: Alex Rousskov
@@ -55,7 +55,7 @@
/* local constants */
-#define range_spec_unknown ((ssize_t)-1)
+#define range_spec_unknown ((squid_off_t)-1)
/* local routines */
#define known_spec(s) ((s) != range_spec_unknown)
@@ -102,7 +102,7 @@
p++;
/* do we have last-pos ? */
if (p - field < flen) {
- ssize_t last_pos;
+ squid_off_t last_pos;
if (!httpHeaderParseSize(p, &last_pos))
return NULL;
spec.length = size_diff(last_pos + 1, spec.offset);
@@ -136,12 +136,12 @@
httpHdrRangeSpecPackInto(const HttpHdrRangeSpec * spec, Packer * p)
{
if (!known_spec(spec->offset)) /* suffix */
- packerPrintf(p, "-%ld", (long int) spec->length);
+ packerPrintf(p, "-%" PRINTF_OFF_T, spec->length);
else if (!known_spec(spec->length)) /* trailer */
- packerPrintf(p, "%ld-", (long int) spec->offset);
+ packerPrintf(p, "%" PRINTF_OFF_T "-", spec->offset);
else /* range */
- packerPrintf(p, "%ld-%ld",
- (long int) spec->offset, (long int) spec->offset + spec->length - 1);
+ packerPrintf(p, "%" PRINTF_OFF_T "-%" PRINTF_OFF_T,
+ spec->offset, spec->offset + spec->length - 1);
}
/* fills "absent" positions in range specification based on response body size
@@ -151,8 +151,8 @@
static int
httpHdrRangeSpecCanonize(HttpHdrRangeSpec * spec, size_t clen)
{
- debug(64, 5) ("httpHdrRangeSpecCanonize: have: [%ld, %ld) len: %ld\n",
- (long int) spec->offset, (long int) spec->offset + spec->length, (long int) spec->length);
+ debug(64, 5) ("httpHdrRangeSpecCanonize: have: [%" PRINTF_OFF_T ", %" PRINTF_OFF_T ") len: %" PRINTF_OFF_T "\n",
+ spec->offset, spec->offset + spec->length, spec->length);
if (!known_spec(spec->offset)) /* suffix */
spec->offset = size_diff(clen, spec->length);
else if (!known_spec(spec->length)) /* trailer */
@@ -162,8 +162,8 @@
assert(known_spec(spec->offset));
spec->length = size_min(size_diff(clen, spec->offset), spec->length);
/* check range validity */
- debug(64, 5) ("httpHdrRangeSpecCanonize: done: [%ld, %ld) len: %ld\n",
- (long int) spec->offset, (long int) spec->offset + (long int) spec->length, (long int) spec->length);
+ debug(64, 5) ("httpHdrRangeSpecCanonize: done: [%" PRINTF_OFF_T ", %" PRINTF_OFF_T ") len: %" PRINTF_OFF_T "\n",
+ spec->offset, spec->offset + spec->length, spec->length);
return spec->length > 0;
}
@@ -303,7 +303,7 @@
* - there is at least one range spec
*/
int
-httpHdrRangeCanonize(HttpHdrRange * range, ssize_t clen)
+httpHdrRangeCanonize(HttpHdrRange * range, squid_off_t clen)
{
int i;
HttpHdrRangeSpec *spec;
@@ -415,10 +415,10 @@
* Returns lowest known offset in range spec(s), or range_spec_unknown
* this is used for size limiting
*/
-ssize_t
+squid_off_t
httpHdrRangeFirstOffset(const HttpHdrRange * range)
{
- ssize_t offset = range_spec_unknown;
+ squid_off_t offset = range_spec_unknown;
HttpHdrRangePos pos = HttpHdrRangeInitPos;
const HttpHdrRangeSpec *spec;
assert(range);
@@ -435,11 +435,11 @@
* ranges are combined into one, for example FTP REST.
* Use 0 for size if unknown
*/
-ssize_t
-httpHdrRangeLowestOffset(const HttpHdrRange * range, ssize_t size)
+squid_off_t
+httpHdrRangeLowestOffset(const HttpHdrRange * range, squid_off_t size)
{
- ssize_t offset = range_spec_unknown;
- ssize_t current;
+ squid_off_t offset = range_spec_unknown;
+ squid_off_t current;
HttpHdrRangePos pos = HttpHdrRangeInitPos;
const HttpHdrRangeSpec *spec;
assert(range);
diff -ruN squid-2.5.STABLE9/src/HttpHeader.c squid-2.5.STABLE10/src/HttpHeader.c
--- squid-2.5.STABLE9/src/HttpHeader.c Sun Feb 20 03:32:41 2005
+++ squid-2.5.STABLE10/src/HttpHeader.c Fri May 6 15:32:09 2005
@@ -1,6 +1,6 @@
/*
- * $Id: HttpHeader.c,v 1.74.2.25 2005/02/20 10:32:41 hno Exp $
+ * $Id: HttpHeader.c,v 1.74.2.28 2005/05/06 21:32:09 wessels Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
@@ -80,7 +80,7 @@
{"Content-Disposition", HDR_CONTENT_DISPOSITION, ftStr},
{"Content-Encoding", HDR_CONTENT_ENCODING, ftStr},
{"Content-Language", HDR_CONTENT_LANGUAGE, ftStr},
- {"Content-Length", HDR_CONTENT_LENGTH, ftInt},
+ {"Content-Length", HDR_CONTENT_LENGTH, ftSize},
{"Content-Location", HDR_CONTENT_LOCATION, ftStr},
{"Content-MD5", HDR_CONTENT_MD5, ftStr}, /* for now */
{"Content-Range", HDR_CONTENT_RANGE, ftPContRange},
@@ -474,13 +474,20 @@
return httpHeaderReset(hdr);
}
if (e->id == HDR_CONTENT_LENGTH && (e2 = httpHeaderFindEntry(hdr, e->id)) != NULL) {
- if (!Config.onoff.relaxed_header_parser || strCmp(e->value, strBuf(e2->value)) != 0) {
+ if (strCmp(e->value, strBuf(e2->value)) != 0) {
debug(55, 1) ("WARNING: found two conflicting content-length headers in {%s}\n", getStringPrefix(header_start, header_end));
httpHeaderEntryDestroy(e);
return httpHeaderReset(hdr);
} else {
debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2)
("NOTICE: found double content-length header\n");
+ if (Config.onoff.relaxed_header_parser) {
+ httpHeaderEntryDestroy(e);
+ continue;
+ } else {
+ httpHeaderEntryDestroy(e);
+ return httpHeaderReset(hdr);
+ }
}
}
if (e->id == HDR_OTHER && stringHasWhitespace(strBuf(e->name))) {
@@ -807,6 +814,17 @@
}
void
+httpHeaderPutSize(HttpHeader * hdr, http_hdr_type id, squid_off_t number)
+{
+ char size[64];
+ assert_eid(id);
+ assert(Headers[id].type == ftSize); /* must be of an appropriate type */
+ assert(number >= 0);
+ snprintf(size, sizeof(size), "%" PRINTF_OFF_T, number);
+ httpHeaderAddEntry(hdr, httpHeaderEntryCreate(id, NULL, size));
+}
+
+void
httpHeaderPutTime(HttpHeader * hdr, http_hdr_type id, time_t htime)
{
assert_eid(id);
@@ -912,6 +930,21 @@
return value;
}
+squid_off_t
+httpHeaderGetSize(const HttpHeader * hdr, http_hdr_type id)
+{
+ HttpHeaderEntry *e;
+ squid_off_t value = -1;
+ int ok;
+ assert_eid(id);
+ assert(Headers[id].type == ftSize); /* must be of an appropriate type */
+ if ((e = httpHeaderFindEntry(hdr, id))) {
+ ok = httpHeaderParseSize(strBuf(e->value), &value);
+ httpHeaderNoteParsedEntry(e->id, e->value, !ok);
+ }
+ return value;
+}
+
time_t
httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id)
{
@@ -1112,8 +1145,8 @@
/* do we have a valid field name within this field? */
if (!name_len || name_end > field_end)
return NULL;
- if (name_len > 65536) {
- /* String has a 64K limit */
+ if (name_len > 65534) {
+ /* String must be LESS THAN 64K and it adds a terminating NULL */
debug(55, 1) ("WARNING: ignoring header name of %d bytes\n", name_len);
return NULL;
}
@@ -1144,8 +1177,8 @@
value_start++;
while (value_start < field_end && xisspace(field_end[-1]))
field_end--;
- if (field_end - value_start > 65536) {
- /* String has a 64K limit */
+ if (field_end - value_start > 65534) {
+ /* String must be LESS THAN 64K and it adds a terminating NULL */
debug(55, 1) ("WARNING: ignoring '%s' header of %d bytes\n",
strBuf(e->name), (int) (field_end - value_start));
if (e->id == HDR_OTHER)
diff -ruN squid-2.5.STABLE9/src/HttpHeaderTools.c squid-2.5.STABLE10/src/HttpHeaderTools.c
--- squid-2.5.STABLE9/src/HttpHeaderTools.c Sat Sep 25 05:56:16 2004
+++ squid-2.5.STABLE10/src/HttpHeaderTools.c Fri Mar 25 19:50:51 2005
@@ -1,6 +1,6 @@
/*
- * $Id: HttpHeaderTools.c,v 1.32.2.3 2004/09/25 11:56:16 hno Exp $
+ * $Id: HttpHeaderTools.c,v 1.32.2.4 2005/03/26 02:50:51 hno Exp $
*
* DEBUG: section 66 HTTP Header Tools
* AUTHOR: Alex Rousskov
@@ -138,7 +138,7 @@
/* wrapper arrounf PutContRange */
void
-httpHeaderAddContRange(HttpHeader * hdr, HttpHdrRangeSpec spec, ssize_t ent_len)
+httpHeaderAddContRange(HttpHeader * hdr, HttpHdrRangeSpec spec, squid_off_t ent_len)
{
HttpHdrContRange *cr = httpHdrContRangeCreate();
assert(hdr && ent_len >= 0);
@@ -316,11 +316,14 @@
return 1;
}
-int
-httpHeaderParseSize(const char *start, ssize_t * value)
+squid_off_t
+httpHeaderParseSize(const char *start, squid_off_t * value)
{
- int v;
- const int res = httpHeaderParseInt(start, &v);
+ squid_off_t v;
+ char *end;
+ int res;
+ v = strto_off_t(start, &end, 10);
+ res = start != end;
assert(value);
*value = res ? v : 0;
return res;
diff -ruN squid-2.5.STABLE9/src/HttpReply.c squid-2.5.STABLE10/src/HttpReply.c
--- squid-2.5.STABLE9/src/HttpReply.c Fri Jan 21 05:22:59 2005
+++ squid-2.5.STABLE10/src/HttpReply.c Fri Mar 25 19:50:51 2005
@@ -1,6 +1,6 @@
/*
- * $Id: HttpReply.c,v 1.49.2.4 2005/01/21 12:22:59 hno Exp $
+ * $Id: HttpReply.c,v 1.49.2.5 2005/03/26 02:50:51 hno Exp $
*
* DEBUG: section 58 HTTP Reply (Response)
* AUTHOR: Alex Rousskov
@@ -135,7 +135,7 @@
* returns true on success.
*/
int
-httpReplyParse(HttpReply * rep, const char *buf, ssize_t end)
+httpReplyParse(HttpReply * rep, const char *buf, size_t end)
{
/*
* this extra buffer/copy will be eliminated when headers become
@@ -194,9 +194,10 @@
packerClean(&p);
}
+#if UNUSED_CODE
MemBuf
httpPackedReply(http_version_t ver, http_status status, const char *ctype,
- int clen, time_t lmt, time_t expires)
+ squid_off_t clen, time_t lmt, time_t expires)
{
HttpReply *rep = httpReplyCreate();
MemBuf mb;
@@ -205,6 +206,7 @@
httpReplyDestroy(rep);
return mb;
}
+#endif
MemBuf
httpPacked304Reply(const HttpReply * rep)
@@ -230,7 +232,7 @@
void
httpReplySetHeaders(HttpReply * reply, http_version_t ver, http_status status, const char *reason,
- const char *ctype, int clen, time_t lmt, time_t expires)
+ const char *ctype, squid_off_t clen, time_t lmt, time_t expires)
{
HttpHeader *hdr;
assert(reply);
@@ -245,7 +247,7 @@
} else
reply->content_type = StringNull;
if (clen >= 0)
- httpHeaderPutInt(hdr, HDR_CONTENT_LENGTH, clen);
+ httpHeaderPutSize(hdr, HDR_CONTENT_LENGTH, clen);
if (expires >= 0)
httpHeaderPutTime(hdr, HDR_EXPIRES, expires);
if (lmt > 0) /* this used to be lmt != 0 @?@ */
@@ -267,7 +269,7 @@
hdr = &reply->header;
httpHeaderPutStr(hdr, HDR_SERVER, full_appname_string);
httpHeaderPutTime(hdr, HDR_DATE, squid_curtime);
- httpHeaderPutInt(hdr, HDR_CONTENT_LENGTH, 0);
+ httpHeaderPutSize(hdr, HDR_CONTENT_LENGTH, 0);
httpHeaderPutStr(hdr, HDR_LOCATION, loc);
reply->date = squid_curtime;
reply->content_length = 0;
@@ -342,7 +344,7 @@
{
const HttpHeader *hdr = &rep->header;
const char *str;
- rep->content_length = httpHeaderGetInt(hdr, HDR_CONTENT_LENGTH);
+ rep->content_length = httpHeaderGetSize(hdr, HDR_CONTENT_LENGTH);
rep->date = httpHeaderGetTime(hdr, HDR_DATE);
rep->last_modified = httpHeaderGetTime(hdr, HDR_LAST_MODIFIED);
str = httpHeaderGetStr(hdr, HDR_CONTENT_TYPE);
@@ -449,7 +451,7 @@
/*
* Returns the body size of a HTTP response
*/
-int
+squid_off_t
httpReplyBodySize(method_t method, const HttpReply * reply)
{
if (reply->sline.version.major < 1)
diff -ruN squid-2.5.STABLE9/src/Makefile.am squid-2.5.STABLE10/src/Makefile.am
--- squid-2.5.STABLE9/src/Makefile.am Sat Sep 25 15:37:35 2004
+++ squid-2.5.STABLE10/src/Makefile.am Fri Apr 22 19:32:27 2005
@@ -1,7 +1,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.16.2.10 2004/09/25 21:37:35 hno Exp $
+# $Id: Makefile.am,v 1.16.2.11 2005/04/23 01:32:27 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -91,6 +91,7 @@
cf_gen.$(OBJEXT): cf_gen_defines.h
squidclient_SOURCES = client.c
cachemgr__CGIEXT__SOURCES = cachemgr.c
+cachemgr__CGIEXT__CFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CFLAGS)
EXTRA_squid_SOURCES = \
delay_pools.c \
@@ -268,10 +269,12 @@
store_modules.sh \
repl_modules.sh \
mib.txt \
+ cachemgr.conf \
mime.conf.default
DEFAULT_PREFIX = $(prefix)
DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
+DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
DEFAULT_LOG_PREFIX = $(localstatedir)/logs
@@ -359,6 +362,12 @@
else \
echo "$(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \
$(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE); \
+ fi
+ @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
+ echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
+ $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
fi
$(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX)
diff -ruN squid-2.5.STABLE9/src/Makefile.in squid-2.5.STABLE10/src/Makefile.in
--- squid-2.5.STABLE9/src/Makefile.in Sat Sep 25 15:37:59 2004
+++ squid-2.5.STABLE10/src/Makefile.in Sat Apr 23 18:12:08 2005
@@ -16,7 +16,7 @@
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.225.2.20 2004/09/25 21:37:59 hno Exp $
+# $Id: Makefile.in,v 1.225.2.24 2005/04/24 00:12:08 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
@@ -88,6 +88,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
@@ -185,6 +186,7 @@
nodist_cf_gen_HEADER = cf_gen_defines.h
squidclient_SOURCES = client.c
cachemgr__CGIEXT__SOURCES = cachemgr.c
+cachemgr__CGIEXT__CFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CFLAGS)
EXTRA_squid_SOURCES = \
delay_pools.c \
@@ -369,11 +371,13 @@
store_modules.sh \
repl_modules.sh \
mib.txt \
+ cachemgr.conf \
mime.conf.default
DEFAULT_PREFIX = $(prefix)
DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
+DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
DEFAULT_LOG_PREFIX = $(localstatedir)/logs
@@ -439,7 +443,7 @@
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(noinst_PROGRAMS) \
$(sbin_PROGRAMS)
-am_cachemgr__CGIEXT__OBJECTS = cachemgr.$(OBJEXT)
+am_cachemgr__CGIEXT__OBJECTS = cachemgr__CGIEXT_-cachemgr.$(OBJEXT)
cachemgr__CGIEXT__OBJECTS = $(am_cachemgr__CGIEXT__OBJECTS)
cachemgr__CGIEXT__LDADD = $(LDADD)
cachemgr__CGIEXT__DEPENDENCIES =
@@ -460,21 +464,21 @@
pinger_LDADD = $(LDADD)
pinger_DEPENDENCIES =
pinger_LDFLAGS =
-@USE_DELAY_POOLS_FALSE@am__objects_3 =
@USE_DELAY_POOLS_TRUE@am__objects_3 = delay_pools.$(OBJEXT)
+@USE_DELAY_POOLS_FALSE@am__objects_3 =
@USE_DNSSERVER_FALSE@am__objects_4 = dns_internal.$(OBJEXT)
@USE_DNSSERVER_TRUE@am__objects_4 = dns.$(OBJEXT)
@ENABLE_HTCP_TRUE@am__objects_5 = htcp.$(OBJEXT)
-@MAKE_LEAKFINDER_TRUE@am__objects_6 = leakfinder.$(OBJEXT)
@MAKE_LEAKFINDER_FALSE@am__objects_6 =
+@MAKE_LEAKFINDER_TRUE@am__objects_6 = leakfinder.$(OBJEXT)
@USE_SNMP_TRUE@am__objects_7 = snmp_core.$(OBJEXT) snmp_agent.$(OBJEXT)
@USE_SNMP_FALSE@am__objects_7 =
-@ENABLE_SSL_FALSE@am__objects_8 =
@ENABLE_SSL_TRUE@am__objects_8 = ssl_support.$(OBJEXT)
-@ENABLE_UNLINKD_TRUE@am__objects_9 = unlinkd.$(OBJEXT)
+@ENABLE_SSL_FALSE@am__objects_8 =
@ENABLE_UNLINKD_FALSE@am__objects_9 =
-@ENABLE_WIN32SPECIFIC_FALSE@am__objects_10 =
+@ENABLE_UNLINKD_TRUE@am__objects_9 = unlinkd.$(OBJEXT)
@ENABLE_WIN32SPECIFIC_TRUE@am__objects_10 = win32.$(OBJEXT)
+@ENABLE_WIN32SPECIFIC_FALSE@am__objects_10 =
am_squid_OBJECTS = access_log.$(OBJEXT) acl.$(OBJEXT) asn.$(OBJEXT) \
authenticate.$(OBJEXT) cache_cf.$(OBJEXT) CacheDigest.$(OBJEXT) \
cache_manager.$(OBJEXT) carp.$(OBJEXT) cbdata.$(OBJEXT) \
@@ -540,7 +544,8 @@
@AMDEP_TRUE@ $(DEPDIR)/access_log.Po $(DEPDIR)/acl.Po \
@AMDEP_TRUE@ $(DEPDIR)/asn.Po $(DEPDIR)/auth_modules.Po \
@AMDEP_TRUE@ $(DEPDIR)/authenticate.Po $(DEPDIR)/cache_cf.Po \
-@AMDEP_TRUE@ $(DEPDIR)/cache_manager.Po $(DEPDIR)/cachemgr.Po \
+@AMDEP_TRUE@ $(DEPDIR)/cache_manager.Po \
+@AMDEP_TRUE@ $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po \
@AMDEP_TRUE@ $(DEPDIR)/carp.Po $(DEPDIR)/cbdata.Po \
@AMDEP_TRUE@ $(DEPDIR)/cf_gen.Po $(DEPDIR)/client.Po \
@AMDEP_TRUE@ $(DEPDIR)/client_db.Po $(DEPDIR)/client_side.Po \
@@ -687,6 +692,7 @@
clean-sbinPROGRAMS:
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+cachemgr__CGIEXT_-cachemgr.$(OBJEXT): cachemgr.c
cachemgr$(CGIEXT)$(EXEEXT): $(cachemgr__CGIEXT__OBJECTS) $(cachemgr__CGIEXT__DEPENDENCIES)
@rm -f cachemgr$(CGIEXT)$(EXEEXT)
$(LINK) $(cachemgr__CGIEXT__LDFLAGS) $(cachemgr__CGIEXT__OBJECTS) $(cachemgr__CGIEXT__LDADD) $(LIBS)
@@ -739,7 +745,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/authenticate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cache_cf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cache_manager.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cachemgr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/carp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cbdata.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cf_gen.Po@am__quote@
@@ -834,6 +840,18 @@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
+
+cachemgr__CGIEXT_-cachemgr.o: cachemgr.c
+@AMDEP_TRUE@ source='cachemgr.c' object='cachemgr__CGIEXT_-cachemgr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po' tmpdepfile='$(DEPDIR)/cachemgr__CGIEXT_-cachemgr.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CFLAGS) $(CFLAGS) -c -o cachemgr__CGIEXT_-cachemgr.o `test -f cachemgr.c || echo '$(srcdir)/'`cachemgr.c
+
+cachemgr__CGIEXT_-cachemgr.obj: cachemgr.c
+@AMDEP_TRUE@ source='cachemgr.c' object='cachemgr__CGIEXT_-cachemgr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po' tmpdepfile='$(DEPDIR)/cachemgr__CGIEXT_-cachemgr.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CFLAGS) $(CFLAGS) -c -o cachemgr__CGIEXT_-cachemgr.obj `cygpath -w cachemgr.c`
CCDEPMODE = @CCDEPMODE@
uninstall-info-am:
install-dataDATA: $(data_DATA)
@@ -1163,6 +1181,12 @@
else \
echo "$(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \
$(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE); \
+ fi
+ @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
+ echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
+ $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
fi
$(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX)
diff -ruN squid-2.5.STABLE9/src/MemBuf.c squid-2.5.STABLE10/src/MemBuf.c
--- squid-2.5.STABLE9/src/MemBuf.c Tue Oct 5 15:31:25 2004
+++ squid-2.5.STABLE10/src/MemBuf.c Fri Mar 25 19:50:51 2005
@@ -1,6 +1,6 @@
/*
- * $Id: MemBuf.c,v 1.28.2.3 2004/10/05 21:31:25 hno Exp $
+ * $Id: MemBuf.c,v 1.28.2.4 2005/03/26 02:50:51 hno Exp $
*
* DEBUG: section 59 auto-growing Memory Buffer with printf
* AUTHOR: Alex Rousskov
@@ -192,7 +192,7 @@
/* calls memcpy, appends exactly size bytes, extends buffer if needed */
void
-memBufAppend(MemBuf * mb, const char *buf, mb_size_t sz)
+memBufAppend(MemBuf * mb, const char *buf, int sz)
{
assert(mb && buf && sz >= 0);
assert(mb->buf);
diff -ruN squid-2.5.STABLE9/src/MemPool.c squid-2.5.STABLE10/src/MemPool.c
--- squid-2.5.STABLE9/src/MemPool.c Sun Mar 10 08:18:04 2002
+++ squid-2.5.STABLE10/src/MemPool.c Fri Mar 25 19:50:51 2005
@@ -1,6 +1,6 @@
/*
- * $Id: MemPool.c,v 1.28.2.1 2002/03/10 15:18:04 hno Exp $
+ * $Id: MemPool.c,v 1.28.2.2 2005/03/26 02:50:51 hno Exp $
*
* DEBUG: section 63 Low Level Memory Pool Management
* AUTHOR: Alex Rousskov
@@ -46,7 +46,7 @@
/* module globals */
/* huge constant to set mem_idle_limit to "unlimited" */
-static const size_t mem_unlimited_size = 2 * 1024 * MB;
+static const size_t mem_unlimited_size = 2 * 1024 * MB - 1;
/* we cannot keep idle more than this limit */
static size_t mem_idle_limit = 0;
@@ -58,9 +58,9 @@
static Stack Pools;
/* local prototypes */
-static void memShrink(ssize_t new_limit);
+static void memShrink(size_t new_limit);
static void memPoolDescribe(const MemPool * pool);
-static void memPoolShrink(MemPool * pool, ssize_t new_limit);
+static void memPoolShrink(MemPool * pool, size_t new_limit);
static double
@@ -135,9 +135,9 @@
static void
-memShrink(ssize_t new_limit)
+memShrink(size_t new_limit)
{
- ssize_t start_limit = TheMeter.idle.level;
+ size_t start_limit = TheMeter.idle.level;
int i;
assert(start_limit >= 0 && new_limit >= 0);
debug(63, 1) ("memShrink: started with %ld KB goal: %ld KB\n",
@@ -145,7 +145,7 @@
/* first phase: cut proportionally to the pool idle size */
for (i = 0; i < Pools.count && TheMeter.idle.level > new_limit; ++i) {
MemPool *pool = Pools.items[i];
- const ssize_t target_pool_size = (size_t) ((double) pool->meter.idle.level * new_limit) / start_limit;
+ const size_t target_pool_size = (size_t) ((double) pool->meter.idle.level * new_limit) / start_limit;
memPoolShrink(pool, target_pool_size);
}
debug(63, 1) ("memShrink: 1st phase done with %ld KB left\n", (long int) toKB(TheMeter.idle.level));
@@ -276,7 +276,7 @@
}
static void
-memPoolShrink(MemPool * pool, ssize_t new_limit)
+memPoolShrink(MemPool * pool, size_t new_limit)
{
assert(pool);
assert(new_limit >= 0);
@@ -308,7 +308,7 @@
memPoolInUseSize(const MemPool * pool)
{
assert(pool);
- return pool->obj_size * pool->meter.inuse.level;
+ return (pool->obj_size * pool->meter.inuse.level);
}
/* to-do: make debug level a parameter? */
@@ -321,7 +321,7 @@
(long int) toKB(memPoolInUseSize(pool)));
}
-size_t
+int
memTotalAllocated(void)
{
return TheMeter.alloc.level;
diff -ruN squid-2.5.STABLE9/src/Packer.c squid-2.5.STABLE10/src/Packer.c
--- squid-2.5.STABLE9/src/Packer.c Thu Jan 11 17:37:14 2001
+++ squid-2.5.STABLE10/src/Packer.c Fri Mar 25 19:50:51 2005
@@ -1,6 +1,6 @@
/*
- * $Id: Packer.c,v 1.13 2001/01/12 00:37:14 wessels Exp $
+ * $Id: Packer.c,v 1.13.2.1 2005/03/26 02:50:51 hno Exp $
*
* DEBUG: section 60 Packer: A uniform interface to store-like modules
* AUTHOR: Alex Rousskov
@@ -93,7 +93,7 @@
/* append()'s */
static void (*const store_append) (StoreEntry *, const char *, int) = &storeAppend;
-static void (*const memBuf_append) (MemBuf *, const char *, mb_size_t) = &memBufAppend;
+static void (*const memBuf_append) (MemBuf *, const char *, int) = &memBufAppend;
/* vprintf()'s */
static void (*const store_vprintf) (StoreEntry *, const char *, va_list ap) = &storeAppendVPrintf;
@@ -109,7 +109,7 @@
assert(p && e);
p->append = (append_f) store_append;
p->vprintf = (vprintf_f) store_vprintf;
- p->real_handler = e;
+ p->real_handle = e;
}
/* init with this to accumulate data in MemBuf */
@@ -119,7 +119,7 @@
assert(p && mb);
p->append = (append_f) memBuf_append;
p->vprintf = (vprintf_f) memBuf_vprintf;
- p->real_handler = mb;
+ p->real_handle = mb;
}
/* call this when you are done */
@@ -130,15 +130,15 @@
/* it is not really necessary to do this, but, just in case... */
p->append = NULL;
p->vprintf = NULL;
- p->real_handler = NULL;
+ p->real_handle = NULL;
}
void
packerAppend(Packer * p, const char *buf, int sz)
{
assert(p);
- assert(p->real_handler && p->append);
- p->append(p->real_handler, buf, sz);
+ assert(p->real_handle && p->append);
+ p->append(p->real_handle, buf, sz);
}
#if STDC_HEADERS
@@ -161,7 +161,7 @@
fmt = va_arg(args, char *);
#endif
assert(p);
- assert(p->real_handler && p->vprintf);
- p->vprintf(p->real_handler, fmt, args);
+ assert(p->real_handle && p->vprintf);
+ p->vprintf(p->real_handle, fmt, args);
va_end(args);
}
diff -ruN squid-2.5.STABLE9/src/access_log.c squid-2.5.STABLE10/src/access_log.c
--- squid-2.5.STABLE9/src/access_log.c Mon Sep 27 16:34:19 2004
+++ squid-2.5.STABLE10/src/access_log.c Tue Mar 29 16:13:11 2005
@@ -1,6 +1,6 @@
/*
- * $Id: access_log.c,v 1.72.2.6 2004/09/27 22:34:19 wessels Exp $
+ * $Id: access_log.c,v 1.72.2.8 2005/03/29 23:13:11 hno Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
@@ -245,14 +245,14 @@
client = inet_ntoa(al->cache.caddr);
user = accessLogFormatName(al->cache.authuser ?
al->cache.authuser : al->cache.rfc931);
- logfilePrintf(logfile, "%9d.%03d %6d %s %s/%03d %lu %s %s %s %s%s/%s %s",
- (int) current_time.tv_sec,
+ logfilePrintf(logfile, "%9ld.%03d %6d %s %s/%03d %" PRINTF_OFF_T " %s %s %s %s%s/%s %s",
+ (long int) current_time.tv_sec,
(int) current_time.tv_usec / 1000,
al->cache.msec,
client,
log_tags[al->cache.code],
al->http.code,
- (unsigned long) al->cache.size,
+ al->cache.size,
al->private.method_str,
al->url,
user && *user ? user : dash_str,
@@ -274,7 +274,7 @@
client = inet_ntoa(al->cache.caddr);
user1 = accessLogFormatName(al->cache.authuser);
user2 = accessLogFormatName(al->cache.rfc931);
- logfilePrintf(logfile, "%s %s %s [%s] \"%s %s HTTP/%d.%d\" %d %ld %s:%s",
+ logfilePrintf(logfile, "%s %s %s [%s] \"%s %s HTTP/%d.%d\" %d %" PRINTF_OFF_T " %s:%s",
client,
user2 ? user2 : dash_str,
user1 ? user1 : dash_str,
@@ -283,7 +283,7 @@
al->url,
al->http.version.major, al->http.version.minor,
al->http.code,
- (long int) al->cache.size,
+ al->cache.size,
log_tags[al->cache.code],
hier_strings[al->hier.code]);
safe_free(user1);
diff -ruN squid-2.5.STABLE9/src/acl.c squid-2.5.STABLE10/src/acl.c
--- squid-2.5.STABLE9/src/acl.c Sun Feb 20 12:07:45 2005
+++ squid-2.5.STABLE10/src/acl.c Sun May 8 19:48:09 2005
@@ -1,6 +1,6 @@
/*
- * $Id: acl.c,v 1.270.2.34 2005/02/20 19:07:45 hno Exp $
+ * $Id: acl.c,v 1.270.2.38 2005/05/09 01:48:09 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
@@ -361,7 +361,7 @@
case 4: /* a dotted quad */
if (!safe_inet_addr(asc, addr)) {
debug(28, 0) ("decode_addr: unsafe IP address: '%s'\n", asc);
- fatal("decode_addr: unsafe IP address");
+ self_destruct();
}
break;
case 1: /* a significant bits value for a mask */
@@ -557,9 +557,10 @@
} else {
/* assume its time-of-day spec */
if (sscanf(t, "%d:%d-%d:%d", &h1, &m1, &h2, &m2) < 4) {
- fatalf("aclParseTimeSpec: ERROR: Bad time range in"
+ debug(28, 0) ("aclParseTimeSpec: ERROR: Bad time range in"
"%s line %d: %s\n",
cfg_filename, config_lineno, config_input_line);
+ self_destruct();
}
q = memAllocate(MEM_ACL_TIME_DATA);
q->start = h1 * 60 + m1;
@@ -567,9 +568,10 @@
q->weekbits = weekbits;
weekbits = 0;
if (q->start > q->stop) {
- fatalf("aclParseTimeSpec: ERROR: Reversed time range in"
+ debug(28, 0) ("aclParseTimeSpec: ERROR: Reversed time range in"
"%s line %d: %s\n",
cfg_filename, config_lineno, config_input_line);
+ self_destruct();
}
if (q->weekbits == 0)
q->weekbits = ACL_ALLWEEK;
@@ -787,23 +789,19 @@
/* snarf the ACL name */
if ((t = strtok(NULL, w_space)) == NULL) {
- debug(28, 0) ("%s line %d: %s\n",
- cfg_filename, config_lineno, config_input_line);
debug(28, 0) ("aclParseAclLine: missing ACL name.\n");
- return;
+ self_destruct();
}
xstrncpy(aclname, t, ACL_NAME_SZ);
/* snarf the ACL type */
if ((t = strtok(NULL, w_space)) == NULL) {
- debug(28, 0) ("%s line %d: %s\n",
- cfg_filename, config_lineno, config_input_line);
debug(28, 0) ("aclParseAclLine: missing ACL type.\n");
+ self_destruct();
return;
}
if ((acltype = aclStrToType(t)) == ACL_NONE) {
- debug(28, 0) ("%s line %d: %s\n",
- cfg_filename, config_lineno, config_input_line);
debug(28, 0) ("aclParseAclLine: Invalid ACL type '%s'\n", t);
+ self_destruct();
return;
}
if ((A = aclFindByName(aclname)) == NULL) {
@@ -815,7 +813,8 @@
new_acl = 1;
} else {
if (acltype != A->type) {
- debug(28, 0) ("aclParseAclLine: ACL '%s' already exists with different type, skipping.\n", A->name);
+ debug(28, 0) ("aclParseAclLine: ACL '%s' already exists with different type.\n", A->name);
+ self_destruct();
return;
}
debug(28, 3) ("aclParseAclLine: Appending to '%s'\n", aclname);
@@ -887,22 +886,26 @@
break;
case ACL_PROXY_AUTH:
if (authenticateSchemeCount() == 0) {
- fatalf("Invalid Proxy Auth ACL '%s' "
+ debug(28, 0) ("Invalid Proxy Auth ACL '%s' "
"because no authentication schemes were compiled.\n", A->cfgline);
+ self_destruct();
} else if (authenticateActiveSchemeCount() == 0) {
- fatalf("Invalid Proxy Auth ACL '%s' "
+ debug(28, 0) ("Invalid Proxy Auth ACL '%s' "
"because no authentication schemes are fully configured.\n", A->cfgline);
+ self_destruct();
} else {
aclParseUserList(&A->data);
}
break;
case ACL_PROXY_AUTH_REGEX:
if (authenticateSchemeCount() == 0) {
- fatalf("Invalid Proxy Auth ACL '%s' "
+ debug(28, 0) ("Invalid Proxy Auth ACL '%s' "
"because no authentication schemes were compiled.\n", A->cfgline);
+ self_destruct();
} else if (authenticateActiveSchemeCount() == 0) {
- fatalf("Invalid Proxy Auth ACL '%s' "
+ debug(28, 0) ("Invalid Proxy Auth ACL '%s' "
"because no authentication schemes are fully configured.\n", A->cfgline);
+ self_destruct();
} else {
aclParseRegexList(&A->data);
}
@@ -972,9 +975,18 @@
acl *a;
if (NULL == name)
return 0;
- if ((a = aclFindByName(name)))
- return a->type == ACL_PROXY_AUTH || a->type == ACL_PROXY_AUTH_REGEX;
- return 0;
+ a = aclFindByName(name);
+ if (a == NULL)
+ return 0;
+ switch (a->type) {
+ case ACL_PROXY_AUTH:
+ case ACL_PROXY_AUTH_REGEX:
+ return 1;
+ case ACL_EXTERNAL:
+ return externalAclRequiresAuth(a->data);
+ default:
+ return 0;
+ }
}
@@ -1091,9 +1103,8 @@
debug(28, 3) ("aclParseAccessLine: looking for ACL name '%s'\n", t);
a = aclFindByName(t);
if (a == NULL) {
- debug(28, 0) ("%s line %d: %s\n",
- cfg_filename, config_lineno, config_input_line);
- debug(28, 0) ("aclParseAccessLine: ACL name '%s' not found.\n", t);
+ debug(28, 0) ("ACL name '%s' not defined!\n", t);
+ self_destruct();
memFree(L, MEM_ACL_LIST);
continue;
}
@@ -1329,7 +1340,7 @@
debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (int) (*acldata)->max);
return;
error:
- fatal("aclParseUserMaxIP: Malformed ACL %d\n");
+ self_destruct();
}
void
@@ -1612,8 +1623,10 @@
}
/* NOTREACHED */
case ACL_DST_DOMAIN:
+ if (aclMatchDomainList(&ae->data, r->host))
+ return 1;
if ((ia = ipcacheCheckNumeric(r->host)) == NULL)
- return aclMatchDomainList(&ae->data, r->host);
+ return 0;
fqdn = fqdncache_gethostbyaddr(ia->in_addrs[0], FQDN_LOOKUP_IF_MISS);
if (fqdn)
return aclMatchDomainList(&ae->data, fqdn);
@@ -1638,8 +1651,10 @@
return aclMatchDomainList(&ae->data, "none");
/* NOTREACHED */
case ACL_DST_DOM_REGEX:
+ if (aclMatchRegex(ae->data, r->host))
+ return 1;
if ((ia = ipcacheCheckNumeric(r->host)) == NULL)
- return aclMatchRegex(ae->data, r->host);
+ return 0;
fqdn = fqdncache_gethostbyaddr(ia->in_addrs[0], FQDN_LOOKUP_IF_MISS);
if (fqdn)
return aclMatchRegex(ae->data, fqdn);
@@ -3045,10 +3060,9 @@
for (next = buf; next < lim; next += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *) next;
sin = (struct sockaddr_inarp *) (rtm + 1);
- /*sdl = (struct sockaddr_dl *) (sin + 1); */
#define ROUNDUP(a) \
((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
- (char *) sdl = (char *) sin + ROUNDUP(sin->sin_len);
+ sdl = (struct sockaddr_dl *) ((char *) sin + ROUNDUP(sin->sin_len));
if (c.s_addr == sin->sin_addr.s_addr) {
if (sdl->sdl_alen) {
arpReq.arp_ha.sa_len = sizeof(struct sockaddr);
@@ -3187,8 +3201,9 @@
while (*W != NULL)
W = &(*W)->next;
snprintf(buf, sizeof(buf), "%02x:%02x:%02x:%02x:%02x:%02x",
- arp->eth[0], arp->eth[1], arp->eth[2], arp->eth[3],
- arp->eth[4], arp->eth[5]);
+ arp->eth[0] & 0xff, arp->eth[1] & 0xff,
+ arp->eth[2] & 0xff, arp->eth[3] & 0xff,
+ arp->eth[4] & 0xff, arp->eth[5] & 0xff);
wordlistAdd(state, buf);
}
diff -ruN squid-2.5.STABLE9/src/asn.c squid-2.5.STABLE10/src/asn.c
--- squid-2.5.STABLE9/src/asn.c Wed Jun 18 17:53:34 2003
+++ squid-2.5.STABLE10/src/asn.c Fri Mar 25 19:50:51 2005
@@ -1,6 +1,6 @@
/*
- * $Id: asn.c,v 1.78.2.1 2003/06/18 23:53:34 hno Exp $
+ * $Id: asn.c,v 1.78.2.2 2005/03/26 02:50:51 hno Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -73,8 +73,8 @@
store_client *sc;
request_t *request;
int as_number;
- off_t seen;
- off_t offset;
+ squid_off_t seen;
+ squid_off_t offset;
};
typedef struct _ASState ASState;
diff -ruN squid-2.5.STABLE9/src/auth/Makefile.in squid-2.5.STABLE10/src/auth/Makefile.in
--- squid-2.5.STABLE9/src/auth/Makefile.in Sun Feb 20 18:35:48 2005
+++ squid-2.5.STABLE10/src/auth/Makefile.in Fri Mar 18 17:55:54 2005
@@ -15,7 +15,7 @@
# Makefile for authentication modules in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.6.2.10 2005/02/21 01:35:48 hno Exp $
+# $Id: Makefile.in,v 1.6.2.11 2005/03/19 00:55:54 hno Exp $
#
SHELL = @SHELL@
@@ -85,6 +85,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/src/auth/basic/Makefile.in squid-2.5.STABLE10/src/auth/basic/Makefile.in
--- squid-2.5.STABLE9/src/auth/basic/Makefile.in Sat Jul 10 06:11:49 2004
+++ squid-2.5.STABLE10/src/auth/basic/Makefile.in Fri Mar 18 17:55:54 2005
@@ -80,6 +80,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/src/auth/basic/auth_basic.c squid-2.5.STABLE10/src/auth/basic/auth_basic.c
--- squid-2.5.STABLE9/src/auth/basic/auth_basic.c Sat Sep 25 15:03:49 2004
+++ squid-2.5.STABLE10/src/auth/basic/auth_basic.c Fri Apr 22 14:29:31 2005
@@ -1,5 +1,5 @@
/*
- * $Id: auth_basic.c,v 1.14.2.8 2004/09/25 21:03:49 hno Exp $
+ * $Id: auth_basic.c,v 1.14.2.10 2005/04/22 20:29:31 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
@@ -270,7 +270,7 @@
debug(29, 9) ("authenticateBasicHandleReply: {%s}\n", reply ? reply : "");
if (reply) {
if ((t = strchr(reply, ' ')))
- *t = '\0';
+ *t++ = '\0';
if (*reply == '\0')
reply = NULL;
}
@@ -280,8 +280,12 @@
basic_auth = auth_user->scheme_data;
if (reply && (strncasecmp(reply, "OK", 2) == 0))
basic_auth->flags.credentials_ok = 1;
- else
+ else {
basic_auth->flags.credentials_ok = 3;
+ safe_free(r->auth_user_request->message);
+ if (t && *t)
+ r->auth_user_request->message = xstrdup(t);
+ }
basic_auth->credentials_checkedtime = squid_curtime;
valid = cbdataValid(r->data);
if (valid)
@@ -442,10 +446,14 @@
* Don't allow NL or CR in the credentials.
* Oezguer Kesim
*/
- strtok(cleartext, "\r\n");
debug(29, 9) ("authenticateBasicDecodeAuth: cleartext = '%s'\n", cleartext);
- local_basic.username = xstrndup(cleartext, USER_IDENT_SZ);
- xfree(cleartext);
+ if (strcspn(cleartext, "\r\n") != strlen(cleartext)) {
+ debug(29, 1) ("authenticateBasicDecodeAuth: bad characters in authorization header '%s'\n",
+ proxy_auth);
+ xfree(cleartext);
+ return;
+ }
+ local_basic.username = cleartext;
if ((cleartext = strchr(local_basic.username, ':')) != NULL)
*(cleartext)++ = '\0';
local_basic.passwd = cleartext;
diff -ruN squid-2.5.STABLE9/src/auth/digest/Makefile.in squid-2.5.STABLE10/src/auth/digest/Makefile.in
--- squid-2.5.STABLE9/src/auth/digest/Makefile.in Sat Jul 10 06:11:49 2004
+++ squid-2.5.STABLE10/src/auth/digest/Makefile.in Fri Mar 18 17:55:54 2005
@@ -80,6 +80,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/src/auth/digest/auth_digest.c squid-2.5.STABLE10/src/auth/digest/auth_digest.c
--- squid-2.5.STABLE9/src/auth/digest/auth_digest.c Sat Aug 28 16:31:15 2004
+++ squid-2.5.STABLE10/src/auth/digest/auth_digest.c Fri Apr 22 14:29:31 2005
@@ -1,6 +1,6 @@
/*
- * $Id: auth_digest.c,v 1.10.2.13 2004/08/28 22:31:15 hno Exp $
+ * $Id: auth_digest.c,v 1.10.2.14 2005/04/22 20:29:31 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Robert Collins
@@ -720,6 +720,8 @@
RequestMethodStr[METHOD_GET], digest_request->uri, HA2, Response);
if (strcasecmp(digest_request->response, Response)) {
digest_request->flags.credentials_ok = 3;
+ safe_free(auth_user_request->message);
+ auth_user_request->message = xstrdup("Incorrect password");
return;
} else {
const char *useragent = httpHeaderGetStr(&request->header, HDR_USER_AGENT);
@@ -737,6 +739,8 @@
}
} else {
digest_request->flags.credentials_ok = 3;
+ safe_free(auth_user_request->message);
+ auth_user_request->message = xstrdup("Incorrect password");
return;
}
}
@@ -746,6 +750,8 @@
digest_user->username);
digest_request->flags.nonce_stale = 1;
digest_request->flags.credentials_ok = 3;
+ safe_free(auth_user_request->message);
+ auth_user_request->message = xstrdup("Stale nonce");
return;
}
/* password was checked and did match */
@@ -892,7 +898,7 @@
debug(29, 9) ("authenticateDigestHandleReply: {%s}\n", reply ? reply : "");
if (reply) {
if ((t = strchr(reply, ' ')))
- *t = '\0';
+ *t++ = '\0';
if (*reply == '\0' || *reply == '\n')
reply = NULL;
}
@@ -901,9 +907,12 @@
assert(auth_user_request->scheme_data != NULL);
digest_request = auth_user_request->scheme_data;
digest_user = auth_user_request->auth_user->scheme_data;
- if (reply && (strncasecmp(reply, "ERR", 3) == 0))
+ if (reply && (strncasecmp(reply, "ERR", 3) == 0)) {
digest_request->flags.credentials_ok = 3;
- else if (reply) {
+ safe_free(auth_user_request->message);
+ if (t && *t)
+ auth_user_request->message = xstrdup(t);
+ } else if (reply) {
CvtBin(reply, digest_user->HA1);
digest_user->HA1created = 1;
}
diff -ruN squid-2.5.STABLE9/src/auth/ntlm/Makefile.in squid-2.5.STABLE10/src/auth/ntlm/Makefile.in
--- squid-2.5.STABLE9/src/auth/ntlm/Makefile.in Sat Jul 10 06:11:49 2004
+++ squid-2.5.STABLE10/src/auth/ntlm/Makefile.in Fri Mar 18 17:55:55 2005
@@ -80,6 +80,7 @@
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
diff -ruN squid-2.5.STABLE9/src/auth/ntlm/auth_ntlm.c squid-2.5.STABLE10/src/auth/ntlm/auth_ntlm.c
--- squid-2.5.STABLE9/src/auth/ntlm/auth_ntlm.c Thu Feb 3 16:22:12 2005
+++ squid-2.5.STABLE10/src/auth/ntlm/auth_ntlm.c Fri Apr 22 14:29:31 2005
@@ -1,6 +1,6 @@
/*
- * $Id: auth_ntlm.c,v 1.17.2.21 2005/02/03 23:22:12 hno Exp $
+ * $Id: auth_ntlm.c,v 1.17.2.22 2005/04/22 20:29:31 hno Exp $
*
* DEBUG: section 29 NTLM Authenticator
* AUTHOR: Robert Collins
@@ -549,6 +549,10 @@
ntlm_request->auth_state = AUTHENTICATE_STATE_FAILED;
authenticateNTLMResetServer(ntlm_request);
debug(29, 4) ("authenticateNTLMHandleReply: Error validating user via NTLM. Error returned '%s'\n", reply);
+ reply += 3;
+ safe_free(auth_user_request->message);
+ if (*reply)
+ auth_user_request->message = xstrdup(reply);
} else if (strncasecmp(reply, "BH ", 3) == 0) {
/* TODO kick off a refresh process. This can occur after a YR or after
* a KK. If after a YR release the helper and resubmit the request via
@@ -579,6 +583,10 @@
/* the helper broke on a KK */
debug(29, 1) ("authenticateNTLMHandleReply: Error validating user via NTLM. Error returned '%s'\n", reply);
ntlm_request->auth_state = AUTHENTICATE_STATE_FAILED;
+ reply += 3;
+ safe_free(auth_user_request->message);
+ if (*reply)
+ auth_user_request->message = xstrdup(reply);
}
} else {
fatalf("authenticateNTLMHandleReply: *** Unsupported helper response ***, '%s'\n", reply);
diff -ruN squid-2.5.STABLE9/src/authenticate.c squid-2.5.STABLE10/src/authenticate.c
--- squid-2.5.STABLE9/src/authenticate.c Mon Jan 10 08:35:38 2005
+++ squid-2.5.STABLE10/src/authenticate.c Fri Mar 25 19:50:51 2005
@@ -1,6 +1,6 @@
/*
- * $Id: authenticate.c,v 1.36.2.16 2005/01/10 15:35:38 hno Exp $
+ * $Id: authenticate.c,v 1.36.2.17 2005/03/26 02:50:51 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
@@ -352,7 +352,7 @@
authenticateAuthUserClearIp(auth_user_request->auth_user);
}
-size_t
+int
authenticateAuthUserRequestIPCount(auth_user_request_t * auth_user_request)
{
assert(auth_user_request);
diff -ruN squid-2.5.STABLE9/src/cache_cf.c squid-2.5.STABLE10/src/cache_cf.c
--- squid-2.5.STABLE9/src/cache_cf.c Sun Feb 20 19:55:04 2005
+++ squid-2.5.STABLE10/src/cache_cf.c Fri May 6 16:33:53 2005
@@ -1,6 +1,6 @@
/*
- * $Id: cache_cf.c,v 1.396.2.20 2005/02/21 02:55:04 hno Exp $
+ * $Id: cache_cf.c,v 1.396.2.26 2005/05/06 22:33:53 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
@@ -78,7 +78,7 @@
static void default_all(void);
static void defaults_if_none(void);
static int parse_line(char *);
-static void parseBytesLine(size_t * bptr, const char *units);
+static void parseBytesLine(squid_off_t * bptr, const char *units);
static size_t parseBytesUnits(const char *unit);
static void free_all(void);
void requirePathnameExists(const char *name, const char *path);
@@ -110,6 +110,7 @@
void
self_destruct(void)
{
+ shutting_down = 1;
fatalf("Bungled %s line %d: %s",
cfg_filename, config_lineno, config_input_line);
}
@@ -210,10 +211,35 @@
GetInteger(void)
{
char *token = strtok(NULL, w_space);
+ char *end;
int i;
+ double d;
if (token == NULL)
self_destruct();
- if (sscanf(token, "%d", &i) != 1)
+ i = strtol(token, &end, 0);
+ d = strtod(token, NULL);
+ if (d > INT_MAX || end == token)
+ self_destruct();
+ return i;
+}
+
+static squid_off_t
+GetOffT(void)
+{
+ char *token = strtok(NULL, w_space);
+ char *end;
+ squid_off_t i;
+ if (token == NULL)
+ self_destruct();
+ i = strto_off_t(token, &end, 0);
+#if SIZEOF_SQUID_OFF_T <= 4
+ {
+ double d = strtod(token, NULL);
+ if (d > INT_MAX)
+ end = token;
+ }
+#endif
+ if (end == token)
self_destruct();
return i;
}
@@ -222,7 +248,7 @@
update_maxobjsize(void)
{
int i;
- ssize_t ms = -1;
+ squid_off_t ms = -1;
for (i = 0; i < Config.cacheSwap.n_configured; i++) {
if (Config.cacheSwap.swapDirs[i].max_objsize > ms)
@@ -255,6 +281,8 @@
config_lineno++;
if ((token = strchr(config_input_line, '\n')))
*token = '\0';
+ if ((token = strchr(config_input_line, '\r')))
+ *token = '\0';
if (config_input_line[0] == '#')
continue;
if (config_input_line[0] == '\0')
@@ -271,11 +299,13 @@
}
fclose(fp);
defaults_if_none();
- configDoConfigure();
- cachemgrRegister("config",
- "Current Squid Configuration",
- dump_config,
- 1, 1);
+ if (opt_send_signal == -1) {
+ configDoConfigure();
+ cachemgrRegister("config",
+ "Current Squid Configuration",
+ dump_config,
+ 1, 1);
+ }
return err_count;
}
@@ -439,6 +469,26 @@
debug(22, 0) ("NOTICE: positive_dns_ttl must be larger than negative_dns_ttl. Resetting negative_dns_ttl to match\n");
Config.positiveDnsTtl = Config.negativeDnsTtl;
}
+#if SIZEOF_SQUID_FILE_SZ <= 4
+#if SIZEOF_SQUID_OFF_T <= 4
+ if (Config.Store.maxObjectSize > 0x7FFF0000) {
+ debug(22, 0) ("NOTICE: maximum_object_size limited to %d KB due to hardware limitations\n", 0x7FFF0000 / 1024);
+ Config.Store.maxObjectSize = 0x7FFF0000;
+ }
+#elif SIZEOF_OFF_T <= 4
+ if (Config.Store.maxObjectSize > 0xFFFF0000) {
+ debug(22, 0) ("NOTICE: maximum_object_size limited to %d KB due to OS limitations\n", 0xFFFF0000 / 1024);
+ Config.Store.maxObjectSize = 0xFFFF0000;
+ }
+#else
+ if (Config.Store.maxObjectSize > 0xFFFF0000) {
+ debug(22, 0) ("NOTICE: maximum_object_size limited to %d KB to keep compatibility with existing cache\n", 0xFFFF0000 / 1024);
+ Config.Store.maxObjectSize = 0xFFFF0000;
+ }
+#endif
+#endif
+ if (Config.Store.maxInMemObjSize > 8 * 1024 * 1024)
+ debug(22, 0) ("WARNING: Very large maximum_object_size_in_memory settings can have negative impact on performance\n");
}
/* Parse a time specification from the config file. Store the
@@ -492,18 +542,18 @@
}
static void
-parseBytesLine(size_t * bptr, const char *units)
+parseBytesLine(squid_off_t * bptr, const char *units)
{
char *token;
double d;
- size_t m;
- size_t u;
+ squid_off_t m;
+ squid_off_t u;
if ((u = parseBytesUnits(units)) == 0)
self_destruct();
if ((token = strtok(NULL, w_space)) == NULL)
self_destruct();
if (strcmp(token, "none") == 0 || strcmp(token, "-1") == 0) {
- *bptr = (size_t) - 1;
+ *bptr = (squid_off_t) - 1;
return;
}
d = atof(token);
@@ -516,7 +566,7 @@
else if ((m = parseBytesUnits(token)) == 0)
self_destruct();
*bptr = m * d / u;
- if ((double) *bptr != m * d / u)
+ if ((double) *bptr * 2 != m * d / u * 2)
self_destruct();
}
@@ -1323,12 +1373,12 @@
static void
parse_cachedir_option_maxsize(SwapDir * sd, const char *option, const char *value, int reconfiguring)
{
- ssize_t size;
+ squid_off_t size;
if (!value)
self_destruct();
- size = atoi(value);
+ size = strto_off_t(value, NULL, 10);
if (reconfiguring && sd->max_objsize != size)
debug(3, 1) ("Cache dir '%s' max object size now %ld\n", sd->path, (long int) size);
@@ -2073,34 +2123,29 @@
*var = 0;
}
+#if UNUSED_CODE
static void
-dump_size_t(StoreEntry * entry, const char *name, size_t var)
+dump_size_t(StoreEntry * entry, const char *name, squid_off_t var)
{
- storeAppendPrintf(entry, "%s %d\n", name, (int) var);
+ storeAppendPrintf(entry, "%s %" PRINTF_OFF_T "\n", name, var);
}
-static void
-dump_b_size_t(StoreEntry * entry, const char *name, size_t var)
-{
- storeAppendPrintf(entry, "%s %d %s\n", name, (int) var, B_BYTES_STR);
-}
+#endif
static void
-dump_kb_size_t(StoreEntry * entry, const char *name, size_t var)
+dump_b_size_t(StoreEntry * entry, const char *name, squid_off_t var)
{
- storeAppendPrintf(entry, "%s %d %s\n", name, (int) var, B_KBYTES_STR);
+ storeAppendPrintf(entry, "%s %" PRINTF_OFF_T " %s\n", name, var, B_BYTES_STR);
}
static void
-parse_size_t(size_t * var)
+dump_kb_size_t(StoreEntry * entry, const char *name, squid_off_t var)
{
- int i;
- i = GetInteger();
- *var = (size_t) i;
+ storeAppendPrintf(entry, "%s %" PRINTF_OFF_T " %s\n", name, var, B_KBYTES_STR);
}
static void
-parse_b_size_t(size_t * var)
+parse_b_size_t(squid_off_t * var)
{
parseBytesLine(var, B_BYTES_STR);
}
@@ -2113,7 +2158,7 @@
body_size *bs;
CBDATA_INIT_TYPE(body_size);
bs = cbdataAlloc(body_size);
- parse_size_t(&bs->maxsize);
+ bs->maxsize = GetOffT();
aclParseAccessLine(&bs->access_list);
dlinkAddTail(bs, &bs->node, bodylist);
@@ -2128,7 +2173,7 @@
acl_list *l;
acl_access *head = bs->access_list;
while (head != NULL) {
- storeAppendPrintf(entry, "%s %ld %s", name, (long int) bs->maxsize,
+ storeAppendPrintf(entry, "%s %" PRINTF_OFF_T " %s", name, bs->maxsize,
head->allow ? "Allow" : "Deny");
for (l = head->acl_list; l != NULL; l = l->next) {
storeAppendPrintf(entry, " %s%s",
@@ -2165,13 +2210,13 @@
static void
-parse_kb_size_t(size_t * var)
+parse_kb_size_t(squid_off_t * var)
{
parseBytesLine(var, B_KBYTES_STR);
}
static void
-free_size_t(size_t * var)
+free_size_t(squid_off_t * var)
{
*var = 0;
}
@@ -2445,6 +2490,8 @@
s->key = xstrdup(token + 4);
} else if (strncmp(token, "version=", 8) == 0) {
s->version = atoi(token + 8);
+ if (s->version < 1 || s->version > 4)
+ self_destruct();
} else if (strncmp(token, "options=", 8) == 0) {
safe_free(s->options);
s->options = xstrdup(token + 8);
diff -ruN squid-2.5.STABLE9/src/cachemgr.c squid-2.5.STABLE10/src/cachemgr.c
--- squid-2.5.STABLE9/src/cachemgr.c Sun Nov 10 10:07:44 2002
+++ squid-2.5.STABLE10/src/cachemgr.c Mon Apr 25 22:04:30 2005
@@ -1,6 +1,6 @@
/*
- * $Id: cachemgr.c,v 1.90.2.6 2002/11/10 17:07:44 hno Exp $
+ * $Id: cachemgr.c,v 1.90.2.11 2005/04/26 04:04:30 hno Exp $
*
* DEBUG: section 0 CGI Cache Manager
* AUTHOR: Duane Wessels
@@ -125,13 +125,21 @@
#if HAVE_SYS_SELECT_H
#include
#endif
+#if HAVE_FNMATCH_H
+#include
+#endif
#include
#include "util.h"
#include "snprintf.h"
+#ifndef DEFAULT_CACHEMGR_CONFIG
+#define DEFAULT_CACHEMGR_CONFIG "/etc/squid/cachemgr.conf"
+#endif
+
typedef struct {
+ char *server;
char *hostname;
int port;
char *action;
@@ -180,6 +188,8 @@
static void reset_auth(cachemgr_request * req);
static const char *make_auth_header(const cachemgr_request * req);
+static int check_target_acl(const char *hostname, int port);
+
static const char *
safe_str(const char *str)
@@ -230,10 +240,12 @@
static void
auth_html(const char *host, int port, const char *user_name)
{
+ FILE *fp;
+ int need_host = 1;
if (!user_name)
user_name = "";
if (!host || !strlen(host))
- host = "localhost";
+ host = "";
printf("Content-Type: text/html\r\n\r\n");
printf("\n");
printf("Cache Manager Interface\n");
@@ -244,10 +256,54 @@
printf("
\n");
printf("