1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

removed chroot() after lwn article

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@137 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
cameronrich 2007-10-12 06:40:24 +00:00
parent fa0bf09b86
commit 27f866daac
5 changed files with 0 additions and 22 deletions

View File

@ -65,7 +65,6 @@ CONFIG_HTTP_LUA_PREFIX="/usr/local"
# CONFIG_HTTP_BUILD_LUA is not set # CONFIG_HTTP_BUILD_LUA is not set
CONFIG_HTTP_DIRECTORIES=y CONFIG_HTTP_DIRECTORIES=y
CONFIG_HTTP_HAS_AUTHORIZATION=y CONFIG_HTTP_HAS_AUTHORIZATION=y
# CONFIG_HTTP_USE_CHROOT is not set
# CONFIG_HTTP_CHANGE_UID is not set # CONFIG_HTTP_CHANGE_UID is not set
# CONFIG_HTTP_HAS_IPV6 is not set # CONFIG_HTTP_HAS_IPV6 is not set
# CONFIG_HTTP_VERBOSE is not set # CONFIG_HTTP_VERBOSE is not set

View File

@ -71,7 +71,6 @@ CONFIG_HTTP_LUA_CGI_LAUNCHER=""
# CONFIG_HTTP_BUILD_LUA is not set # CONFIG_HTTP_BUILD_LUA is not set
CONFIG_HTTP_DIRECTORIES=y CONFIG_HTTP_DIRECTORIES=y
CONFIG_HTTP_HAS_AUTHORIZATION=y CONFIG_HTTP_HAS_AUTHORIZATION=y
# CONFIG_HTTP_USE_CHROOT is not set
# CONFIG_HTTP_CHANGE_UID is not set # CONFIG_HTTP_CHANGE_UID is not set
# CONFIG_HTTP_HAS_IPV6 is not set # CONFIG_HTTP_HAS_IPV6 is not set
CONFIG_HTTP_VERBOSE=y CONFIG_HTTP_VERBOSE=y

View File

@ -119,17 +119,6 @@ config CONFIG_HTTP_HAS_AUTHORIZATION
help help
Pages/directories can have passwords associated with them. Pages/directories can have passwords associated with them.
config CONFIG_HTTP_USE_CHROOT
bool "Use chroot()"
default n
depends on !CONFIG_PLATFORM_WIN32
help
Use chroot() to switch directories with a certain degree of
protection. However access to /bin and /lib have to replaced with
duplicate binaries.
This feature is normally disabled.
config CONFIG_HTTP_CHANGE_UID config CONFIG_HTTP_CHANGE_UID
bool "Change UID" bool "Change UID"
default n default n

View File

@ -576,11 +576,7 @@ static void ax_chdir(void)
{ {
static char *webroot = CONFIG_HTTP_WEBROOT; static char *webroot = CONFIG_HTTP_WEBROOT;
#if defined(WIN32) || !defined(CONFIG_HTTP_USE_CHROOT)
if (chdir(webroot)) if (chdir(webroot))
#else /* use chroot() instead */
if (chroot(webroot))
#endif
{ {
#ifdef CONFIG_HTTP_VERBOSE #ifdef CONFIG_HTTP_VERBOSE
fprintf(stderr, "'%s' is not a directory\n", webroot); fprintf(stderr, "'%s' is not a directory\n", webroot);

View File

@ -916,12 +916,7 @@ static int hexit(char c)
static void buildactualfile(struct connstruct *cn) static void buildactualfile(struct connstruct *cn)
{ {
char *cp; char *cp;
#ifdef CONFIG_HTTP_USE_CHROOT
snprintf(cn->actualfile, MAXREQUESTLENGTH, "%s", cn->filereq);
#else
snprintf(cn->actualfile, MAXREQUESTLENGTH, ".%s", cn->filereq); snprintf(cn->actualfile, MAXREQUESTLENGTH, ".%s", cn->filereq);
#endif
#ifndef WIN32 #ifndef WIN32
/* Add directory slash if not there */ /* Add directory slash if not there */