hno [Thu, 1 Mar 2001 10:27:54 +0000 (10:27 +0000)]
From Costas Tavernarakis:
The following resolves squid 2.4 bug that on bugzilla is #79,
"NULL pointer access in storeDirSwapLog while writing icons".
ANSI C defines that integers in bitfields declared as 'int' are
either signed or unsigned, depending on the implementation.
gcc (unless -funsigned-bitfields is used) uses signed integers by
default. Sun cc uses unsinged.
Although not explicitly defined, squid expects the two bitfields
at lines 1324-1325 of structs.h to always be declared as signed,
which is not generally true.
Any portable program should always specify whether bitfield integer
types are signed or not.
hno [Mon, 26 Feb 2001 04:49:07 +0000 (04:49 +0000)]
From Chemolli Francesco:
Support for the types int16_t, int32_t, int64_t and their unsigned
counterparts u_int16_t, u_int32_t, u_int64_t. Legacy support for num32
is provided, but I recommend we deprecate num* types and (where struct
packing is useful) we move in time fully to the new types.
wessels [Sat, 24 Feb 2001 02:42:36 +0000 (02:42 +0000)]
Removing the "state == NULL" assertion in comm_write().
Previously, this assertion was always true because we used
safe_free(state), but then state got MemPool-ified. Although
we did NULL fd_table[fd].rwstate, we didn't NULL 'state'.
The assertion is unneeded because fd_table[fd].rwstate will
always be freed if it is set at the beginning of the function.
wessels [Fri, 23 Feb 2001 04:05:56 +0000 (04:05 +0000)]
Changed the way that we pick between O_NDELAY and O_NONBLOCK for
Solaris. From way back we always used O_NDELAY rather than O_NONBLOCK
for SunOS and Solaris. The actual reasons why we assumed O_NONBLOCK is
broken are forgotten.
Recent evidence indicates that O_NONBLOCK on Solaris (v8) works
correctly and is actually required for detecting EOF on kernel
pipes (e.g. with diskd).
This change will make solaris use O_NONBLOCK if its defined.
hno [Wed, 14 Feb 2001 04:45:48 +0000 (04:45 +0000)]
From Robert Collins:
The bug is really more of an unexpected feature: when testing for
content-type on reply mime headers, messages with no entitie will
never match a mime type, so restrictive access configurations will
not let them though. The bad thing is that 304 responses (along
with 1xx & 204) will never have a content-type header. Therefore
they never match and IMS responses to the client always fail. And
at the moment there is no acl for the status line, so we cannot
let the user decide...
hno [Mon, 12 Feb 2001 03:06:15 +0000 (03:06 +0000)]
Cleanup of how "httpd_accel_port virtual" is handled. Now httpd_accel_port
is always (for accelerated request) used if it is set, and if virtual then
the port number is retreived from
a) Host header (when httpd_accel_uses_host_header is on)
b) Transparent redirection/NAT lookup
c) Local endpoint of the socket
Previosly is was a mix where some always overrode httpd_accel_port, and
in some cases virtual was even ignored causing a port number of 0..
hno [Sun, 11 Feb 2001 21:10:34 +0000 (21:10 +0000)]
Removed some old stale "todo" comments about EWOULDBLOCK which no longer
applies (async-io never returns EWOULDBLOCK on overload in the current
implementation)
hno [Sat, 10 Feb 2001 02:35:10 +0000 (02:35 +0000)]
From Robert Collins:
implements a new acl type rep_mime_type, complementary to
req_mime_type, and a new access list http_reply_access which allows acls
to be applied to replies. The prime target is content-type filtering.
One such example would be to only allow a particular set of users the
ability to download tgz. (ie by combining proxy_auth and rep_mime_type).
I created a new acl type rather than moving the request vs reply header
field decision to the calling routine as that seems to be the approach
all over the place.
hno [Fri, 26 Jan 2001 05:54:52 +0000 (05:54 +0000)]
From Kevin Littlejohn:
makes cache_cf.c not try and figure out nobody and nogroup if it's not
going to use them - ie. if squid is being run as a user instead of as root.
It came up because I don't have a nogroup on my machine.
Additions by Henrik Nordstrom:
cache_effective_group now defaults to the GID of cache_effective_user, or
the current user if not started as root. If can always be specified to some
other value if required, but are then subject to the permissions set by the
os (i.e. only root can set the group to a group where he/she is not a member)
wessels [Thu, 25 Jan 2001 05:38:25 +0000 (05:38 +0000)]
cacheCurrentResFileDescrCnt was reporting "Number_FD" rather than
RESERVED_FD. Note the MIB doesn't have a variable for the number
of filedescriptors currently open.
hno [Wed, 10 Jan 2001 04:06:43 +0000 (04:06 +0000)]
Made overloaded dnsserver queues a soft error unless the queue is
completely stuck (3 minutes). This to handle internet-breakdowns more
gracefully when not using the internal DNS client.
hno [Tue, 9 Jan 2001 21:11:14 +0000 (21:11 +0000)]
More adjustments of sfileno/sdirno.
* sdirno type changed back to int, as GCC does not like to use char
for integer operations (array indexing).
* sizes adjusted to
swap_filen:25
swap_dirn:7
This limits the cache size to
files/cache_dir: 2^24 (16777216)
cache_dirs : 2^6-1 (63)
* a couple of asserts added to ensure the above limits.
wessels [Tue, 9 Jan 2001 07:18:43 +0000 (07:18 +0000)]
Use statfs(2) for cachemgr 'storedir' output when statvfs() isn't available.
I created storeDirGetUFSStats() in src/store_dir.c to reduce code
duplication until we have a better place for stuff like that.
wessels [Tue, 9 Jan 2001 06:32:21 +0000 (06:32 +0000)]
assertion failed: forward.c:607: "e->store_status == STORE_PENDING".
In ftpSendPasv() we call fwdComplete() for HEAD requests. I'm
seeing some of these requests get aborted after reading on the
control connection, and before calling fwdComplete(). Since the
entry was aborted, its store_status is already set to STORE_OK
and we get the assertion by calling fwdComplete() on this entry.
hno [Mon, 8 Jan 2001 06:32:04 +0000 (06:32 +0000)]
Major rewrite of proxy authentication to support other schemes than
Basic (auth_rewrite branch on SourceForge).
Contributors:
Andy Doran
Robert Collins
Chemolli Francesco
Henrik Nordstrom
For details about the new API's, see Programmers Guide.
As part of this change everything from auth_modules has been moved to
src/auth/basic/helpers