Lines Matching refs:config

39 	struct fpm_worker_pool_config_s *c = wp->config;  in fpm_unix_resolve_socket_premissions()
84 zlog(ZLOG_SYSERROR, "[pool %s] cannot allocate ACL", wp->config->name); in fpm_unix_resolve_socket_premissions()
98 zlog(ZLOG_DEBUG, "[pool %s] user '%s' have uid=%d", wp->config->name, p, pwd->pw_uid); in fpm_unix_resolve_socket_premissions()
100 zlog(ZLOG_SYSERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, p); in fpm_unix_resolve_socket_premissions()
112 zlog(ZLOG_SYSERROR, "[pool %s] cannot create ACL for user '%s'", wp->config->name, p); in fpm_unix_resolve_socket_premissions()
131 zlog(ZLOG_DEBUG, "[pool %s] group '%s' have gid=%d", wp->config->name, p, grp->gr_gid); in fpm_unix_resolve_socket_premissions()
133 zlog(ZLOG_SYSERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, p); in fpm_unix_resolve_socket_premissions()
145 zlog(ZLOG_SYSERROR, "[pool %s] cannot create ACL for group '%s'", wp->config->name, p); in fpm_unix_resolve_socket_premissions()
154 …zlog(ZLOG_WARNING, "[pool %s] ACL set, listen.owner = '%s' is ignored", wp->config->name, c->liste… in fpm_unix_resolve_socket_premissions()
157 …zlog(ZLOG_WARNING, "[pool %s] ACL set, listen.group = '%s' is ignored", wp->config->name, c->liste… in fpm_unix_resolve_socket_premissions()
173 … zlog(ZLOG_SYSERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, c->listen_owner); in fpm_unix_resolve_socket_premissions()
190 … zlog(ZLOG_SYSERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, c->listen_group); in fpm_unix_resolve_socket_premissions()
213 …zlog(ZLOG_SYSERROR, "[pool %s] failed to read the ACL of the socket '%s'", wp->config->name, path); in fpm_unix_set_socket_premissions()
220 …zlog(ZLOG_SYSERROR, "[pool %s] failed to add entry to the ACL of the socket '%s'", wp->config->nam… in fpm_unix_set_socket_premissions()
229 …zlog(ZLOG_SYSERROR, "[pool %s] failed to write the ACL of the socket '%s'", wp->config->name, path… in fpm_unix_set_socket_premissions()
233 zlog(ZLOG_DEBUG, "[pool %s] ACL of the socket '%s' is set", wp->config->name, path); in fpm_unix_set_socket_premissions()
244 …zlog(ZLOG_SYSERROR, "[pool %s] failed to chown() the socket '%s'", wp->config->name, wp->config->l… in fpm_unix_set_socket_premissions()
269 if (wp->config->user && *wp->config->user) { in fpm_unix_conf_wp()
270 if (strlen(wp->config->user) == strspn(wp->config->user, "0123456789")) { in fpm_unix_conf_wp()
271 wp->set_uid = strtoul(wp->config->user, 0, 10); in fpm_unix_conf_wp()
275 pwd = getpwnam(wp->config->user); in fpm_unix_conf_wp()
277 zlog(ZLOG_ERROR, "[pool %s] cannot get uid for user '%s'", wp->config->name, wp->config->user); in fpm_unix_conf_wp()
289 if (wp->config->group && *wp->config->group) { in fpm_unix_conf_wp()
290 if (strlen(wp->config->group) == strspn(wp->config->group, "0123456789")) { in fpm_unix_conf_wp()
291 wp->set_gid = strtoul(wp->config->group, 0, 10); in fpm_unix_conf_wp()
295 grp = getgrnam(wp->config->group); in fpm_unix_conf_wp()
297 … zlog(ZLOG_ERROR, "[pool %s] cannot get gid for group '%s'", wp->config->name, wp->config->group); in fpm_unix_conf_wp()
306 zlog(ZLOG_ERROR, "[pool %s] please specify user and group other than root", wp->config->name); in fpm_unix_conf_wp()
311 if (wp->config->user && *wp->config->user) { in fpm_unix_conf_wp()
312 …NOTICE, "[pool %s] 'user' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
314 if (wp->config->group && *wp->config->group) { in fpm_unix_conf_wp()
315 …OTICE, "[pool %s] 'group' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
317 if (wp->config->chroot && *wp->config->chroot) { in fpm_unix_conf_wp()
318 …TICE, "[pool %s] 'chroot' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
320 if (wp->config->process_priority != 64) { in fpm_unix_conf_wp()
321 …ol %s] 'process.priority' directive is ignored when FPM is not running as root", wp->config->name); in fpm_unix_conf_wp()
340 if (wp->config->rlimit_files) { in fpm_unix_init_child()
343 r.rlim_max = r.rlim_cur = (rlim_t) wp->config->rlimit_files; in fpm_unix_init_child()
346 …ts or decrease rlimit_files. setrlimit(RLIMIT_NOFILE, %d)", wp->config->name, wp->config->rlimit_f… in fpm_unix_init_child()
350 if (wp->config->rlimit_core) { in fpm_unix_init_child()
353 …r.rlim_max = r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp->co… in fpm_unix_init_child()
356 …imits or decrease rlimit_core. setrlimit(RLIMIT_CORE, %d)", wp->config->name, wp->config->rlimit_c… in fpm_unix_init_child()
360 if (is_root && wp->config->chroot && *wp->config->chroot) { in fpm_unix_init_child()
361 if (0 > chroot(wp->config->chroot)) { in fpm_unix_init_child()
362 zlog(ZLOG_SYSERROR, "[pool %s] failed to chroot(%s)", wp->config->name, wp->config->chroot); in fpm_unix_init_child()
368 if (wp->config->chdir && *wp->config->chdir) { in fpm_unix_init_child()
369 if (0 > chdir(wp->config->chdir)) { in fpm_unix_init_child()
370 zlog(ZLOG_SYSERROR, "[pool %s] failed to chdir(%s)", wp->config->name, wp->config->chdir); in fpm_unix_init_child()
375 zlog(ZLOG_WARNING, "[pool %s] failed to chdir(/)", wp->config->name); in fpm_unix_init_child()
381 if (wp->config->process_priority != 64) { in fpm_unix_init_child()
382 if (setpriority(PRIO_PROCESS, 0, wp->config->process_priority) < 0) { in fpm_unix_init_child()
383 zlog(ZLOG_SYSERROR, "[pool %s] Unable to set priority for this new process", wp->config->name); in fpm_unix_init_child()
390 zlog(ZLOG_SYSERROR, "[pool %s] failed to setgid(%d)", wp->config->name, wp->set_gid); in fpm_unix_init_child()
395 if (0 > initgroups(wp->config->user, wp->set_gid)) { in fpm_unix_init_child()
396 …zlog(ZLOG_SYSERROR, "[pool %s] failed to initgroups(%s, %d)", wp->config->name, wp->config->user, … in fpm_unix_init_child()
400 zlog(ZLOG_SYSERROR, "[pool %s] failed to setuid(%d)", wp->config->name, wp->set_uid); in fpm_unix_init_child()
407 if (wp->config->process_dumpable && 0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) { in fpm_unix_init_child()
408 zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name); in fpm_unix_init_child()
417 if (wp->config->apparmor_hat) { in fpm_unix_init_child()
421 …r confinement. Please check if \"/proc/*/attr/current\" is read and writeable.", wp->config->name); in fpm_unix_init_child()
425 new_con = malloc(strlen(con) + strlen(wp->config->apparmor_hat) + 3); // // + 0 Byte in fpm_unix_init_child()
427 …zlog(ZLOG_SYSERROR, "[pool %s] failed to allocate memory for apparmor hat change.", wp->config->na… in fpm_unix_init_child()
431 if (0 > sprintf(new_con, "%s//%s", con, wp->config->apparmor_hat)) { in fpm_unix_init_child()
432 zlog(ZLOG_SYSERROR, "[pool %s] failed to construct apparmor confinement.", wp->config->name); in fpm_unix_init_child()
437 … is read and writeable and \"change_profile -> %s//*\" is allowed.", wp->config->name, new_con, co… in fpm_unix_init_child()