unixd.h revision b682e60dd82772dba52ba77138e494f15c00a551
97a9a944b5887e91042b019776c41d5dd74557aferikabele/* Licensed to the Apache Software Foundation (ASF) under one or more
97a9a944b5887e91042b019776c41d5dd74557aferikabele * contributor license agreements. See the NOTICE file distributed with
97a9a944b5887e91042b019776c41d5dd74557aferikabele * this work for additional information regarding copyright ownership.
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive * The ASF licenses this file to You under the Apache License, Version 2.0
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive * (the "License"); you may not use this file except in compliance with
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive * the License. You may obtain a copy of the License at
b686b6a420bde7f78c416b90be11db94cb789979nd * Unless required by applicable law or agreed to in writing, software
b686b6a420bde7f78c416b90be11db94cb789979nd * distributed under the License is distributed on an "AS IS" BASIS,
b686b6a420bde7f78c416b90be11db94cb789979nd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
b686b6a420bde7f78c416b90be11db94cb789979nd * See the License for the specific language governing permissions and
b686b6a420bde7f78c416b90be11db94cb789979nd * limitations under the License.
3f08db06526d6901aa08c110b5bc7dde6bc39905nd * @brief common stuff that unix MPMs will want
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd * @addtogroup APACHE_OS_UNIX
2aff288113d772cedca6add888eb643afffe9fb1ndextern "C" {
166c7891cc2a7545eca0f4dda6af92026bc43fcfrpluemtypedef struct {
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2ndAP_DECLARE_HOOK(ap_unix_identity_t *, get_suexec_identity,(const request_rec *r))
2aff288113d772cedca6add888eb643afffe9fb1nd/* Default user name and group name. These may be specified as numbers by
80d3dc69b0e6ad772135f6a78af3d16bd6cccc42nd * placing a # before a number */
2aff288113d772cedca6add888eb643afffe9fb1ndtypedef struct {
50c04f297d76a57ead2fa6b73845f7563b1fc788sf const char *user_name;
2aff288113d772cedca6add888eb643afffe9fb1nd const char *chroot_dir;
635e08c1d8332adc365b1c20bbe3577d59ebcd78kess const char *suexec_disabled_reason; /* suitable msg if !suexec_enabled */
8951c7d73bfa2ae5a2c8fe5bd27f3e677be02564noirin#if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS)
909ce17e2bd0faef7b1c294f2307f009793fd493ndAP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
2aff288113d772cedca6add888eb643afffe9fb1nd const char *arg,
42af92a661a06b3cebc88d585aad75064a309d51nd * One of the functions to set mutex permissions should be called in
8951c7d73bfa2ae5a2c8fe5bd27f3e677be02564noirin * the parent process on platforms that switch identity when the
6fe26506780e73be2a412d758af77fafdf03291and * server is started as root.
2aff288113d772cedca6add888eb643afffe9fb1nd * If the child init logic is performed before switching identity
2aff288113d772cedca6add888eb643afffe9fb1nd * (e.g., MPM setup for an accept mutex), it should only be called
2aff288113d772cedca6add888eb643afffe9fb1nd * for SysV semaphores. Otherwise, it is safe to call it for all
2aff288113d772cedca6add888eb643afffe9fb1nd * mutex types.
aa0b2780958e9b1467c9d0153a05738e399811a5ndAP_DECLARE(apr_status_t) ap_unixd_set_proc_mutex_perms(apr_proc_mutex_t *pmutex);
2aff288113d772cedca6add888eb643afffe9fb1ndAP_DECLARE(apr_status_t) ap_unixd_set_global_mutex_perms(apr_global_mutex_t *gmutex);
2aff288113d772cedca6add888eb643afffe9fb1ndAP_DECLARE(apr_status_t) ap_unixd_accept(void **accepted, ap_listen_rec *lr, apr_pool_t *ptrans);
0734f81384d5f2528bb119f89d135043a280d5b2minfrin#else /* HAVE_KILLPG */
2aff288113d772cedca6add888eb643afffe9fb1nd#endif /* HAVE_KILLPG */