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