Commit Graph

3868 Commits

Author SHA1 Message Date
Jason Evans 390a1cd5eb Deal correctly with statically initialized condition variables in
pthread_cond_signal(), pthread_cond_broadcast(), and pthread_cond_timedwait().

Do not dump core in pthread_cond_timedwait() (due to a NULL pointer
dereference) if attempting to wait on an uninitialized condition variable.

PR:	bin/18099
2000-07-17 22:55:05 +00:00
Jason Evans 82db3da3e1 Reshuffle the SEE ALSO section.
Prompted by:	sheldonh
2000-07-17 22:33:32 +00:00
Dag-Erling Smørgrav 1a5faa1061 Introduce fetchXGet*(), which combine the functionalities of fetchGet*() and
fetchStat*().  In most cases, either fetchGet*() or fetchXGet*() is a wrapper
around the other; in all cases, calling fetchGet*() is identical to calling
fetchXGet*() with the second argument set to NULL.
2000-07-17 21:25:00 +00:00
Dag-Erling Smørgrav c789727701 Don't forget to set file descriptor to -1 after closing it, since the code
outside the loop inspects it to determine whether or not we succeeded in
retrieving the requested document. This fixes a bug where fetchGetHTTP()
would return a FILE with an invalid file descriptor if it hit the redirect
limit without locating the requested document.
2000-07-17 21:09:11 +00:00
Dag-Erling Smørgrav 5cd33c40d7 Use a symbolic constant instead of hardcoding 999 2000-07-17 21:00:49 +00:00
Dag-Erling Smørgrav d999dcac2d Don't forget to declare fetchRestartCalls. 2000-07-17 20:52:06 +00:00
Dag-Erling Smørgrav a1bb3f482a Introduce the (undocumented) variable fetchRestartCalls, which controls whether
or not interrupted system calls will be restarted. This fixes a bug where
fetch(1) would hang (potentially forever) if a server stopped responding,
because the signal handler would absorb the user's efforts to interrupt the
transfer.
2000-07-17 20:49:39 +00:00
Dag-Erling Smørgrav 7c80207e33 Remove fetchContentType(), which disappeared in the HTTP rewrite. 2000-07-17 20:42:13 +00:00
Alexander Langer 24c196fe25 Add SEE ALSO section, as with the other string functions.
Submitted by:	dcs
2000-07-17 19:00:26 +00:00
Dag-Erling Smørgrav e66b380285 #ifdef DEBUG -> #ifndef NDEBUG
Pointed out by:	ache
2000-07-16 23:18:44 +00:00
Dag-Erling Smørgrav 6290ee735b Reinsert the MIT copyright, which applies to the base64 code and was
left out by accident during the rewrite.
2000-07-16 01:04:10 +00:00
Ben Smithurst f21ff38bf4 Make the NAME section a bit less confusing.
PR:		19262
Submitted by:	NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp>
Reviewed by:	sheldonh
2000-07-15 13:04:33 +00:00
Hajimu UMEMOTO 6484396e99 Sshd writes connected host into utmp directly. If the connection is
via IPv6, the hostname is trimed due to the length of IPv6 address.
This change saves it as possible.
I have a grudge against the shortage of UT_HOSTSIZE.
2000-07-14 18:08:19 +00:00
Hajimu UMEMOTO b208ff84c1 Add IPv6 scoped address support.
It enables us to control link-local connections by interface like
this:

    ALL : [fe80::%ed0]/10 : allow
    ALL : [fe80::]/10 : deny
2000-07-14 17:15:34 +00:00
Sheldon Hearn 0c69785700 Make sbsize a size instead of a number. This allows the usual suffixes
to be applied to the value given.  This does not break installed
/etc/login.conf files, since un-suffixed numbers are interpreted as
they were before.

PR:		19750
Submitted by:	Paul Herman <pherman@frenchfries.net>
2000-07-14 13:56:07 +00:00
Jeroen Ruigrok van der Werven 62048b0a9e Fix typo, teh -> the. 2000-07-14 11:23:04 +00:00
Dag-Erling Smørgrav f4683775d7 Fix a bug (misplaced continue) that caused redirects to fail. Lots of code
moved around, but the acutal functional changes are small.
Add support for site-internal redirects (where the Location: header gives a
path instead of an absolute URI)

Pointed out by:	kuriyama
2000-07-13 09:13:58 +00:00
John Baldwin be0fdc4646 - Allow support for MBR boot loaders that are longer than one sector. As
with fdisk, ensure that they are a multiple of the sector size in length.
- Axe all the 1024 cylinder checks as they are no longer relevant with the
  fixed bootstrap.
2000-07-12 18:05:18 +00:00
Dag-Erling Smørgrav 98f5573fdd Fully document the HTTP authorization feature.
Update the BUGS section to reflect the HTTP rewrite.
2000-07-12 10:41:29 +00:00
Dag-Erling Smørgrav e4878e39a3 Extensive rewrite of the HTTP code. The new code is significantly cleaner and
more robust, and somewhat more efficient. It also handles authorization and
redirects properly, and supports timeouts like the FTP code.

Many thanks to Umemoto-san for his assistance with IPv6 support, both here
and in other parts of libfetch.
2000-07-12 10:39:56 +00:00
Kris Kennaway 0e0b415c72 Don't call warn() without a format string. 2000-07-12 00:50:15 +00:00
Dag-Erling Smørgrav e137bceb8f Use fetch_putln() 2000-07-11 23:50:22 +00:00
Dag-Erling Smørgrav a176302737 Add _fetch_putln() 2000-07-11 23:50:08 +00:00
Kris Kennaway c2616fc538 Don't call printf without a format string. 2000-07-11 23:49:24 +00:00
Dag-Erling Smørgrav bc2a5e683a Document that basic authorization now kinda works. 2000-07-11 18:13:08 +00:00
Dag-Erling Smørgrav 35f723db8a Rework the authorization code.
Only send absolute URI if connected to a proxy, since Apache doesn't always
understand absolute URIs.
Clean up some of the debugging output.
2000-07-11 18:12:41 +00:00
Dag-Erling Smørgrav ec894321e3 Clean up the debugging output 2000-07-11 18:07:09 +00:00
Ben Smithurst 744cb90e1f Fix typo; sa_siginfo -> sa_sigaction
PR:		19602
Submitted by:	Tony Finch <dot@dotat.at>
2000-07-11 11:39:57 +00:00
Peter Wemm 4a1afa49fd Try and fix the worst of some highly bogus malloc/free resource
management involving rcmd_af(), getaddrinfo(), freeaddrinfo(), etc.
We set *ahost to point to ai->canonname; and later free the ai-> stuff
and still leave the old pointers in *ahost to the freed data.
Perhaps the best way to deal with this is a static buffer or a static
strdup() that is freed on the next iteration or something.  This gives
me headaches just thinking about this.

The new 'AJ' default for malloc() tripped this up.
2000-07-11 09:31:19 +00:00
Hajimu UMEMOTO 7487ef6243 Free chunks obtained by getaddrinfo(3).
Approved by:	des
2000-07-10 16:28:28 +00:00
Hajimu UMEMOTO 80fe4a43d1 Separate parsing code of 229 replies from the code for 227 and 228.
Don't assume 227 and 228 replies enclose remote address with parentheses.
2000-07-10 10:00:20 +00:00
Hajimu UMEMOTO fa5dce6c26 Make EPSV work again. Separate parsing code of 229 replies from
the code for 227 and 228.

Submitted by:	des
2000-07-10 08:41:25 +00:00
Brian Feldman c98c98a822 Actually make it so this Makefile can build grot. 2000-07-10 06:10:47 +00:00
Daniel C. Sobral beea813ee4 Add a test case for one of the bugs found on the new additions to
regex(3).
2000-07-09 18:14:39 +00:00
Daniel C. Sobral 8ca5c256cb Spencer's regex(3) test code.
Obtained from: BSD/OS
2000-07-09 18:13:35 +00:00
Daniel C. Sobral 8f9e434f46 altoffset() always returned whenever it recursed, because at the end
of the processing of the recursion, "scan" would be pointing to O_CH
(or O_QUEST), which would then be interpreted as being the end character
for altoffset().

We avoid this by properly increasing scan before leaving the switch.

Without this, something like (a?b?)?cc would result in a g->moffset of
1 instead of 2.

I added a case to the soon-to-be-imported regex(3) test code to catch
this error.
2000-07-09 17:45:30 +00:00
Daniel C. Sobral b6c1a56180 Since g->moffset points to the _maximum_ offset at which the must
string may be found (from the beginning of the pattern), the point
at which must is found minus that offset may actually point to some
place before the start of the text.

In that case, make start = start.

Alternatively, this could be tested for in the preceding if, but it
did not occur to me. :-)

Caught by: regex(3) test code
2000-07-09 17:36:53 +00:00
Daniel C. Sobral 517bffca1b Add some casts here and there. 2000-07-09 15:12:28 +00:00
Poul-Henning Kamp 832505d0c9 Turn malloc options "AJ" on by default.
These will be turned off again as we approach 5.0-RELEASE.

If you benchmark things, make sure to
	ln -sf j /etc/malloc.conf
to see "true" performance.
2000-07-09 13:10:18 +00:00
Jun-ichiro itojun Hagino ec20fe00cc reject empty scopeid. use strtoul() for checking all-numericness of
portname.  explicitly reject empty numeric portname.
sync with kame.  based on comments from itohy@netbsd.org
2000-07-09 06:10:01 +00:00
Daniel Harris 9559d2b084 First appeared in 2.9BSD, not 3.0.
PR:		19263
Submitted by:	NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp>
Obtained from:	Open|NetBSD
2000-07-08 18:17:12 +00:00
Daniel C. Sobral 6d902efe43 Since we have modified charjump to be CHAR_MIN-based, we have to
correct the offset when we free it.

Caught by: phkmalloc
2000-07-08 09:45:17 +00:00
Dag-Erling Smørgrav 51e3d46ec0 Don't assume the remote address in a 227 reply is enclosed in parentheses. 2000-07-08 09:27:47 +00:00
Dag-Erling Smørgrav 4d029f13b4 Fix basic authentication, and add proxy authentication.
Submitted by:	se
2000-07-08 08:08:58 +00:00
John Polstra 59a821dae2 Change the dllockinit() interface from "experimental" to
"deprecated" and warn that it will disappear eventually.
2000-07-08 04:17:28 +00:00
Andrey A. Chernov 6ea9889255 fix comment 2000-07-07 08:24:50 +00:00
Nick Hibma 96102cae1a Remove DIAGASSERT 2000-07-07 08:15:19 +00:00
Daniel C. Sobral 4d41cae8f8 Do not free NULL pointers. 2000-07-07 07:47:39 +00:00
Daniel C. Sobral c5e125bbbf Deal with the signed/unsigned chars issue in a more proper manner. We
use a CHAR_MIN-based array, like elsewhere in the code.

Remove a number of unused variables (some due to the above change, one
that was left after a number of optimizing steps through the source).

Brucified by: bde
2000-07-07 07:46:36 +00:00
John-Mark Gurney 20ff215b1d remove sys/time.h by instruction from bde. 2000-07-06 22:18:44 +00:00