Hi all,
Currently the squid-trunk in bzr repository can not run, and can not compile at all. I am attaching a patch which shows some of the problems and proposes possible fixes:

-  src/ip/IpIntercept.h file the PfInterception method has wrong definition
- src/ip/IpIntercept.cc IpIntercept::NetfilterTransparent method uses an undefined parameter - src/ip/IpAddress.cc: has error in IpAddress::IpAddress constructor which causing infinite loop
 - src/Debug.h The HERE macro is wrong. The original one was not bad....
- The ufs aufs diskd does not link well. An src file like the src/FsReg.cc in my patch should added and fix a litle the libaufs.a libufs.a and other libraries (probably should included in one library) - The ntlm,basic digest schemes does not included in squid binary. A file like the src/AuthReg.cc in my patch should added - The ACLProxyAuth and ACLMaxUserIP acl classes (located under the src/auth directory) should initiated in AclRegs.cc file

I think squid-trunk should not stay more time in this state, some of the problems exist here for many days...

--
   Christos
=== modified file 'src/AclRegs.cc'
--- src/AclRegs.cc	2009-03-17 02:04:14 +0000
+++ src/AclRegs.cc	2009-03-23 19:35:09 +0000
@@ -6,7 +6,7 @@
 */
 
 #include "acl/Acl.h"
-#ifdef ENABLE_ARP_ACL
+#ifdef USE_ARP_ACL
 #include "acl/Arp.h"
 #endif
 #include "acl/Asn.h"
@@ -24,7 +24,7 @@
 #include "acl/HttpRepHeader.h"
 #include "acl/HttpReqHeader.h"
 #include "acl/HttpStatus.h"
-#ifdef ENABLE_IDENT
+#ifdef USE_IDENT
 #include "acl/Ident.h"
 #endif
 #include "acl/IntRange.h"
@@ -47,7 +47,7 @@
 #include "acl/SourceAsn.h"
 #include "acl/SourceDomain.h"
 #include "acl/SourceIp.h"
-#ifdef ENABLE_SSL
+#ifdef USE_SSL
 #include "acl/SslErrorData.h"
 #include "acl/SslError.h"
 #include "acl/CertificateData.h"
@@ -62,6 +62,9 @@
 #include "acl/UrlPath.h"
 #include "acl/UrlPort.h"
 #include "acl/UserData.h"
+#include "auth/AclProxyAuth.h"
+#include "auth/AclMaxUserIp.h"
+
 
 ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser");
 ACLStrategised<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_USER_AGENT>::Instance(), "browser");
@@ -117,7 +120,7 @@
 ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
 ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
 
-#ifdef ENABLE_SSL
+#ifdef USE_SSL
     ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
     ACLStrategised<int> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
     ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
@@ -139,4 +142,10 @@
 #endif
 
 
+ACL::Prototype ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_, "proxy_auth");
+ACLProxyAuth ACLProxyAuth::UserRegistryEntry_(new ACLUserData, "proxy_auth");
+ACL::Prototype ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_, "proxy_auth_regex" );
+ACLProxyAuth ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData, "proxy_auth_regex");
 
+ACL::Prototype ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_, "max_user_ip");
+ACLMaxUserIP ACLMaxUserIP::RegistryEntry_("max_user_ip");

=== added file 'src/AuthReg.cc'
--- src/AuthReg.cc	1970-01-01 00:00:00 +0000
+++ src/AuthReg.cc	2009-03-23 19:36:03 +0000
@@ -0,0 +1,34 @@
+#include "squid.h"
+
+
+#ifdef HAVE_AUTH_MODULE_BASIC
+#include "auth/basic/basicScheme.h"
+#endif
+
+#ifdef HAVE_AUTH_MODULE_NTLM
+#include "auth/ntlm/ntlmScheme.h"
+#endif
+
+#ifdef HAVE_AUTH_MODULE_DIGEST
+#include "auth/digest/digestScheme.h"
+#endif
+
+#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#include "auth/negotiate/negotiateScheme.h"
+#endif
+
+#ifdef HAVE_AUTH_MODULE_BASIC
+static const char *basic_type = basicScheme::GetInstance().type();
+#endif
+
+#ifdef HAVE_AUTH_MODULE_NTLM
+static const char *ntlm_type = ntlmScheme::GetInstance().type();
+#endif
+
+#ifdef HAVE_AUTH_MODULE_DIGEST
+static const char *digest_type = digestScheme::GetInstance().type();
+#endif
+
+#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+static const char *negotiate_type = negotiateScheme::GetInstance().type();
+#endif

=== modified file 'src/Debug.h'
--- src/Debug.h	2009-03-06 07:36:36 +0000
+++ src/Debug.h	2009-03-23 19:35:09 +0000
@@ -98,7 +98,8 @@
  *
  * debugs(1,2, HERE << "some message");
  */
-#define HERE SkipBuildPrefix(__FILE__)<<"("<<__LINE__<<") "<<__FUNCTION__<<": "
+//#define HERE SkipBuildPrefix(__FILE__)<<"("<<__LINE__<<") "<<__FUNCTION__<<": "
+#define HERE __FILE__<<"("<<__LINE__<<") "<<__FUNCTION__<<": "
 
 /*
  * MYNAME is for use at debug levels 0 and 1 where HERE is too messy.

=== added file 'src/FsReg.cc'
--- src/FsReg.cc	1970-01-01 00:00:00 +0000
+++ src/FsReg.cc	2009-03-23 19:35:29 +0000
@@ -0,0 +1,8 @@
+
+#include "fs/ufs/StoreFSufs.h"
+#include "fs/ufs/ufscommon.h"
+
+
+static StoreFSufs<UFSSwapDir> UfsInstance("Blocking", "ufs");
+static StoreFSufs<UFSSwapDir> AufsInstance("DiskThreads", "aufs");
+static StoreFSufs<UFSSwapDir> DiskdInstance("DiskDaemon", "diskd");

=== modified file 'src/Makefile.am'
--- src/Makefile.am	2009-03-17 03:39:54 +0000
+++ src/Makefile.am	2009-03-23 19:35:09 +0000
@@ -217,7 +217,7 @@
 cf_gen.$(OBJEXT): cf_gen_defines.h
 
 
-ACL_REGISTRATION_SOURCES = AclRegs.cc
+ACL_REGISTRATION_SOURCES = AclRegs.cc FsReg.cc AuthReg.cc
 
 DISKIO_SOURCE = \
 	DiskIO/DiskIOModule.cc \

=== modified file 'src/acl/Checklist.h'
--- src/acl/Checklist.h	2009-03-08 19:41:27 +0000
+++ src/acl/Checklist.h	2009-03-23 19:35:09 +0000
@@ -154,8 +154,9 @@
 	virtual bool hasRequest() const = 0;
 	virtual bool hasReply() const = 0;
 
+protected:
+    virtual void checkCallback(allow_t answer);
 private:
-    virtual void checkCallback(allow_t answer);
     void checkAccessList();
     void checkForAsync();
 

=== modified file 'src/auth/AclMaxUserIp.cc'
--- src/auth/AclMaxUserIp.cc	2009-03-08 21:57:12 +0000
+++ src/auth/AclMaxUserIp.cc	2009-03-23 19:35:09 +0000
@@ -42,10 +42,6 @@
 #include "wordlist.h"
 #include "ConfigParser.h"
 
-ACL::Prototype ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_, "max_user_ip");
-
-ACLMaxUserIP ACLMaxUserIP::RegistryEntry_("max_user_ip");
-
 ACL *
 ACLMaxUserIP::clone() const
 {

=== modified file 'src/auth/AclProxyAuth.cc'
--- src/auth/AclProxyAuth.cc	2009-03-08 21:57:12 +0000
+++ src/auth/AclProxyAuth.cc	2009-03-23 19:35:09 +0000
@@ -190,11 +190,6 @@
     checklist->markFinished();
 }
 
-ACL::Prototype ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_, "proxy_auth");
-ACLProxyAuth ACLProxyAuth::UserRegistryEntry_(new ACLUserData, "proxy_auth");
-ACL::Prototype ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_, "proxy_auth_regex" );
-ACLProxyAuth ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData, "proxy_auth_regex");
-
 ACL *
 ACLProxyAuth::clone() const
 {

=== modified file 'src/ip/IpAddress.cc'
--- src/ip/IpAddress.cc	2009-03-20 04:06:09 +0000
+++ src/ip/IpAddress.cc	2009-03-23 19:35:09 +0000
@@ -646,7 +646,8 @@
 IpAddress::IpAddress(IpAddress *s)
 {
     SetEmpty();
-    operator=(s);
+//    operator=(s);
+  memcpy(this,s,sizeof(IpAddress));
 }
 
 IpAddress::IpAddress(const struct hostent &s)

=== modified file 'src/ip/IpIntercept.cc'
--- src/ip/IpIntercept.cc	2009-03-21 00:57:14 +0000
+++ src/ip/IpIntercept.cc	2009-03-23 19:35:09 +0000
@@ -161,7 +161,7 @@
         return 0;
     }
 
-    debugs(89, 9, HERE << "address: me= " << me << ", dst= " << dst);
+    debugs(89, 9, HERE << "address: me= " << me << ", dst= " << client);
 #endif
     return -1;
 }

=== modified file 'src/ip/IpIntercept.h'
--- src/ip/IpIntercept.h	2009-03-21 00:57:14 +0000
+++ src/ip/IpIntercept.h	2009-03-23 19:35:09 +0000
@@ -123,7 +123,7 @@
      \retval 0     Successfuly located the new address.
      \retval -1    An error occured during NAT lookups.
      */
-    int PfInterception(int fd, IpAddress &client, IpAddress &client, int silent);
+    int PfInterception(int fd, IpAddress &client, IpAddress &dst, int silent);
 
 
     int transparent_active;

Reply via email to