Apache HTTPD
Macros | Functions | Variables
mod_unixd.c File Reference
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_main.h"
#include "http_log.h"
#include "http_core.h"
#include "mpm_common.h"
#include "os.h"
#include "ap_mpm.h"
#include "mod_unixd.h"
#include "apr_thread_proc.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include <sys/stat.h>
#include "unixd.h"

Go to the source code of this file.

Macros

#define DEFAULT_USER   "#-1"
 
#define DEFAULT_GROUP   "#-1"
 
#define SETUID_TEST(finfo)   (finfo.protection & APR_USETID)
 

Functions

static int set_group_privs (void)
 
static int unixd_drop_privileges (apr_pool_t *pool, server_rec *s)
 
static const charunixd_set_user (cmd_parms *cmd, void *dummy, const char *arg)
 
static const charunixd_set_group (cmd_parms *cmd, void *dummy, const char *arg)
 
static const charunixd_set_chroot_dir (cmd_parms *cmd, void *dummy, const char *arg)
 
static const charunixd_set_suexec (cmd_parms *cmd, void *dummy, int arg)
 
static int unixd_pre_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 
int ap_unixd_setup_child (void)
 
static void unixd_dump_config (apr_pool_t *p, server_rec *s)
 
static void unixd_hooks (apr_pool_t *pool)
 

Variables

static const command_rec unixd_cmds []
 
static int *const aplog_module_index = &( unixd_module.module_index)
 

Macro Definition Documentation

◆ DEFAULT_GROUP

#define DEFAULT_GROUP   "#-1"

Definition at line 58 of file mod_unixd.c.

◆ DEFAULT_USER

#define DEFAULT_USER   "#-1"

Definition at line 55 of file mod_unixd.c.

◆ SETUID_TEST

#define SETUID_TEST (   finfo)    (finfo.protection & APR_USETID)

Definition at line 291 of file mod_unixd.c.

Function Documentation

◆ set_group_privs()

static int set_group_privs ( void  )
static

Definition at line 87 of file mod_unixd.c.

◆ unixd_drop_privileges()

static int unixd_drop_privileges ( apr_pool_t pool,
server_rec s 
)
static

< Module has handled this stage.

Definition at line 139 of file mod_unixd.c.

◆ unixd_dump_config()

static void unixd_dump_config ( apr_pool_t p,
server_rec s 
)
static

Definition at line 382 of file mod_unixd.c.

◆ unixd_hooks()

static void unixd_hooks ( apr_pool_t pool)
static

Definition at line 402 of file mod_unixd.c.

◆ unixd_pre_config()

static int unixd_pre_config ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp 
)
static

< an atomic unix apr_stat()

< Set user id

<

Deprecated:
See also
APR_FPROT_USETID

< Module has handled this stage.

Definition at line 295 of file mod_unixd.c.

◆ unixd_set_chroot_dir()

static const char * unixd_set_chroot_dir ( cmd_parms cmd,
void *  dummy,
const char arg 
)
static

< Forbidden in <VirtualHost>

< Forbidden in <Limit>

< Forbidden in <Directory>

< Forbidden in <Location>

< Forbidden in <Files> or <If>

< Forbidden in <Proxy>

Definition at line 250 of file mod_unixd.c.

◆ unixd_set_group()

static const char * unixd_set_group ( cmd_parms cmd,
void *  dummy,
const char arg 
)
static

< Forbidden in <VirtualHost>

< Forbidden in <Limit>

< Forbidden in <Directory>

< Forbidden in <Location>

< Forbidden in <Files> or <If>

< Forbidden in <Proxy>

Definition at line 235 of file mod_unixd.c.

◆ unixd_set_suexec()

static const char * unixd_set_suexec ( cmd_parms cmd,
void *  dummy,
int  arg 
)
static

< Forbidden in <VirtualHost>

< Forbidden in <Limit>

< Forbidden in <Directory>

< Forbidden in <Location>

< Forbidden in <Files> or <If>

< Forbidden in <Proxy>

Definition at line 266 of file mod_unixd.c.

◆ unixd_set_user()

static const char * unixd_set_user ( cmd_parms cmd,
void *  dummy,
const char arg 
)
static

< Forbidden in <VirtualHost>

< Forbidden in <Limit>

< Forbidden in <Directory>

< Forbidden in <Location>

< Forbidden in <Files> or <If>

< Forbidden in <Proxy>

Definition at line 207 of file mod_unixd.c.

Variable Documentation

◆ aplog_module_index

int* const aplog_module_index = &( unixd_module.module_index)
static

Definition at line 424 of file mod_unixd.c.

◆ unixd_cmds

const command_rec unixd_cmds[]
static
Initial value:
= {
{ "User" , unixd_set_user , NULL , 128 , TAKE1, "Effective user id for this server" },
{ "Group" , unixd_set_group , NULL , 128 , TAKE1, "Effective group id for this server" },
{ "ChrootDir" , unixd_set_chroot_dir , NULL , 128 , TAKE1, "The directory to chroot(2) into" },
{ "Suexec" , unixd_set_suexec , NULL , 128 , FLAG, "Enable or disable suEXEC support" },
{NULL}
}
@ TAKE1
Definition http_config.h:51
@ FLAG
Definition http_config.h:59
return NULL
Definition mod_so.c:359
static const char * unixd_set_user(cmd_parms *cmd, void *dummy, const char *arg)
Definition mod_unixd.c:207
static const char * unixd_set_suexec(cmd_parms *cmd, void *dummy, int arg)
Definition mod_unixd.c:266
static const char * unixd_set_chroot_dir(cmd_parms *cmd, void *dummy, const char *arg)
Definition mod_unixd.c:250
static const char * unixd_set_group(cmd_parms *cmd, void *dummy, const char *arg)
Definition mod_unixd.c:235

Definition at line 412 of file mod_unixd.c.