mod_suexec.c revision bdf8801c51d958b1d3ff40f60ab16ccfd999b0fa
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define CORE_PRIVATE
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_log.h"
#include "http_request.h"
#include "apr_strings.h"
#include "unixd.h"
#include "mpm_common.h"
#include "mod_suexec.h"
/*
* Create a configuration specific to this module for a server or directory
* location, and fill it with the default settings.
*/
static void *mkconfig(apr_pool_t *p)
{
return cfg;
}
/*
* Respond to a callback to create configuration record for a server or
* vhost environment.
*/
{
return mkconfig(p);
}
/*
* Respond to a callback to create a config record for a specific directory.
*/
{
return mkconfig(p);
}
{
return err;
}
if (unixd_config.suexec_enabled) {
}
else {
"Warning: SuexecUserGroup directive requires SUEXEC wrapper.\n");
}
return NULL;
}
{
}
#define SUEXEC_POST_CONFIG_USERDATA "suexec_post_config_userdata"
{
void *reported;
"suEXEC mechanism enabled (wrapper: %s)", SUEXEC_BIN);
}
return OK;
}
/*
* Define the directives specific to this module. This structure is referenced
* later by the 'module' structure.
*/
static const command_rec suexec_cmds[] =
{
/* XXX - Another important reason not to allow this in .htaccess is that
* the ap_[ug]name2id() is not thread-safe */
"User and group for spawned processes"),
{ NULL }
};
static void suexec_hooks(apr_pool_t *p)
{
}
{
create_mconfig_for_directory, /* create per-dir config */
NULL, /* merge per-dir config */
create_mconfig_for_server, /* server config */
NULL, /* merge server config */
suexec_cmds, /* command table */
suexec_hooks /* register hooks */
};