broken link

2009-09-02 Thread rose
Hello,

I just wanted to let you know that on your homepage: 
http://devel.squid-cache.org you have a link to: 
http://www.shmoo.com/securecode/ (How to Write Secure Code) which does not seem 
to exist anymore. I am learning all about coding in my programming class and I 
found this page to be helpful: http://www.investintech.com/content/securecode/ 
... As I was browsing, the thought occurred to me that you may find it useful 
as a replacement for the broken one. Thank you for all of the other resources 
you have listed, they have proven useful as well. 

Have a great day,

Rose Daus


Re: Fun with Squid2 and Clang

2009-09-02 Thread Mark Nottingham

Hm.

I'm trying 3.HEAD now, but it's giving me some trouble; analysis  
starts up fine, but when it gets to doing cf_gen_defines, it switches  
over to using g++ and doesn't switch back; see below.


cf_gen didn't cause any problems for squid2; is there something new  
and weird in the build process here?



Users/mnot/Downloads/checker-0.218/libexec/ccc-analyzer - 
DSQUID_SNMP=1  -I.. -I../include -I../include   -Werror -Wall - 
Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing- 
declarations -Wcomments -D_REENTRANT -Wall -g -O2 -MT snmp_pdu.o -MD - 
MP -MF .deps/snmp_pdu.Tpo -c -o snmp_pdu.o snmp_pdu.c

ANALYZE: snmp_pdu.c snmp_pdu_create
ANALYZE: snmp_pdu.c snmp_pdu_clone
ANALYZE: snmp_pdu.c snmp_pdu_fix
ANALYZE: snmp_pdu.c snmp_fix_pdu
ANALYZE: snmp_pdu.c snmp_pdu_free
ANALYZE: snmp_pdu.c snmp_free_pdu
ANALYZE: snmp_pdu.c snmp_pdu_encode
ANALYZE: snmp_pdu.c snmp_pdu_decode
ANALYZE: snmp_pdu.c snmp_add_null_var
mv -f .deps/snmp_pdu.Tpo .deps/snmp_pdu.Po
/Users/mnot/Downloads/checker-0.218/libexec/ccc-analyzer - 
DSQUID_SNMP=1  -I.. -I../include -I../include   -Werror -Wall - 
Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing- 
declarations -Wcomments -D_REENTRANT -Wall -g -O2 -MT snmplib_debug.o - 
MD -MP -MF .deps/snmplib_debug.Tpo -c -o snmplib_debug.o snmplib_debug.c

ANALYZE: snmplib_debug.c snmplib_debug
mv -f .deps/snmplib_debug.Tpo .deps/snmplib_debug.Po
rm -f libsnmp.a
/usr/bin/ar cru libsnmp.a asn1.o parse.o snmp_vars.o coexistance.o  
snmp_api.o snmp_error.o mib.o snmp_api_error.o snmp_msg.o snmp_pdu.o  
snmplib_debug.o

ranlib libsnmp.a
Making all in scripts
make[1]: Nothing to be done for `all'.
Making all in src
gawk -f ./cf_gen_defines <./cf.data.pre >cf_gen_defines.h
sed "\
s...@default_http_port@%3128%g;\
s...@default_icp_port@%3130%g;\
s...@default_cache_effective_user@%nobody%g;\
s...@default_mime_table@%/opt/squid3-test/etc/mime.conf%g;\
	s...@default_dnsserver@%/opt/squid3-test/libexec/`echo dnsserver | sed  
's,x,x,;s/$//'`%g;\
	s...@default_unlinkd@%/opt/squid3-test/libexec/`echo unlinkd | sed  
's,x,x,;s/$//'`%g;\
	s...@default_pinger@%/opt/squid3-test/libexec/`echo pinger | sed  
's,x,x,;s/$//'`%g;\
	s...@default_diskd@%/opt/squid3-test/libexec/`echo diskd | sed  
's,x,x,;s/$//'`%g;\

s...@default_cache_log@%/opt/squid3-test/var/logs/cache.log%g;\
s...@default_access_log@%/opt/squid3-test/var/logs/access.log%g;\
s...@default_store_log@%/opt/squid3-test/var/logs/store.log%g;\
s...@default_pid_file@%/opt/squid3-test/var/squid.pid%g;\
s...@default_netdb_file@%/opt/squid3-test/var/logs/netdb.state%g;\
s...@default_swap_dir@%/opt/squid3-test/var/cache%g;\
s...@default_icon_dir@%/opt/squid3-test/share/icons%g;\
s...@default_mib_path@%/opt/squid3-test/share/mib.txt%g;\
s...@default_error_dir@%/opt/squid3-test/share/errors%g;\
s...@default_config_dir@%/opt/squid3-test/etc%g;\
s...@default_prefix@%/opt/squid3-test%g;\
    s...@default_hosts@%/etc/hosts%g;\
s...@[v]ersion@%3.HEAD-20090902%g;"\
< ./cf.data.pre >cf.data
depbase=`echo cf_gen.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	g++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/opt/squid3-test/etc/ 
squid.conf\" -DDEFAULT_SQUID_DATA_DIR=\"/opt/squid3-test/share\" - 
DDEFAULT_SQUID_CONFIG_DIR=\"/opt/squid3-test/etc\"  -I.. -I../include - 
I../src -I../include -I../lib -I../src   -I/usr/include/libxml2 - 
Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  -D_REENTRANT - 
g -O2 -MT cf_gen.o -MD -MP -MF $depbase.Tpo -c -o cf_gen.o cf_gen.cc &&\

mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++ -I/usr/include/libxml2 - 
Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  -D_REENTRANT - 
g -O2  -g -o cf_gen cf_gen.o -L../lib -lmiscutil ../compat/ 
libcompat.la -lexpat -lxml2  -lm -lresolv

mkdir .libs
g++ -I/usr/include/libxml2 -Werror -Wall -Wpointer-arith -Wwrite- 
strings -Wcomments -D_REENTRANT -g -O2 -g -o cf_gen cf_gen.o -Wl,- 
bind_at_load  -L/Users/mnot/Downloads/squid-3.HEAD-20090902/lib - 
lmiscutil ../compat/.libs/libcompat.a -lexpat -lxml2 -lm -lresolv

./cf_gen cf.data ./cf.data.depend
gawk -f ./mk-string-arrays.awk < ./err_type.h > err_type.cc
gawk -f ./mk-globals-c.awk < ./globals.h > globals.cc
gawk -f ./mk-string-arrays.awk < ./hier_code.h > hier_code.cc
gawk -f ./mk-string-arrays.awk < ./icp_opcode.h > icp_opcode.cc
gawk -f ./mk-string-arrays.awk < ./lookup_t.h > lookup_t.cc
/bin/sh ./repl_modules.sh lru > repl_modules.cc
gawk -f ./mk-string-arrays.awk < ./swap_log_op.h > swap_log_op.cc
make  all-recursive
Making all in base
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H  - 
I../.. -I../../include -I../../src -I../../include

Re: Fun with Squid2 and Clang

2009-09-02 Thread Henrik Nordstrom
Maybe that it's C++ while the others are C?

Hmm.. from Clang homepage

"The Clang Static Analyzer consists of both a source code
analysis framework and a standalone tool that finds bugs in C
and Objective-C programs.".

C++ is not C or Objective-C, so it's not too strange it doesn't work for
C++ programs.

And some seconds further digging gives

http://clang.llvm.org/cxx_status.html

Regards
Henrik



ons 2009-09-02 klockan 19:17 +1000 skrev Mark Nottingham:
> Hm.
> 
> I'm trying 3.HEAD now, but it's giving me some trouble; analysis  
> starts up fine, but when it gets to doing cf_gen_defines, it switches  
> over to using g++ and doesn't switch back; see below.
> 
> cf_gen didn't cause any problems for squid2; is there something new  
> and weird in the build process here?
> 
> 
> Users/mnot/Downloads/checker-0.218/libexec/ccc-analyzer - 
> DSQUID_SNMP=1  -I.. -I../include -I../include   -Werror -Wall - 
> Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing- 
> declarations -Wcomments -D_REENTRANT -Wall -g -O2 -MT snmp_pdu.o -MD - 
> MP -MF .deps/snmp_pdu.Tpo -c -o snmp_pdu.o snmp_pdu.c
> ANALYZE: snmp_pdu.c snmp_pdu_create
> ANALYZE: snmp_pdu.c snmp_pdu_clone
> ANALYZE: snmp_pdu.c snmp_pdu_fix
> ANALYZE: snmp_pdu.c snmp_fix_pdu
> ANALYZE: snmp_pdu.c snmp_pdu_free
> ANALYZE: snmp_pdu.c snmp_free_pdu
> ANALYZE: snmp_pdu.c snmp_pdu_encode
> ANALYZE: snmp_pdu.c snmp_pdu_decode
> ANALYZE: snmp_pdu.c snmp_add_null_var
> mv -f .deps/snmp_pdu.Tpo .deps/snmp_pdu.Po
> /Users/mnot/Downloads/checker-0.218/libexec/ccc-analyzer - 
> DSQUID_SNMP=1  -I.. -I../include -I../include   -Werror -Wall - 
> Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing- 
> declarations -Wcomments -D_REENTRANT -Wall -g -O2 -MT snmplib_debug.o - 
> MD -MP -MF .deps/snmplib_debug.Tpo -c -o snmplib_debug.o snmplib_debug.c
> ANALYZE: snmplib_debug.c snmplib_debug
> mv -f .deps/snmplib_debug.Tpo .deps/snmplib_debug.Po
> rm -f libsnmp.a
> /usr/bin/ar cru libsnmp.a asn1.o parse.o snmp_vars.o coexistance.o  
> snmp_api.o snmp_error.o mib.o snmp_api_error.o snmp_msg.o snmp_pdu.o  
> snmplib_debug.o
> ranlib libsnmp.a
> Making all in scripts
> make[1]: Nothing to be done for `all'.
> Making all in src
> gawk -f ./cf_gen_defines <./cf.data.pre >cf_gen_defines.h
> sed "\
>   s...@default_http_port@%3128%g;\
>   s...@default_icp_port@%3130%g;\
>   s...@default_cache_effective_user@%nobody%g;\
>   s...@default_mime_table@%/opt/squid3-test/etc/mime.conf%g;\
>   s...@default_dnsserver@%/opt/squid3-test/libexec/`echo dnsserver | sed  
> 's,x,x,;s/$//'`%g;\
>   s...@default_unlinkd@%/opt/squid3-test/libexec/`echo unlinkd | sed  
> 's,x,x,;s/$//'`%g;\
>   s...@default_pinger@%/opt/squid3-test/libexec/`echo pinger | sed  
> 's,x,x,;s/$//'`%g;\
>   s...@default_diskd@%/opt/squid3-test/libexec/`echo diskd | sed  
> 's,x,x,;s/$//'`%g;\
>   s...@default_cache_log@%/opt/squid3-test/var/logs/cache.log%g;\
>   s...@default_access_log@%/opt/squid3-test/var/logs/access.log%g;\
>   s...@default_store_log@%/opt/squid3-test/var/logs/store.log%g;\
>   s...@default_pid_file@%/opt/squid3-test/var/squid.pid%g;\
>   s...@default_netdb_file@%/opt/squid3-test/var/logs/netdb.state%g;\
>   s...@default_swap_dir@%/opt/squid3-test/var/cache%g;\
>   s...@default_icon_dir@%/opt/squid3-test/share/icons%g;\
>   s...@default_mib_path@%/opt/squid3-test/share/mib.txt%g;\
>   s...@default_error_dir@%/opt/squid3-test/share/errors%g;\
>   s...@default_config_dir@%/opt/squid3-test/etc%g;\
>   s...@default_prefix@%/opt/squid3-test%g;\
>   s...@default_hosts@%/etc/hosts%g;\
>   s...@[v]ersion@%3.HEAD-20090902%g;"\
>   < ./cf.data.pre >cf.data
> depbase=`echo cf_gen.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>   g++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/opt/squid3-test/etc/ 
> squid.conf\" -DDEFAULT_SQUID_DATA_DIR=\"/opt/squid3-test/share\" - 
> DDEFAULT_SQUID_CONFIG_DIR=\"/opt/squid3-test/etc\"  -I.. -I../include - 
> I../src -I../include -I../lib -I../src   -I/usr/include/libxml2 - 
> Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  -D_REENTRANT - 
> g -O2 -MT cf_gen.o -MD -MP -MF $depbase.Tpo -c -o cf_gen.o cf_gen.cc &&\
>   mv -f $depbase.Tpo $depbase.Po
> /bin/sh ../libtool --tag=CXX   --mode=link g++ -I/usr/include/libxml2 - 
> Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  -D_REENTRANT - 
> g -O2  -g -o cf_gen cf_gen.o -L../lib -lmiscutil ../compat/ 
> libcompat.la -lexpat -lxml2  -lm -lresolv
> mkdir .libs
> g++ 

Build failed in Hudson: 3.HEAD-i386-Debian-sid #43

2009-09-02 Thread noc
See 

--
Started by upstream project "3.HEAD-amd64-CentOS-5.2" build number 66
Building remotely on rio.treenet
bzr: ERROR: Invalid http response for 
http://www.squid-cache.org/bzr/squid3/.bzr/repository/packs/2ac0b245adaec88233f3f214954e0737.pack:
 Expected a boundary 
(squid/3.1.0.13~fischeri20090822:D30A309C9A30607912ECB6A26F0044EC) line, got ''
Using saved parent location: http://www.squid-cache.org/bzr/squid3/trunk/
ERROR: Failed to pull



Hudson build is back to normal: 3.HEAD-i386-Debian-sid #44

2009-09-02 Thread noc
See 




R: R: R: R: Squid 3 build errors on Visual Studio - problem still present

2009-09-02 Thread Guido Serassio
Hi,

OK, but what next ?

Regards

Guido Serassio
Acme Consulting S.r.l.
Microsoft Gold Certified Partner
Via Lucia Savarino, 110098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135   Fax. : +39.011.9781115
Email: guido.seras...@acmeconsulting.it
WWW: http://www.acmeconsulting.it



> -Messaggio originale-
> Da: Amos Jeffries [mailto:squ...@treenet.co.nz]
> Inviato: martedì 1 settembre 2009 10.43
> A: Henrik Nordstrom
> Cc: Guido Serassio; Robert Collins; squid-dev@squid-cache.org
> Oggetto: Re: R: R: R: Squid 3 build errors on Visual Studio - problem
> still present
> 
> Henrik Nordstrom wrote:
> > mån 2009-08-31 klockan 13:40 +0200 skrev Guido Serassio:
> >> Hi,
> >>
> >> I have found this definition:
> >>
> >> http://msdn.microsoft.com/en-us/library/tbbk8hs6(VS.80).aspx
> >>
> >> Hoping that helps.
> >
> > Matches the standard definition from what I can tell, and should not
> > cause any errors...
> >
> > Regards
> > Henrik
> >
> 
> Ah, well. It seems that npos "may not work" if its "int or unsigned"
> 
> We do this:
>include/config.h:typedef unsigned int size_t;
>src/SquidString.h:typedef size_t size_type;
>src/SquidString.h:const static size_type npos = std::string::npos;
> 
> making   SquidString::size_type == size_t == unsigned int
> 
> 
> But, the complaint is about "constant expression" being expected?
> 
> Amos
> --
> Please be using
>Current Stable Squid 2.7.STABLE6 or 3.0.STABLE18
>Current Beta Squid 3.1.0.13


Re: If refresh_pattern only extends expiration, how to force time-to-live in Squid code?

2009-09-02 Thread Guy Bashkansky
(Resending, first time accidentally sent with HTML formatting, bounced)

Now I see the Expires header having a value in the past, which may
confuse clients and caches further down the chain.
Scenario: origin returns max-age=900 (15 min) and refresh_pattern
overrides expire to 24 hours, what do the headers to the client look
like?

On the first request (cache-miss), the Expires header is not added to
the response sent to client.
On subsequent cache-hits the Expires header is added to the response
sent to client. (Why this artifact?)

The Expires header is set to time the object was received from the
origin plus the value in the Max-age header.
This results in the Expires header having a value in the past when the
cached object is older than the Max-age.

How to fix it best? (in my local version)

Since my trouble is the Expires header having a value in the past, I
consider suppressing the Squid artifact of inserting an Expires
header.
Is there a Squid configuration ability to do so?  If not, what would
be the right way to do it in my local code branch?


On Fri, Aug 28, 2009 at 6:12 PM, Guy Bashkansky  wrote:
>
> Henrik,
> Thanks, it works!
> Guy
>
> On Thu, Aug 27, 2009 at 2:00 AM, Henrik Nordstrom 
>  wrote:
>>
>> ons 2009-08-26 klockan 18:17 -0700 skrev Guy Bashkansky:
>>
>> > If indeed refresh_pattern only extends expiration, I would like to
>> > develop a feature that enforces an exact time-to-live (per URL) in my
>> > local branch of Squid code.
>>
>> See the refreshStaleness() function. Should be sufficient to move the
>> max age check up above the expires check.
>>
>> Regards
>> Henrik
>>
>

-- Forwarded message --
From: Guy Bashkansky 
Date: Wed, Aug 26, 2009 at 6:17 PM
Subject: If refresh_pattern only extends expiration, how to force
time-to-live in Squid code?
To: squid-dev@squid-cache.org


I've tried to set an exact time-to-live (override origin cache
control) in Squid (2.4 STABLE6) configuration by refresh_pattern,
e.g.:

refresh_pattern   30_minutes_cache_control_url   15   0%   15
override-expire   ignore-max-age

Observed: URL is matched (in log), but objects still cached for 30
minutes, rather than for 15 minutes, as hoped.

If indeed refresh_pattern only extends expiration, I would like to
develop a feature that enforces an exact time-to-live (per URL) in my
local branch of Squid code.

What would be the most reasonable way to do this?  How can I force
objects to expire from cache after a given time?

Thanks.


Re: R: R: R: R: Squid 3 build errors on Visual Studio - problem still present

2009-09-02 Thread Henrik Nordstrom
ons 2009-09-02 klockan 21:11 +0200 skrev Guido Serassio:
> Hi,
> 
> OK, but what next ?

Can you produce a preprocessed source? That's the output of just the
preprocessor, not actual compilarion, comparable to gcc -E option. 

Easier to identify what the compiler actually saw that way... 

Regards
Henrik



Re: If refresh_pattern only extends expiration, how to force time-to-live in Squid code?

2009-09-02 Thread Henrik Nordstrom
ons 2009-09-02 klockan 12:42 -0700 skrev Guy Bashkansky:

> Now I see the Expires header having a value in the past, which may
> confuse clients and caches further down the chain.
> Scenario: origin returns max-age=900 (15 min) and refresh_pattern
> overrides expire to 24 hours, what do the headers to the client look
> like?
> 
> On the first request (cache-miss), the Expires header is not added to
> the response sent to client.
> On subsequent cache-hits the Expires header is added to the response
> sent to client. (Why this artifact?)

Is it? Should not, at least not unless you run 2.7 with the
act-as-origin option..

> The Expires header is set to time the object was received from the
> origin plus the value in the Max-age header.

odd..

Regards
Henrik



Re: If refresh_pattern only extends expiration, how to force time-to-live in Squid code?

2009-09-02 Thread Guy Bashkansky
I'm using a customized version of Squid 2.4 STABLE6.  But nothing
seems to be customized in refresh.c, except for my own recent swap of
age and expires checks (as recommended).

Probably the expires header is added in some other place, it's just
difficult to figure out exactly where in the code and how it is
controlled.


On Wed, Sep 2, 2009 at 1:29 PM, Henrik
Nordstrom wrote:
> ons 2009-09-02 klockan 12:42 -0700 skrev Guy Bashkansky:
>
>> Now I see the Expires header having a value in the past, which may
>> confuse clients and caches further down the chain.
>> Scenario: origin returns max-age=900 (15 min) and refresh_pattern
>> overrides expire to 24 hours, what do the headers to the client look
>> like?
>>
>> On the first request (cache-miss), the Expires header is not added to
>> the response sent to client.
>> On subsequent cache-hits the Expires header is added to the response
>> sent to client. (Why this artifact?)
>
> Is it? Should not, at least not unless you run 2.7 with the
> act-as-origin option..
>
>> The Expires header is set to time the object was received from the
>> origin plus the value in the Max-age header.
>
> odd..
>
> Regards
> Henrik
>
>


Re: [squid-users] Re: squid 2.7 - problems with kerberos authentication

2009-09-02 Thread Markus Moeller
This means your client does not use Kerberos but NTLM. Check that IE is 
configured with the fqdn.


Regards
Markus

- Original Message - 
From: "Дмитрий Нестеркин" 

To: "Henrik Nordstrom" 
Cc: "Markus Moeller" 
Sent: Wednesday, September 02, 2009 12:36 PM
Subject: Re: [squid-users] Re: squid 2.7 - problems with kerberos 
authentication



2 сентября 2009 г. 14:32 пользователь Дмитрий Нестеркин
(undelb...@gmail.com) написал:

external_acl_type ldap_check ttl=1200 %LOGIN
/usr/lib/squid/squid_ldap_group -R -b "dc=mydomain,dc=local" -f
"(&(objectclass=user)(sAMAccountName=%v
(memberof=cn=%a,ou=internet,dc=mydomain,dc=local))" -D
"proxyu...@mydomain.local" -w "password" -K -d 192.168.100.42


Do this work from the command line?

If it's a AD server then basic bind without TLS is generally not allowed
(deemed insecure).

The helper expects

login group

as input, and will respond with OK/ERR.

But since there is no debug output from squid_ldap_group I suspect
squid_kerb_auth isn't happy with something.. But it's odd there is no
debug output from squid_kerb_auth either...
Yes, It works from command line! And I can't understand why not with 
squid.


$ /usr/lib/squid/squid_ldap_group -R -b "dc=teliset,dc=local" -f
"(&(objectclass=user)(sAMAccountName=%v)(memberof=cn=%a,ou=internet,dc=teliset,dc=local))"
-D "proxyu...@teliset.local" -w "password" -K -d 192.168.100.42
my_username inet_allow
OK


I've updated krb5-user package to latest testing version. Now cache
log contain squid_kerb_auth info:

2009/09/02 15:27:46| Ready to serve requests.
2009/09/02 15:27:46| Done reading /var/spool/squid swaplog (405 entries)
2009/09/02 15:27:46| Finished rebuilding storage from disk.
2009/09/02 15:27:46|   405 Entries scanned
2009/09/02 15:27:46| 0 Invalid entries.
2009/09/02 15:27:46| 0 With invalid flags.
2009/09/02 15:27:46|   405 Objects loaded.
2009/09/02 15:27:46| 0 Objects expired.
2009/09/02 15:27:46| 0 Objects cancelled.
2009/09/02 15:27:46| 0 Duplicate URLs purged.
2009/09/02 15:27:46| 0 Swapfile clashes avoided.
2009/09/02 15:27:46|   Took 0.3 seconds (1453.0 objects/sec).
2009/09/02 15:27:46| Beginning Validation Procedure
2009/09/02 15:27:46|   Completed Validation Procedure
2009/09/02 15:27:46|   Validated 405 Entries
2009/09/02 15:27:46|   store_swap_size = 4052k
2009/09/02 15:27:46| storeLateRelease: released 0 objects
2009/09/02 15:32:48| squid_kerb_auth: Got 'YR
TlRMTVNTUAABB4IIogAFASgKDw==' from squid
(length: 59).
2009/09/02 15:32:48| squid_kerb_auth: received type 1 NTLM token
2009/09/02 15:32:50| squid_kerb_auth: Got 'YR
TlRMTVNTUAABB4IIogAFASgKDw==' from squid
(length: 59).
2009/09/02 15:32:50| squid_kerb_auth: received type 1 NTLM token
2009/09/02 15:32:50| squid_kerb_auth: Got 'YR
TlRMTVNTUAABB4IIogAFASgKDw==' from squid
(length: 59).
2009/09/02 15:32:50| squid_kerb_auth: received type 1 NTLM token
2009/09/02 15:32:51| squid_kerb_auth: Got 'YR
TlRMTVNTUAABB4IIogAFASgKDw==' from squid
(length: 59).
2009/09/02 15:32:51| squid_kerb_auth: received type 1 NTLM token




Re: Fun with Squid2 and Clang

2009-09-02 Thread Mark Nottingham
That's weird - I could have sworn it said that it was c / objective- 
c / c++.


Ah, well.

On 02/09/2009, at 8:31 PM, Henrik Nordstrom wrote:


Maybe that it's C++ while the others are C?

Hmm.. from Clang homepage

   "The Clang Static Analyzer consists of both a source code
   analysis framework and a standalone tool that finds bugs in C
   and Objective-C programs.".

C++ is not C or Objective-C, so it's not too strange it doesn't work  
for

C++ programs.

And some seconds further digging gives

   http://clang.llvm.org/cxx_status.html

Regards
Henrik



ons 2009-09-02 klockan 19:17 +1000 skrev Mark Nottingham:

Hm.

I'm trying 3.HEAD now, but it's giving me some trouble; analysis
starts up fine, but when it gets to doing cf_gen_defines, it switches
over to using g++ and doesn't switch back; see below.

cf_gen didn't cause any problems for squid2; is there something new
and weird in the build process here?


Users/mnot/Downloads/checker-0.218/libexec/ccc-analyzer -
DSQUID_SNMP=1  -I.. -I../include -I../include   -Werror -Wall -
Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-
declarations -Wcomments -D_REENTRANT -Wall -g -O2 -MT snmp_pdu.o - 
MD -

MP -MF .deps/snmp_pdu.Tpo -c -o snmp_pdu.o snmp_pdu.c
ANALYZE: snmp_pdu.c snmp_pdu_create
ANALYZE: snmp_pdu.c snmp_pdu_clone
ANALYZE: snmp_pdu.c snmp_pdu_fix
ANALYZE: snmp_pdu.c snmp_fix_pdu
ANALYZE: snmp_pdu.c snmp_pdu_free
ANALYZE: snmp_pdu.c snmp_free_pdu
ANALYZE: snmp_pdu.c snmp_pdu_encode
ANALYZE: snmp_pdu.c snmp_pdu_decode
ANALYZE: snmp_pdu.c snmp_add_null_var
mv -f .deps/snmp_pdu.Tpo .deps/snmp_pdu.Po
/Users/mnot/Downloads/checker-0.218/libexec/ccc-analyzer -
DSQUID_SNMP=1  -I.. -I../include -I../include   -Werror -Wall -
Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-
declarations -Wcomments -D_REENTRANT -Wall -g -O2 -MT  
snmplib_debug.o -
MD -MP -MF .deps/snmplib_debug.Tpo -c -o snmplib_debug.o  
snmplib_debug.c

ANALYZE: snmplib_debug.c snmplib_debug
mv -f .deps/snmplib_debug.Tpo .deps/snmplib_debug.Po
rm -f libsnmp.a
/usr/bin/ar cru libsnmp.a asn1.o parse.o snmp_vars.o coexistance.o
snmp_api.o snmp_error.o mib.o snmp_api_error.o snmp_msg.o snmp_pdu.o
snmplib_debug.o
ranlib libsnmp.a
Making all in scripts
make[1]: Nothing to be done for `all'.
Making all in src
gawk -f ./cf_gen_defines <./cf.data.pre >cf_gen_defines.h
sed "\
s...@default_http_port@%3128%g;\
s...@default_icp_port@%3130%g;\
s...@default_cache_effective_user@%nobody%g;\
s...@default_mime_table@%/opt/squid3-test/etc/mime.conf%g;\
s...@default_dnsserver@%/opt/squid3-test/libexec/`echo dnsserver | sed
's,x,x,;s/$//'`%g;\
s...@default_unlinkd@%/opt/squid3-test/libexec/`echo unlinkd | sed
's,x,x,;s/$//'`%g;\
s...@default_pinger@%/opt/squid3-test/libexec/`echo pinger | sed
's,x,x,;s/$//'`%g;\
s...@default_diskd@%/opt/squid3-test/libexec/`echo diskd | sed
's,x,x,;s/$//'`%g;\
s...@default_cache_log@%/opt/squid3-test/var/logs/cache.log%g;\
s...@default_access_log@%/opt/squid3-test/var/logs/access.log%g;\
s...@default_store_log@%/opt/squid3-test/var/logs/store.log%g;\
s...@default_pid_file@%/opt/squid3-test/var/squid.pid%g;\
s...@default_netdb_file@%/opt/squid3-test/var/logs/netdb.state%g;\
s...@default_swap_dir@%/opt/squid3-test/var/cache%g;\
s...@default_icon_dir@%/opt/squid3-test/share/icons%g;\
s...@default_mib_path@%/opt/squid3-test/share/mib.txt%g;\
s...@default_error_dir@%/opt/squid3-test/share/errors%g;\
s...@default_config_dir@%/opt/squid3-test/etc%g;\
s...@default_prefix@%/opt/squid3-test%g;\
s...@default_hosts@%/etc/hosts%g;\
s...@[v]ersion@%3.HEAD-20090902%g;"\
< ./cf.data.pre >cf.data
depbase=`echo cf_gen.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/opt/squid3-test/etc/
squid.conf\" -DDEFAULT_SQUID_DATA_DIR=\"/opt/squid3-test/share\" -
DDEFAULT_SQUID_CONFIG_DIR=\"/opt/squid3-test/etc\"  -I.. -I../ 
include -

I../src -I../include -I../lib -I../src   -I/usr/include/libxml2 -
Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  - 
D_REENTRANT -
g -O2 -MT cf_gen.o -MD -MP -MF $depbase.Tpo -c -o cf_gen.o  
cf_gen.cc &&\

mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++ -I/usr/include/ 
libxml2 -
Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  - 
D_REENTRANT -

g -O2  -g -o cf_gen cf_gen.o -L../lib -lmiscutil ../compat/
libcompat.la -lexpat -lxml2  -lm -lresolv
mkdir .libs
g++ -I/usr/include/libxml2 -Werror -Wall -Wpointer-arith -Wwrite-
strings -Wcomments -D_REENTRANT -g -O2 -g -o cf_gen cf_gen.o -Wl,-
bind_at_load  -L/Users/mnot/Downloads/squid-3.HEAD-20090902/lib -
lmiscutil ../compat/.libs/libco

Re: If refresh_pattern only extends expiration, how to force time-to-live in Squid code?

2009-09-02 Thread Henrik Nordstrom
ons 2009-09-02 klockan 13:42 -0700 skrev Guy Bashkansky:
> I'm using a customized version of Squid 2.4 STABLE6.  But nothing
> seems to be customized in refresh.c, except for my own recent swap of
> age and expires checks (as recommended).

Ouch.. that's a very very old relese. Upgrading highly recommended.

> Probably the expires header is added in some other place, it's just
> difficult to figure out exactly where in the code and how it is
> controlled.

grep -4 HDR_EXPIRES src/*.c

Regards
Henrik



New dev account please

2009-09-02 Thread iamfromit
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey!

I'd like to join the squid project and contribute some time/energy to
working on outstanding issues, mainly with ICAP support.  I'm no
expert programmer, but I'm motivated and this is interesting to me, so
I'll be working with other devs on the project to make sure I'm up to
standards and expectations.

I work for a major international insurance company and use several web
proxy products and ICAP implementations daily, and spend a lot of time
troubleshooting them since they don't all play nicely with ICAP RFC. I
think I have a great handle on ICAP as a protocol, and would like to
apply this experience back to the OS community where possible. I'm
sure I'll learn and find other areas that I am capable of contributing
to as well.

My sourceforge id is iamfromit

Thanks,

Jonathan Miller
iamfro...@gmail.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqemH4ACgkQgGnkqY2ikRusLACfYo3uVTCC+Gg9cxwt5+V1ok99
sa4AnRt5/JX50m4+LvRzDzb/LWtVQ+PY
=dCTv
-END PGP SIGNATURE-



Re: [PATCH] fixed entry size for max-size

2009-09-02 Thread Henrik Nordstrom
bb: approve

+1. Sane, and correct, and also matches what Squid-2 is doing.

Hmm.. wonder how that got lost in Squid-3. The change in squid-2 is very
old (3 may 2000). Investigating. Right, got lost in refactoring
(revision 5998). The comment from when this was fixed in Squid-2 is even
left just not visible in your patch, but is there a couple of lines
before where you moved back the tlv composing.

Regards
Henrik

ons 2009-09-02 klockan 00:05 -0600 skrev Alex Rousskov:
> Fixed entry size calculation for the max-size cache_dir selection
> algorithms.
> 
> There were two sides of this bug:
> 
> In src/store_swapout.cc, we must create metadata earlier because
> storeCreate() needs swap_hdr_sz. With swap_hdr_sz unknown at the time of
> storeCreate(), the SwapDir selection algorithms may select SwapDirs that
> should not really take the entry as the real storage size (with the
> metadata swap_hdr_sz) would exceed the store slot size.
> 
> In src/store_dir.cc, we must add the metadata size before looking for
> cache_dirs that accept objsize. Only the "new"
> storeDirSelectSwapDirRoundRobin selection scheme was affected.
> 
> HTH,
> 
> Alex.
> P.S. I do not have a version of this patch generated against trunk, but
> I hope it applies easily.
> 



Re: New dev account please

2009-09-02 Thread Amos Jeffries

iamfromit wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey!

I'd like to join the squid project and contribute some time/energy to
working on outstanding issues, mainly with ICAP support.  I'm no
expert programmer, but I'm motivated and this is interesting to me, so
I'll be working with other devs on the project to make sure I'm up to
standards and expectations.

I work for a major international insurance company and use several web
proxy products and ICAP implementations daily, and spend a lot of time
troubleshooting them since they don't all play nicely with ICAP RFC. I
think I have a great handle on ICAP as a protocol, and would like to
apply this experience back to the OS community where possible. I'm
sure I'll learn and find other areas that I am capable of contributing
to as well.

My sourceforge id is iamfromit

Thanks,need

Jonathan Miller
iamfro...@gmail.com



Welcome Jonathan,

  The devel site is a bit out of date there sorry. Squid-3 uses Bazaar 
(bzr) as its VCS so sourceforge is mostly used for Squid-2 stuff.


The new(er) developer guidelines are at:
  here:http://wiki.squid-cache.org/DeveloperResources

Details on how to setup bzr and a local working environment are at:
  http://wiki.squid-cache.org/Squid3VCS

The coding guidelines are at:
  http://wiki.squid-cache.org/Squid3CodingGuidelines


For ICAP Alex is the resident expert/mentor/coordinator. He is a bit 
busy at present so may not be readily available, but grab a copy of the 
code anyways and see if you can understand how the relevant bits work.


Feel free to jump on anything you see happening wrong. Just remember to 
mention anything that might take longer that a day to fix, so we don't 
have people doubling up on work. Reconciling differences in approach and 
style can be annoying for all involved.


Whenever you have something ready for submission, or even if you just 
want opinions post a patch or merge bundle here to squid-dev mailing list.



For stuff to practice on there is a list of general tasks anyone can do
http://wiki.squid-cache.org/RoadMap/Tasks though none of them approach 
the ICAP area yet.



Amos
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE18
  Current Beta Squid 3.1.0.13