the main loop. This is useful for very quickly executed lfs runs
such as those in tests, as an initialization phase cleaner may
prevent file system unmount.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.
this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.
i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.
some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
o major rework and clean up of internal interfaces. move the main
program into main.c, the remaining parts are useable as library.
add bindings for lua. by Alistair G. Crooks <agc@netbsd.org>
o fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566325
special thanks to al for the majority of these changes.
(allow file 'c'reation - 'w'riting was always available, with some twist;
plus there's already such a feature elsewhere, so let's try to not
diverge needlessly)
- add -p pathsep option
- make wrap to zero work, but produce a warning
While here:
- fix gcc warnings, in particular variable clobbered warnings
(compiling with fewer warnings does not really fix the problem)
* Fix WARNS=4 issues (const & sign mismatches, etc)
* Ensure various ftpd.conf values can't exceed their underlying types.
* Fix for 64 bit time_t and dev_t
* Rename internal getline() function to get_line() so it does
conflict with the getline(3) libc function.
* Log both the hostname and numeric address.
* Improve man page mdoc formatting
a struct called kernelops, which contains standard system calls
for the normal case and rump system calls for the rump case.
Make it possible to run the lfs cleaner in a library fashion (taking
the quick route with the implementation).
complaining that we're "discarding qualifier from pointer target
type".
Use const char * instead of caddr_t to avoid the warning and get
distribution building on hppa again.
o close more leaking file descriptors for CGI and daemon mode
o add subdirs for build "debug" and "small" versions
o clean up a bad merge / duplicate code
o make mmap() usage portable, fixes linux & ranges: support
o document the -f option
o daemon mode now serves 6 files per child
o avoid dying in daemon mode for some uncommon, but recoverable, errors
o close leaking file descriptors for CGI and daemon mode
o handle poll errors properly
o don't try to handle more than one request per process yet
this covers PR#38489 and PR#40079, as well some some issues reported
privately.
o make bozohttpd internally more modular, preparing the way
to handle more than one request per process
o fix http-auth, set $REMOTE_USER not $REMOTEUSER. also fix
cgi-bin with cvsweb, from Holger Weiss <holger@CIS.FU-Berlin.DE>
o fix an uninitialised variable use in daemon mode
o fix ssl mode with newer OpenSSL
o mmap large files in manageable sizes so we can serve any size file
o refactor url processing to handle query strings correctly for CGI
from Sergey Katsev at Coyote Point
o add If-Modified-Since support, from Joerg Sonnenberger
<joerg@netbsd.org>
o many more manual fixes, from NetBSD
both the "data" and "prefix" elements are identical. For example, the
two lines
amiga/boot (8) - system bootstrapping procedures
amd64/boot (8) - system bootstrapping procedures
both appear with data = "boot (8) - system bootstrapping procedures" but
with different values for prefix, and we do not want to reject one of
them as a duplicate.
1) Fix an issue where because of the reordering of transform_request
and process_cgi, the cgi-script name was being cut off
by one character (transform_request for some reason
cuts off the leading '/' for the file name as part of its
processing). As an 'easy' fix, simply re-add the '/' to the
front of the filename, which means that we don't have to
mess with the logic that sometimes adds +1 and sometimes doesn't.
2) Work around ridiculous bug in PHP reported by lukem in 2004,
but stubbornly never fixed by the PHP maintainers:
Change the SCRIPT_NAME and SCRIPT_FILENAME variables
to contain the file name only, not the query if one exists.
Having the query in SCRIPT_FILENAME causes php-cgi to not
work, as per the bug information here:
http://bugs.php.net/bug.php?id=28227
3) Fix a memory leak because URL wasn't being freed.
CGI handling, including bin/40355 . There are two main changes here:
1) call process_cgi() after transform_request(), not before. Now it is
possible to have a default cgi handler catch a request for a path that
was produced by transformation, e.g. by index generation -- so now the
index can be "generated" by a CGI if that is what the user desires.
2) More clearly distinguish "file" from "query" portions of the request
URL, so we do not feed ?-suffixed "arguments" to plain files, fail to
match filename extensions due to ?-suffixes, etc.
After this change, there are only two cases which use the "query"
portion of the request (the portion after the ?):
a) A redirect issued by HTTPD will redirect to the new file, but
with the same query string.
b) process_cgi() will, of course continue to use the query string.