Lines Matching refs:config

33 	struct fpm_worker_pool_config_s *c = wp->config;  in fpm_unix_resolve_socket_premissions()
49 zlog(ZLOG_SYSERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, c->listen_owner); in fpm_unix_resolve_socket_premissions()
62 … zlog(ZLOG_SYSERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, c->listen_group); in fpm_unix_resolve_socket_premissions()
81 if (wp->config->user && *wp->config->user) { in fpm_unix_conf_wp()
82 if (strlen(wp->config->user) == strspn(wp->config->user, "0123456789")) { in fpm_unix_conf_wp()
83 wp->set_uid = strtoul(wp->config->user, 0, 10); in fpm_unix_conf_wp()
87 pwd = getpwnam(wp->config->user); in fpm_unix_conf_wp()
89 zlog(ZLOG_ERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, wp->config->user); in fpm_unix_conf_wp()
101 if (wp->config->group && *wp->config->group) { in fpm_unix_conf_wp()
102 if (strlen(wp->config->group) == strspn(wp->config->group, "0123456789")) { in fpm_unix_conf_wp()
103 wp->set_gid = strtoul(wp->config->group, 0, 10); in fpm_unix_conf_wp()
107 grp = getgrnam(wp->config->group); in fpm_unix_conf_wp()
109 … zlog(ZLOG_ERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, wp->config->group); in fpm_unix_conf_wp()
118 zlog(ZLOG_ERROR, "[pool %s] please specify user and group other than root", wp->config->name); in fpm_unix_conf_wp()
123 if (wp->config->user && *wp->config->user) { in fpm_unix_conf_wp()
124 …NOTICE, "[pool %s] 'user' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
126 if (wp->config->group && *wp->config->group) { in fpm_unix_conf_wp()
127 …OTICE, "[pool %s] 'group' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
129 if (wp->config->chroot && *wp->config->chroot) { in fpm_unix_conf_wp()
130 …TICE, "[pool %s] 'chroot' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
132 if (wp->config->process_priority != 64) { in fpm_unix_conf_wp()
133 …ol %s] 'process.priority' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
152 if (wp->config->rlimit_files) { in fpm_unix_init_child()
155 r.rlim_max = r.rlim_cur = (rlim_t) wp->config->rlimit_files; in fpm_unix_init_child()
158 …ts or decrease rlimit_files. setrlimit(RLIMIT_NOFILE, %d)", wp->config->name, wp->config->rlimit_f… in fpm_unix_init_child()
162 if (wp->config->rlimit_core) { in fpm_unix_init_child()
165 …r.rlim_max = r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp->co… in fpm_unix_init_child()
168 …imits or decrease rlimit_core. setrlimit(RLIMIT_CORE, %d)", wp->config->name, wp->config->rlimit_c… in fpm_unix_init_child()
172 if (is_root && wp->config->chroot && *wp->config->chroot) { in fpm_unix_init_child()
173 if (0 > chroot(wp->config->chroot)) { in fpm_unix_init_child()
174 zlog(ZLOG_SYSERROR, "[pool %s] failed to chroot(%s)", wp->config->name, wp->config->chroot); in fpm_unix_init_child()
180 if (wp->config->chdir && *wp->config->chdir) { in fpm_unix_init_child()
181 if (0 > chdir(wp->config->chdir)) { in fpm_unix_init_child()
182 zlog(ZLOG_SYSERROR, "[pool %s] failed to chdir(%s)", wp->config->name, wp->config->chdir); in fpm_unix_init_child()
191 if (wp->config->process_priority != 64) { in fpm_unix_init_child()
192 if (setpriority(PRIO_PROCESS, 0, wp->config->process_priority) < 0) { in fpm_unix_init_child()
193 zlog(ZLOG_SYSERROR, "[pool %s] Unable to set priority for this new process", wp->config->name); in fpm_unix_init_child()
200 zlog(ZLOG_SYSERROR, "[pool %s] failed to setgid(%d)", wp->config->name, wp->set_gid); in fpm_unix_init_child()
205 if (0 > initgroups(wp->config->user, wp->set_gid)) { in fpm_unix_init_child()
206 …zlog(ZLOG_SYSERROR, "[pool %s] failed to initgroups(%s, %d)", wp->config->name, wp->config->user, … in fpm_unix_init_child()
210 zlog(ZLOG_SYSERROR, "[pool %s] failed to setuid(%d)", wp->config->name, wp->set_uid); in fpm_unix_init_child()
218 zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name); in fpm_unix_init_child()