mod_unixd.c revision eacb724157bafd5062590305826ebc6fecb48cd2
2720N/A#include "ap_config.h"
2720N/A#include "http_config.h"
2720N/A#include "http_main.h"
2720N/A#include "http_log.h"
2720N/A#include "mpm_common.h"
2720N/A#include "mod_unixd.h"
2720N/A#include "apr_thread_proc.h"
2720N/A#include "apr_strings.h"
2720N/A#include "apr_portable.h"
6845N/A#ifdef HAVE_PWD_H
2720N/A#ifdef HAVE_SYS_RESOURCE_H
2720N/A#ifdef HAVE_UNISTD_H
3817N/A#ifdef HAVE_GRP_H
2720N/A#ifdef HAVE_STRINGS_H
4892N/A#ifdef HAVE_SYS_SEM_H
4892N/A#ifdef HAVE_SYS_PRCTL_H
4892N/A#ifndef DEFAULT_USER
2720N/A#ifndef DEFAULT_GROUP
2720N/A const char *chroot_dir;
2720N/A * mod_unixd.h which does what we need and
static int set_group_privs(void)
if (!geteuid()) {
const char *name;
(long)uid);
if (rv) {
return rv;
if (geteuid()) {
return rv;
return rv;
return rv;
return rv;
#ifdef MPE
GETPRIVMODE();
GETUSERMODE();
return rv;
GETUSERMODE();
if (!geteuid() && (
#ifdef _OSD_POSIX
return rv;
if (ap_coredumpdir_configured) {
return rv;
return OK;
const char *arg)
return err;
#if !defined (BIG_SECURITY_HOLE)
"\tdirective in your httpd.conf file to list a non-root\n"
return NULL;
const char *arg)
return err;
return NULL;
const char *arg)
return err;
return NULL;
== APR_SUCCESS) {
return OK;
if (set_group_privs()) {
if (geteuid()) {
#ifdef MPE
GETPRIVMODE();
GETUSERMODE();
GETUSERMODE();
if (!geteuid() && (
#ifdef _OSD_POSIX
if (ap_coredumpdir_configured) {
{NULL}
NULL,
NULL,
NULL,
NULL,