unixd.h revision 24c37fed37c126e979b4b750e9d2bd05ccb479a5
0066eddda7203f6345b56f77d146a759298dc635gryzor/* ====================================================================
0066eddda7203f6345b56f77d146a759298dc635gryzor * The Apache Software License, Version 1.1
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * reserved.
0066eddda7203f6345b56f77d146a759298dc635gryzor * Redistribution and use in source and binary forms, with or without
0066eddda7203f6345b56f77d146a759298dc635gryzor * modification, are permitted provided that the following conditions
0066eddda7203f6345b56f77d146a759298dc635gryzor * 1. Redistributions of source code must retain the above copyright
0066eddda7203f6345b56f77d146a759298dc635gryzor * notice, this list of conditions and the following disclaimer.
2e545ce2450a9953665f701bb05350f0d3f26275nd * 2. Redistributions in binary form must reproduce the above copyright
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen * notice, this list of conditions and the following disclaimer in
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen * the documentation and/or other materials provided with the
0066eddda7203f6345b56f77d146a759298dc635gryzor * distribution.
0066eddda7203f6345b56f77d146a759298dc635gryzor * 3. The end-user documentation included with the redistribution,
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen * if any, must include the following acknowledgment:
3f08db06526d6901aa08c110b5bc7dde6bc39905nd * "This product includes software developed by the
0066eddda7203f6345b56f77d146a759298dc635gryzor * Apache Software Foundation (http://www.apache.org/)."
0066eddda7203f6345b56f77d146a759298dc635gryzor * Alternately, this acknowledgment may appear in the software itself,
0066eddda7203f6345b56f77d146a759298dc635gryzor * if and wherever such third-party acknowledgments normally appear.
0066eddda7203f6345b56f77d146a759298dc635gryzor * 4. The names "Apache" and "Apache Software Foundation" must
0066eddda7203f6345b56f77d146a759298dc635gryzor * not be used to endorse or promote products derived from this
0066eddda7203f6345b56f77d146a759298dc635gryzor * software without prior written permission. For written
0066eddda7203f6345b56f77d146a759298dc635gryzor * permission, please contact apache@apache.org.
0066eddda7203f6345b56f77d146a759298dc635gryzor * 5. Products derived from this software may not be called "Apache",
0066eddda7203f6345b56f77d146a759298dc635gryzor * nor may "Apache" appear in their name, without prior written
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung * permission of the Apache Software Foundation.
0066eddda7203f6345b56f77d146a759298dc635gryzor * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
0066eddda7203f6345b56f77d146a759298dc635gryzor * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0066eddda7203f6345b56f77d146a759298dc635gryzor * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0066eddda7203f6345b56f77d146a759298dc635gryzor * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
0066eddda7203f6345b56f77d146a759298dc635gryzor * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0066eddda7203f6345b56f77d146a759298dc635gryzor * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0066eddda7203f6345b56f77d146a759298dc635gryzor * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
cd8142d105a47b208d863bea7cdb540727a5f02digalic * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
cd8142d105a47b208d863bea7cdb540727a5f02digalic * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
cd8142d105a47b208d863bea7cdb540727a5f02digalic * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
cd8142d105a47b208d863bea7cdb540727a5f02digalic * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
cd8142d105a47b208d863bea7cdb540727a5f02digalic * SUCH DAMAGE.
0066eddda7203f6345b56f77d146a759298dc635gryzor * ====================================================================
0066eddda7203f6345b56f77d146a759298dc635gryzor * This software consists of voluntary contributions made by many
0066eddda7203f6345b56f77d146a759298dc635gryzor * individuals on behalf of the Apache Software Foundation. For more
0066eddda7203f6345b56f77d146a759298dc635gryzor * information on the Apache Software Foundation, please see
0066eddda7203f6345b56f77d146a759298dc635gryzor * Portions of this software are based upon public domain software
0066eddda7203f6345b56f77d146a759298dc635gryzor * originally written at the National Center for Supercomputing Applications,
0066eddda7203f6345b56f77d146a759298dc635gryzor * University of Illinois, Urbana-Champaign.
cd8142d105a47b208d863bea7cdb540727a5f02digalictypedef struct {
20f499565e77defe9dab24dd85c02f38a1175855ndAP_DECLARE_HOOK(ap_unix_identity_t *, get_suexec_identity,(const request_rec *r))
0066eddda7203f6345b56f77d146a759298dc635gryzor/* common stuff that unix MPMs will want */
0066eddda7203f6345b56f77d146a759298dc635gryzor/* Default user name and group name. These may be specified as numbers by
e3e52ec6993de04bb0100e098ce0a569c7001382lgentis * placing a # before a number */
cd8142d105a47b208d863bea7cdb540727a5f02digalictypedef struct {
cd8142d105a47b208d863bea7cdb540727a5f02digalic const char *user_name;
cd8142d105a47b208d863bea7cdb540727a5f02digalicconst char *unixd_set_user(cmd_parms *cmd, void *dummy, const char *arg);
cd8142d105a47b208d863bea7cdb540727a5f02digalicconst char *unixd_set_group(cmd_parms *cmd, void *dummy, const char *arg);
cd8142d105a47b208d863bea7cdb540727a5f02digalic#if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS)
cd8142d105a47b208d863bea7cdb540727a5f02digalicAP_DECLARE(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
0066eddda7203f6345b56f77d146a759298dc635gryzor#else /* HAVE_KILLPG */
cd8142d105a47b208d863bea7cdb540727a5f02digalic#endif /* HAVE_KILLPG */
cd8142d105a47b208d863bea7cdb540727a5f02digalicAP_INIT_TAKE1("User", unixd_set_user, NULL, RSRC_CONF, \
0066eddda7203f6345b56f77d146a759298dc635gryzor "Effective user id for this server"), \
0066eddda7203f6345b56f77d146a759298dc635gryzorAP_INIT_TAKE1("Group", unixd_set_group, NULL, RSRC_CONF, \
e3e52ec6993de04bb0100e098ce0a569c7001382lgentis "Effective group id for this server"),