summaryrefslogtreecommitdiff
path: root/libexec/httpd
diff options
context:
space:
mode:
authorreed <reed@NetBSD.org>2007-10-17 13:27:19 +0000
committerreed <reed@NetBSD.org>2007-10-17 13:27:19 +0000
commitdbfaed23628fd5881132335753795f802a42bffd (patch)
treee86955b8a2bb75754487ee9ded042c5901cd0b4f /libexec/httpd
parentbe65260f34ef7a0a9c7bfac0825f6f8019ec06ed (diff)
Fix typo on Makefile which causes HTTP Authentication support
to not be used. Now fix auth-bozo.c to not have warnings "may be used uninitialized" and pointer targets "differ in signedness".
Diffstat (limited to 'libexec/httpd')
-rw-r--r--libexec/httpd/Makefile4
-rw-r--r--libexec/httpd/auth-bozo.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/libexec/httpd/Makefile b/libexec/httpd/Makefile
index 456bdf3bcf1..88963f86c15 100644
--- a/libexec/httpd/Makefile
+++ b/libexec/httpd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2007/10/16 01:31:03 tls Exp $
+# $NetBSD: Makefile,v 1.3 2007/10/17 13:27:19 reed Exp $
#
# $eterna: Makefile,v 1.26 2005/09/27 20:09:20 mrg Exp $
@@ -11,7 +11,7 @@
# NO_DYNAMIC_CONTENT /* don't support dynamic content updates */
# NO_SSL_SUPPORT /* don't support ssl (https) */
# DO_HTPASSWD /* support .htpasswd files */
-COPTS+= -DDO_HTTPASSWD
+COPTS+= -DDO_HTPASSWD
PROG= httpd
MAN= httpd.8
SRCS= bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \
diff --git a/libexec/httpd/auth-bozo.c b/libexec/httpd/auth-bozo.c
index 6ce98f16620..0b215de7ec7 100644
--- a/libexec/httpd/auth-bozo.c
+++ b/libexec/httpd/auth-bozo.c
@@ -113,11 +113,11 @@ auth_check_headers(http_req *request, char *val, char *str, ssize_t len)
if (strcasecmp(val, "authorization") == 0 &&
strncasecmp(str, "Basic ", 6) == 0) {
char authbuf[BUFSIZ];
- char *pass;
+ char *pass = NULL;
ssize_t alen;
- alen = base64_decode(str + 6, len - 6,
- authbuf, sizeof(authbuf) - 1);
+ alen = base64_decode((unsigned char *)str + 6, len - 6,
+ (unsigned char *)authbuf, sizeof(authbuf) - 1);
if (alen != -1)
authbuf[alen] = '\0';
if (alen == -1 ||