Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src Pull up following revision(s) (requested by mrg in ticket...



details:   https://anonhg.NetBSD.org/src/rev/456d6d7fdd6f
branches:  netbsd-7
changeset: 799248:456d6d7fdd6f
user:      snj <snj%NetBSD.org@localhost>
date:      Thu Apr 23 19:38:11 2015 +0000

description:
Pull up following revision(s) (requested by mrg in ticket #715):
        distrib/sets/lists/base/mi: revision 1.1100
        distrib/sets/lists/man/mi: revision 1.1499 via patch
        libexec/httpd/Makefile: revision 1.23
        libexec/httpd/bozohttpd.8: revision 1.50
        libexec/httpd/cgi-bozo.c: revision 1.26
install as bozohttpd/bozohttpd.8 as well as httpd.
--
Fix deref "command" after "free(file)", from KIYOHARA Takashi

diffstat:

 distrib/sets/lists/base/mi |   3 ++-
 distrib/sets/lists/man/mi  |   5 ++++-
 libexec/httpd/Makefile     |   9 +++++----
 libexec/httpd/bozohttpd.8  |  20 +++++++++-----------
 libexec/httpd/cgi-bozo.c   |  11 ++++++-----
 5 files changed, 26 insertions(+), 22 deletions(-)

diffs (174 lines):

diff -r c04a66c4f4ad -r 456d6d7fdd6f distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Thu Apr 23 19:23:45 2015 +0000
+++ b/distrib/sets/lists/base/mi        Thu Apr 23 19:38:11 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1087.2.4 2015/04/21 05:22:58 snj Exp $
+# $NetBSD: mi,v 1.1087.2.5 2015/04/23 19:38:11 snj Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -1239,6 +1239,7 @@
 ./usr/libexec/atf-format                       base-obsolete           obsolete
 ./usr/libexec/atf-killpg                       base-obsolete           obsolete
 ./usr/libexec/atrun                            base-cron-bin
+./usr/libexec/bozohttpd                                base-netutil-bin
 ./usr/libexec/ching                            base-games-usr
 ./usr/libexec/comsat                           base-mail-bin
 ./usr/libexec/cpp0                             base-obsolete           obsolete
diff -r c04a66c4f4ad -r 456d6d7fdd6f distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Thu Apr 23 19:23:45 2015 +0000
+++ b/distrib/sets/lists/man/mi Thu Apr 23 19:38:11 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1485.2.7 2015/04/21 05:22:58 snj Exp $
+# $NetBSD: mi,v 1.1485.2.8 2015/04/23 19:38:11 snj Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2326,6 +2326,7 @@
 ./usr/share/man/cat8/bootptest.0               man-bootserver-catman   .cat
 ./usr/share/man/cat8/bootselect.0              man-obsolete            obsolete
 ./usr/share/man/cat8/bounce.0                  man-postfix-catman      postfix,.cat
+./usr/share/man/cat8/bozohttpd.0               man-netutil-catman      .cat
 ./usr/share/man/cat8/brconfig.0                        man-netutil-catman      .cat
 ./usr/share/man/cat8/btattach.0                        man-sysutil-catman      .cat
 ./usr/share/man/cat8/btconfig.0                        man-sysutil-catman      .cat
@@ -5248,6 +5249,7 @@
 ./usr/share/man/html8/bootpgw.html             man-bootserver-htmlman  html
 ./usr/share/man/html8/bootptest.html           man-bootserver-htmlman  html
 ./usr/share/man/html8/bounce.html              man-postfix-htmlman     postfix,html
+./usr/share/man/html8/bozohttpd.html           man-netutil-htmlman     html
 ./usr/share/man/html8/brconfig.html            man-netutil-htmlman     html
 ./usr/share/man/html8/btattach.html            man-sysutil-htmlman     html
 ./usr/share/man/html8/btconfig.html            man-sysutil-htmlman     html
@@ -8204,6 +8206,7 @@
 ./usr/share/man/man8/bootptest.8               man-bootserver-man      .man
 ./usr/share/man/man8/bootselect.8              man-obsolete            obsolete
 ./usr/share/man/man8/bounce.8                  man-postfix-man         postfix,.man
+./usr/share/man/man8/bozohttpd.8               man-netutil-man         .man
 ./usr/share/man/man8/brconfig.8                        man-netutil-man         .man
 ./usr/share/man/man8/btattach.8                        man-sysutil-man         .man
 ./usr/share/man/man8/btconfig.8                        man-sysutil-man         .man
diff -r c04a66c4f4ad -r 456d6d7fdd6f libexec/httpd/Makefile
--- a/libexec/httpd/Makefile    Thu Apr 23 19:23:45 2015 +0000
+++ b/libexec/httpd/Makefile    Thu Apr 23 19:38:11 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.22 2014/07/08 13:59:39 mrg Exp $
+#      $NetBSD: Makefile,v 1.22.2.1 2015/04/23 19:38:11 snj Exp $
 #
 #      $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
 #
@@ -20,9 +20,10 @@
 #   % make COPTS="-DDO_HTPASSWD"
 
 COPTS+=        -DDO_HTPASSWD
-PROG=  httpd
-MAN=   httpd.8
-BUILDSYMLINKS+=bozohttpd.8 httpd.8
+PROG=  bozohttpd
+LINKS= ${BINDIR}/bozohttpd ${BINDIR}/httpd
+MAN=   bozohttpd.8
+MLINKS+=bozohttpd.8 httpd.8
 SRCS=  bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \
        tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c
 SRCS+= main.c
diff -r c04a66c4f4ad -r 456d6d7fdd6f libexec/httpd/bozohttpd.8
--- a/libexec/httpd/bozohttpd.8 Thu Apr 23 19:23:45 2015 +0000
+++ b/libexec/httpd/bozohttpd.8 Thu Apr 23 19:38:11 2015 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: bozohttpd.8,v 1.46.4.2 2015/04/19 04:44:03 msaitoh Exp $
+.\"    $NetBSD: bozohttpd.8,v 1.46.4.3 2015/04/23 19:38:11 snj Exp $
 .\"
 .\"    $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -26,11 +26,11 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 20, 2015
-.Dt HTTPD 8
+.Dd April 15, 2015
+.Dt BOZOHTTPD 8
 .Os
 .Sh NAME
-.Nm httpd
+.Nm bozohttpd
 .Nd hyper text transfer protocol version 1.1 daemon
 .Sh SYNOPSIS
 .Nm
@@ -497,11 +497,8 @@
 .Xr inetd.conf 5 ,
 .Xr inetd 8
 .Sh HISTORY
-The
 .Nm
-program is actually called
-.Dq bozohttpd .
-It was first written in perl, based on another perl http server
+was first written in perl, based on another perl http server
 called
 .Dq tinyhttpd .
 It was then rewritten from scratch in perl, and then once again in C.
@@ -513,7 +510,7 @@
 and regular code audits.
 This manual documents
 .Nm
-version 20141225.
+version 20150320.
 .Sh AUTHORS
 .An -nosplit
 .Nm
@@ -546,8 +543,9 @@
 .It
 .An Alistair G. Crooks
 .Aq Mt agc%NetBSD.org@localhost
-cleaned up many internal interfaces, made bozohttpd linkable as a
-library and provided the Lua binding.
+cleaned up many internal interfaces, made
+.Nm
+linkable as a library and provided the Lua binding.
 .It
 .An DEGROOTE Arnaud
 .Aq Mt degroote%NetBSD.org@localhost
diff -r c04a66c4f4ad -r 456d6d7fdd6f libexec/httpd/cgi-bozo.c
--- a/libexec/httpd/cgi-bozo.c  Thu Apr 23 19:23:45 2015 +0000
+++ b/libexec/httpd/cgi-bozo.c  Thu Apr 23 19:38:11 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgi-bozo.c,v 1.25 2014/06/24 07:23:59 shm Exp $        */
+/*     $NetBSD: cgi-bozo.c,v 1.25.2.1 2015/04/23 19:38:11 snj Exp $    */
 
 /*     $eterna: cgi-bozo.c,v 1.40 2011/11/18 09:21:15 mrg Exp $        */
 
@@ -247,7 +247,8 @@
        char    date[40];
        bozoheaders_t *headp;
        const char *type, *clen, *info, *cgihandler;
-       char    *query, *s, *t, *path, *env, *command, *file, *url;
+       char    *query, *s, *t, *path, *env, *file, *url;
+       char    command[MAXPATHLEN];
        char    **envp, **curenvp, *argv[4];
        char    *uri;
        size_t  len;
@@ -284,7 +285,6 @@
        path = NULL;
        envp = NULL;
        cgihandler = NULL;
-       command = NULL;
        info = NULL;
 
        len = strlen(url);
@@ -309,12 +309,13 @@
 
        ix = 0;
        if (cgihandler) {
-               command = file + 1;
+               snprintf(command, sizeof(command), "%s", file + 1);
                path = bozostrdup(httpd, cgihandler);
                argv[ix++] = path;
                        /* argv[] = [ path, command, query, NULL ] */
        } else {
-               command = file + CGIBIN_PREFIX_LEN + 1;
+               snprintf(command, sizeof(command), "%s",
+                   file + CGIBIN_PREFIX_LEN + 1);
                if ((s = strchr(command, '/')) != NULL) {
                        info = bozostrdup(httpd, s);
                        *s = '\0';



Home | Main Index | Thread Index | Old Index