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 20100920



details:   https://anonhg.NetBSD.org/src/rev/b0baf7fec7f4
branches:  trunk
changeset: 757754:b0baf7fec7f4
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Sep 20 23:11:38 2010 +0000

description:
merge bozohttpd 20100920

diffstat:

 libexec/httpd/CHANGES          |   7 ++++++-
 libexec/httpd/Makefile         |  11 ++++++++---
 libexec/httpd/bozohttpd.8      |  16 ++++++++++++----
 libexec/httpd/bozohttpd.c      |  14 +++++---------
 libexec/httpd/bozohttpd.h      |   8 ++++----
 libexec/httpd/cgi-bozo.c       |   5 +++--
 libexec/httpd/dir-index-bozo.c |   4 ++--
 7 files changed, 40 insertions(+), 25 deletions(-)

diffs (212 lines):

diff -r 2404e7a02fa0 -r b0baf7fec7f4 libexec/httpd/CHANGES
--- a/libexec/httpd/CHANGES     Mon Sep 20 23:07:21 2010 +0000
+++ b/libexec/httpd/CHANGES     Mon Sep 20 23:11:38 2010 +0000
@@ -1,10 +1,15 @@
-$eterna: CHANGES,v 1.76 2010/06/21 06:45:45 mrg Exp $
+$eterna: CHANGES,v 1.77 2010/09/20 22:26:28 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
+       o  use scandir() with alphasort() for sorted directory lists, from moof
+       o  fix a serious error in vhost handling; "Host:.." would allow access to
+          the next level directory from the virtual root directory, from seanb
+       o  fix some various non standard compile time errors, from rudolf
+       o  fix dynamic CGI content maps, from rudolf
 
 changes since bozohttpd 20100509:
        o  fix some compile issues
diff -r 2404e7a02fa0 -r b0baf7fec7f4 libexec/httpd/Makefile
--- a/libexec/httpd/Makefile    Mon Sep 20 23:07:21 2010 +0000
+++ b/libexec/httpd/Makefile    Mon Sep 20 23:11:38 2010 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.11 2010/05/10 03:37:45 mrg Exp $
+#      $NetBSD: Makefile,v 1.12 2010/09/20 23:11:38 mrg Exp $
 #
-#      $eterna: Makefile,v 1.27 2009/05/22 21:51:38 mrg Exp $
+#      $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
 #
 # berkeley (netbsd) makefile.  see Makefile.boot for other systems.
 
 # compile-time options are:
-#      DEBUG                   /* include debugging support */
+#      NO_DEBUG                /* don't include debugging support */
 #      NO_USER_SUPPORT         /* don't support /~user requests */
 #      NO_CGIBIN_SUPPORT       /* don't support cgi-bin requests */
 #      NO_DIRINDEX_SUPPORT     /* don't support directory indexing */
@@ -13,6 +13,11 @@
 #      NO_DYNAMIC_CONTENT      /* don't support dynamic content updates */
 #      NO_SSL_SUPPORT          /* don't support ssl (https) */
 #      DO_HTPASSWD             /* support .htpasswd files */
+#
+# these are usually set via the "COPTS" variable, or some other method
+# for setting CFLAGS relevant to your make, eg
+#   % make COPTS="-DDO_HTPASSWD"
+
 COPTS+=        -DDO_HTPASSWD
 PROG=  httpd
 MAN=   httpd.8
diff -r 2404e7a02fa0 -r b0baf7fec7f4 libexec/httpd/bozohttpd.8
--- a/libexec/httpd/bozohttpd.8 Mon Sep 20 23:07:21 2010 +0000
+++ b/libexec/httpd/bozohttpd.8 Mon Sep 20 23:11:38 2010 +0000
@@ -1,6 +1,6 @@
-.\"    $NetBSD: bozohttpd.8,v 1.22 2010/06/22 07:00:12 wiz Exp $
+.\"    $NetBSD: bozohttpd.8,v 1.23 2010/09/20 23:11:38 mrg Exp $
 .\"
-.\"    $eterna: bozohttpd.8,v 1.98 2010/06/21 06:47:23 mrg Exp $
+.\"    $eterna: bozohttpd.8,v 1.99 2010/09/20 22:26:28 mrg Exp $
 .\"
 .\" Copyright (c) 1997-2010 Matthew R. Green
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd June 17, 2010
+.Dd September 20, 2010
 .Dt HTTPD 8
 .Os
 .Sh NAME
@@ -464,7 +464,7 @@
 and regular code audits.
 This manual documents
 .Nm
-version 20100621.
+version 20100920.
 .Sh AUTHORS
 .Nm
 was written by Matthew R. Green
@@ -481,6 +481,10 @@
 .Aq bad%bsd.de@localhost
 provided Range: header support
 .It
+Sean Boudreau
+.Aq seanb%NetBSD.org@localhost
+provided an security fix for virtual hosting
+.It
 Julian Coleman
 .Aq jdc%coris.org.uk@localhost
 provided an IPv6 bugfix
@@ -555,6 +559,10 @@
 .Aq rtr%eterna.com.au@localhost
 provided SSL support, cgi-bin fixes and much other random other stuff
 .It
+rudolf
+.Aq netbsd%eq.cz@localhost
+provided minor compile fixes and a CGI content map fix
+.It
 Steve Rumble
 .Aq rumble%ephemeral.org@localhost
 provided the
diff -r 2404e7a02fa0 -r b0baf7fec7f4 libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Mon Sep 20 23:07:21 2010 +0000
+++ b/libexec/httpd/bozohttpd.c Mon Sep 20 23:11:38 2010 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: bozohttpd.c,v 1.24 2010/09/20 22:18:22 mrg Exp $       */
+/*     $NetBSD: bozohttpd.c,v 1.25 2010/09/20 23:11:38 mrg Exp $       */
 
-/*     $eterna: bozohttpd.c,v 1.174 2010/06/21 06:47:23 mrg Exp $      */
+/*     $eterna: bozohttpd.c,v 1.176 2010/09/20 22:26:28 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/20100621"
+#define SERVER_SOFTWARE                "bozohttpd/20100920"
 #endif
 #ifndef DIRECT_ACCESS_FILE
 #define DIRECT_ACCESS_FILE     ".bzdirect"
@@ -610,10 +610,6 @@
                                str,
                                host ? host : addr ? addr : "<local>",
                                port ? port : "<stdin>");
-#if 0
-                       debug((httpd, DEBUG_FAT,
-                               "read_req, getting request: ``%s''", str));
-#endif
 
                        /* we allocate return space in file and query only */
                        parse_request(httpd, str, &method, &file, &query, &proto);
@@ -1534,7 +1530,7 @@
        bozo_flush(httpd, stdout);
 }
 
-#ifdef DEBUG
+#ifndef NO_DEBUG
 void
 debug__(bozohttpd_t *httpd, int level, const char *fmt, ...)
 {
@@ -1555,7 +1551,7 @@
        va_end(ap);
        errno = savederrno;
 }
-#endif /* DEBUG */
+#endif /* NO_DEBUG */
 
 /* these are like warn() and err(), except for syslog not stderr */
 void
diff -r 2404e7a02fa0 -r b0baf7fec7f4 libexec/httpd/bozohttpd.h
--- a/libexec/httpd/bozohttpd.h Mon Sep 20 23:07:21 2010 +0000
+++ b/libexec/httpd/bozohttpd.h Mon Sep 20 23:11:38 2010 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: bozohttpd.h,v 1.16 2010/09/09 04:41:49 mrg Exp $       */
+/*     $NetBSD: bozohttpd.h,v 1.17 2010/09/20 23:11:38 mrg Exp $       */
 
-/*     $eterna: bozohttpd.h,v 1.35 2010/06/17 00:49:30 mrg Exp $       */
+/*     $eterna: bozohttpd.h,v 1.37 2010/09/20 22:26:28 mrg Exp $       */
 
 /*
  * Copyright (c) 1997-2010 Matthew R. Green
@@ -163,13 +163,13 @@
 
 #define        strornull(x)    ((x) ? (x) : "<null>")
 
-#ifdef DEBUG
+#ifndef NO_DEBUG
 void   debug__(bozohttpd_t *, int, const char *, ...)
                        __attribute__((__format__(__printf__, 3, 4)));
 #define debug(x)       debug__ x
 #else
 #define        debug(x)        
-#endif /* DEBUG */
+#endif /* NO_DEBUG */
 
 void   bozo_warn(bozohttpd_t *, const char *, ...)
                __attribute__((__format__(__printf__, 2, 3)));
diff -r 2404e7a02fa0 -r b0baf7fec7f4 libexec/httpd/cgi-bozo.c
--- a/libexec/httpd/cgi-bozo.c  Mon Sep 20 23:07:21 2010 +0000
+++ b/libexec/httpd/cgi-bozo.c  Mon Sep 20 23:11:38 2010 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: cgi-bozo.c,v 1.17 2010/06/17 19:43:30 mrg Exp $        */
+/*     $NetBSD: cgi-bozo.c,v 1.18 2010/09/20 23:11:38 mrg Exp $        */
 
-/*     $eterna: cgi-bozo.c,v 1.37 2010/06/09 07:54:16 mrg Exp $        */
+/*     $eterna: cgi-bozo.c,v 1.38 2010/09/20 22:25:00 mrg Exp $        */
 
 /*
  * Copyright (c) 1997-2010 Matthew R. Green
@@ -507,6 +507,7 @@
 
        map = bozo_get_content_map(httpd, arg);
        map->name = arg;
+       map->namelen = strlen(map->name);
        map->type = map->encoding = map->encoding11 = NULL;
        map->cgihandler = cgihandler;
 }
diff -r 2404e7a02fa0 -r b0baf7fec7f4 libexec/httpd/dir-index-bozo.c
--- a/libexec/httpd/dir-index-bozo.c    Mon Sep 20 23:07:21 2010 +0000
+++ b/libexec/httpd/dir-index-bozo.c    Mon Sep 20 23:11:38 2010 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: dir-index-bozo.c,v 1.10 2010/08/16 18:32:44 dogcow Exp $       */
+/*     $NetBSD: dir-index-bozo.c,v 1.11 2010/09/20 23:11:38 mrg Exp $  */
 
-/*     $eterna: dir-index-bozo.c,v 1.17 2010/05/10 02:51:28 mrg Exp $  */
+/*     $eterna: dir-index-bozo.c,v 1.18 2010/09/20 22:26:29 mrg Exp $  */
 
 /*
  * Copyright (c) 1997-2010 Matthew R. Green



Home | Main Index | Thread Index | Old Index