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:
parent
fa0bf09b86
commit
27f866daac
@ -65,7 +65,6 @@ CONFIG_HTTP_LUA_PREFIX="/usr/local"
|
||||
# CONFIG_HTTP_BUILD_LUA is not set
|
||||
CONFIG_HTTP_DIRECTORIES=y
|
||||
CONFIG_HTTP_HAS_AUTHORIZATION=y
|
||||
# CONFIG_HTTP_USE_CHROOT is not set
|
||||
# CONFIG_HTTP_CHANGE_UID is not set
|
||||
# CONFIG_HTTP_HAS_IPV6 is not set
|
||||
# CONFIG_HTTP_VERBOSE is not set
|
||||
|
@ -71,7 +71,6 @@ CONFIG_HTTP_LUA_CGI_LAUNCHER=""
|
||||
# CONFIG_HTTP_BUILD_LUA is not set
|
||||
CONFIG_HTTP_DIRECTORIES=y
|
||||
CONFIG_HTTP_HAS_AUTHORIZATION=y
|
||||
# CONFIG_HTTP_USE_CHROOT is not set
|
||||
# CONFIG_HTTP_CHANGE_UID is not set
|
||||
# CONFIG_HTTP_HAS_IPV6 is not set
|
||||
CONFIG_HTTP_VERBOSE=y
|
||||
|
@ -119,17 +119,6 @@ config CONFIG_HTTP_HAS_AUTHORIZATION
|
||||
help
|
||||
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
|
||||
bool "Change UID"
|
||||
default n
|
||||
|
@ -576,11 +576,7 @@ static void ax_chdir(void)
|
||||
{
|
||||
static char *webroot = CONFIG_HTTP_WEBROOT;
|
||||
|
||||
#if defined(WIN32) || !defined(CONFIG_HTTP_USE_CHROOT)
|
||||
if (chdir(webroot))
|
||||
#else /* use chroot() instead */
|
||||
if (chroot(webroot))
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_HTTP_VERBOSE
|
||||
fprintf(stderr, "'%s' is not a directory\n", webroot);
|
||||
|
@ -916,12 +916,7 @@ static int hexit(char c)
|
||||
static void buildactualfile(struct connstruct *cn)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
#ifdef CONFIG_HTTP_USE_CHROOT
|
||||
snprintf(cn->actualfile, MAXREQUESTLENGTH, "%s", cn->filereq);
|
||||
#else
|
||||
snprintf(cn->actualfile, MAXREQUESTLENGTH, ".%s", cn->filereq);
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
/* Add directory slash if not there */
|
||||
|
Loading…
x
Reference in New Issue
Block a user