summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Krause <david@cvs.openbsd.org>2003-07-08 09:51:24 +0000
committerDavid Krause <david@cvs.openbsd.org>2003-07-08 09:51:24 +0000
commitc61f99c80ad646351cdc82d3524cf64a3b1cfa3e (patch)
treee501dc72aa5446cdc4e05c9a491c87d96e0c59f1
parent64bfaa73c6f006f4a3f1187a8ae3399e47fe25fd (diff)
declare chroot and etag functions in the .h files
and get rid of some implicit declaration warnings ok henning@
-rw-r--r--usr.sbin/httpd/src/include/http_main.h3
-rw-r--r--usr.sbin/httpd/src/include/http_protocol.h1
-rw-r--r--usr.sbin/httpd/src/main/http_config.c3
-rw-r--r--usr.sbin/httpd/src/main/http_main.c3
-rw-r--r--usr.sbin/httpd/src/main/http_protocol.c26
5 files changed, 21 insertions, 15 deletions
diff --git a/usr.sbin/httpd/src/include/http_main.h b/usr.sbin/httpd/src/include/http_main.h
index c4a50e2789d..3d06a103d02 100644
--- a/usr.sbin/httpd/src/include/http_main.h
+++ b/usr.sbin/httpd/src/include/http_main.h
@@ -127,6 +127,9 @@ API_EXPORT(int) ap_update_child_status(int child_num, int status, request_rec *r
void ap_time_process_request(int child_num, int status);
API_EXPORT(unsigned int) ap_set_callback_and_alarm(void (*fn) (int), int x);
API_EXPORT(int) ap_check_alarm(void);
+API_EXPORT(int) ap_server_strip_chroot(char *src, int force);
+API_EXPORT(int) ap_server_is_chrooted(void);
+API_EXPORT(int) ap_server_chroot_desired(void);
void setup_signal_names(char *prefix);
diff --git a/usr.sbin/httpd/src/include/http_protocol.h b/usr.sbin/httpd/src/include/http_protocol.h
index ab0562d2559..b1a39d97db9 100644
--- a/usr.sbin/httpd/src/include/http_protocol.h
+++ b/usr.sbin/httpd/src/include/http_protocol.h
@@ -221,6 +221,7 @@ API_EXPORT(int) ap_getline(char *s, int n, BUFF *in, int fold);
API_EXPORT(long) ap_get_chunk_size(char *b);
+API_EXPORT(void) ap_init_etag(pool *pconf);
#ifdef __cplusplus
}
diff --git a/usr.sbin/httpd/src/main/http_config.c b/usr.sbin/httpd/src/main/http_config.c
index f85562276ae..964cff4bfae 100644
--- a/usr.sbin/httpd/src/main/http_config.c
+++ b/usr.sbin/httpd/src/main/http_config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: http_config.c,v 1.12 2002/10/07 20:23:06 henning Exp $ */
+/* $OpenBSD: http_config.c,v 1.13 2003/07/08 09:51:23 david Exp $ */
/* ====================================================================
* The Apache Software License, Version 1.1
@@ -79,6 +79,7 @@
#include "http_config.h"
#include "http_core.h"
#include "http_log.h" /* for errors in parse_htaccess */
+#include "http_main.h"
#include "http_request.h" /* for default_handler (see invoke_handler) */
#include "http_conf_globals.h" /* Sigh... */
#include "http_vhost.h"
diff --git a/usr.sbin/httpd/src/main/http_main.c b/usr.sbin/httpd/src/main/http_main.c
index ea241945f9c..32e1ca273d0 100644
--- a/usr.sbin/httpd/src/main/http_main.c
+++ b/usr.sbin/httpd/src/main/http_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: http_main.c,v 1.29 2003/04/08 20:13:08 henning Exp $ */
+/* $OpenBSD: http_main.c,v 1.30 2003/07/08 09:51:23 david Exp $ */
/* ====================================================================
* The Apache Software License, Version 1.1
@@ -104,6 +104,7 @@ int ap_main(int argc, char *argv[]);
#include "http_vhost.h"
#include "util_script.h" /* to force util_script.c linking */
#include "util_uri.h"
+#include "fdcache.h"
#include "scoreboard.h"
#include "multithread.h"
#include <sys/stat.h>
diff --git a/usr.sbin/httpd/src/main/http_protocol.c b/usr.sbin/httpd/src/main/http_protocol.c
index 5a1316f52c9..ea98a37282c 100644
--- a/usr.sbin/httpd/src/main/http_protocol.c
+++ b/usr.sbin/httpd/src/main/http_protocol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: http_protocol.c,v 1.21 2003/02/21 18:41:09 henning Exp $ */
+/* $OpenBSD: http_protocol.c,v 1.22 2003/07/08 09:51:23 david Exp $ */
/* ====================================================================
* The Apache Software License, Version 1.1
*
@@ -3226,18 +3226,6 @@ int ap_create_etag_state(pool *pconf)
close (fd);
}
-API_EXPORT(void) ap_init_etag(pool *pconf)
-{
- if (ap_read_etag_state(pconf) == -1) {
- ap_create_etag_state(pconf);
- if (ap_read_etag_state(pconf) == -1) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, NULL,
- "could not initialize etag state");
- exit(-1);
- }
- }
-}
-
int ap_read_etag_state(pool *pconf)
{
struct stat st;
@@ -3286,6 +3274,18 @@ int ap_read_etag_state(pool *pconf)
}
}
+API_EXPORT(void) ap_init_etag(pool *pconf)
+{
+ if (ap_read_etag_state(pconf) == -1) {
+ ap_create_etag_state(pconf);
+ if (ap_read_etag_state(pconf) == -1) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, NULL,
+ "could not initialize etag state");
+ exit(-1);
+ }
+ }
+}
+
API_EXPORT(char *) ap_make_etag(request_rec *r, int force_weak)
{
AP_SHA1_CTX hashCtx;