Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/httpd merge bozohttpd 20100621
details: https://anonhg.NetBSD.org/src/rev/b51e1f0aefd2
branches: trunk
changeset: 755801:b51e1f0aefd2
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Jun 22 05:24:12 2010 +0000
description:
merge bozohttpd 20100621
diffstat:
libexec/httpd/CHANGES | 8 +++++++-
libexec/httpd/bozohttpd.8 | 12 +++++++++---
libexec/httpd/bozohttpd.c | 20 ++++++++++----------
libexec/httpd/daemon-bozo.c | 11 ++++++++---
4 files changed, 34 insertions(+), 17 deletions(-)
diffs (144 lines):
diff -r 85883f59dd3b -r b51e1f0aefd2 libexec/httpd/CHANGES
--- a/libexec/httpd/CHANGES Mon Jun 21 21:51:22 2010 +0000
+++ b/libexec/httpd/CHANGES Tue Jun 22 05:24:12 2010 +0000
@@ -1,4 +1,10 @@
-$eterna: CHANGES,v 1.75 2010/06/17 19:26:54 mrg Exp $
+$eterna: CHANGES,v 1.76 2010/06/21 06:45:45 mrg Exp $
+
+changes since bozohttpd 20100617:
+ o properly fully disable multi-file mode for now
+ o fix the -t and -U options when used without the -e option, broken since
+ the library-ifcation
+ o be explicit that logs go to the FTP facility in syslog
changes since bozohttpd 20100509:
o fix some compile issues
diff -r 85883f59dd3b -r b51e1f0aefd2 libexec/httpd/bozohttpd.8
--- a/libexec/httpd/bozohttpd.8 Mon Jun 21 21:51:22 2010 +0000
+++ b/libexec/httpd/bozohttpd.8 Tue Jun 22 05:24:12 2010 +0000
@@ -1,6 +1,6 @@
-.\" $NetBSD: bozohttpd.8,v 1.20 2010/06/17 19:43:30 mrg Exp $
+.\" $NetBSD: bozohttpd.8,v 1.21 2010/06/22 05:24:12 mrg Exp $
.\"
-.\" $eterna: bozohttpd.8,v 1.96 2010/06/17 19:27:32 mrg Exp $
+.\" $eterna: bozohttpd.8,v 1.98 2010/06/21 06:47:23 mrg Exp $
.\"
.\" Copyright (c) 1997-2010 Matthew R. Green
.\" All rights reserved.
@@ -66,6 +66,12 @@
.Fl v
option for virtual hosting.)
.Nm
+writes logs to
+.Xr syslog 3
+using the ftp facaility (but see the
+.Fl s
+option for testing.)
+.Nm
is designed to be small, simple and relatively featureless,
hopefully increasing its security.
.Ss OPTIONS
@@ -458,7 +464,7 @@
and regular code audits.
This manual documents
.Nm
-version 20100617.
+version 20100621.
.Sh AUTHORS
.Nm
was written by Matthew R. Green
diff -r 85883f59dd3b -r b51e1f0aefd2 libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Mon Jun 21 21:51:22 2010 +0000
+++ b/libexec/httpd/bozohttpd.c Tue Jun 22 05:24:12 2010 +0000
@@ -1,6 +1,6 @@
-/* $NetBSD: bozohttpd.c,v 1.20 2010/06/17 19:43:30 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.21 2010/06/22 05:24:12 mrg Exp $ */
-/* $eterna: bozohttpd.c,v 1.172 2010/06/17 19:27:32 mrg Exp $ */
+/* $eterna: bozohttpd.c,v 1.174 2010/06/21 06:47:23 mrg Exp $ */
/*
* Copyright (c) 1997-2010 Matthew R. Green
@@ -109,7 +109,7 @@
#define INDEX_HTML "index.html"
#endif
#ifndef SERVER_SOFTWARE
-#define SERVER_SOFTWARE "bozohttpd/20100617"
+#define SERVER_SOFTWARE "bozohttpd/20100621"
#endif
#ifndef DIRECT_ACCESS_FILE
#define DIRECT_ACCESS_FILE ".bzdirect"
@@ -329,10 +329,14 @@
bozo_clean_request(bozo_httpreq_t *request)
{
struct bozoheaders *hdr, *ohdr = NULL;
+ bozohttpd_t *httpd = request->hr_httpd;
if (request == NULL)
return;
+ /* If SSL enabled cleanup SSL structure. */
+ bozo_ssl_destroy(httpd);
+
/* clean up request */
#define MF(x) if (request->x) free(request->x)
MF(hr_remotehost);
@@ -752,9 +756,6 @@
cleanup:
bozo_clean_request(request);
- /* If SSL enabled cleanup SSL structure. */
- bozo_ssl_destroy(httpd);
-
return NULL;
}
@@ -1940,8 +1941,8 @@
{
struct passwd *pw;
extern char **environ;
+ static char *cleanenv[1] = { NULL };
uid_t uid;
- char *cleanenv[1];
char *chrootdir;
char *username;
char *portnum;
@@ -2063,10 +2064,9 @@
* by chroot. cross-user settings might result in undesirable
* effects.
*/
- if ((chrootdir != NULL || username != NULL) && !dirtyenv) {
- cleanenv[0] = NULL;
+ if ((chrootdir != NULL || username != NULL) && !dirtyenv)
environ = cleanenv;
- }
+
#ifdef _SC_PAGESIZE
httpd->page_size = (long)sysconf(_SC_PAGESIZE);
#else
diff -r 85883f59dd3b -r b51e1f0aefd2 libexec/httpd/daemon-bozo.c
--- a/libexec/httpd/daemon-bozo.c Mon Jun 21 21:51:22 2010 +0000
+++ b/libexec/httpd/daemon-bozo.c Tue Jun 22 05:24:12 2010 +0000
@@ -1,6 +1,6 @@
-/* $NetBSD: daemon-bozo.c,v 1.10 2010/06/17 19:43:30 mrg Exp $ */
+/* $NetBSD: daemon-bozo.c,v 1.11 2010/06/22 05:24:12 mrg Exp $ */
-/* $eterna: daemon-bozo.c,v 1.21 2010/06/07 21:48:51 mrg Exp $ */
+/* $eterna: daemon-bozo.c,v 1.22 2010/06/21 06:45:45 mrg Exp $ */
/*
* Copyright (c) 1997-2010 Matthew R. Green
@@ -187,7 +187,12 @@
/* if we've handled 5 files, exit and let someone else work */
if (httpd->request_times > 5 ||
(httpd->background == 2 && httpd->request_times > 0))
- exit(0);
+ _exit(0);
+
+#if 1
+ if (httpd->request_times > 0)
+ _exit(0);
+#endif
while (httpd->background) {
struct sockaddr_storage ss;
Home |
Main Index |
Thread Index |
Old Index