1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_main.h>

--- 691 unchanged lines hidden (view full) ---

700 return NXT_ERROR;
701 }
702
703 if (nxt_capability_set(task, &rt->capabilities) != NXT_OK) {
704 return NXT_ERROR;
705 }
706
707 if (rt->capabilities.setid) {
708 if (nxt_user_cred_get(task, &rt->user_cred, rt->group) != NXT_OK) {
708 ret = nxt_user_cred_get(task, rt->mem_pool, &rt->user_cred,
709 rt->group);
710
711 if (nxt_slow_path(ret != NXT_OK)) {
712 return NXT_ERROR;
713 }
714
715 } else {
716 nxt_log(task, NXT_LOG_WARN, "Unit is running unprivileged, then it "
717 "cannot use arbitrary user and group.");
718 }
719

--- 601 unchanged lines hidden (view full) ---

1321
1322 } while (port != NULL);
1323
1324 nxt_thread_mutex_destroy(&process->incoming.mutex);
1325 nxt_thread_mutex_destroy(&process->outgoing.mutex);
1326 nxt_thread_mutex_destroy(&process->cp_mutex);
1327
1328 if (process->init != NULL) {
1326 nxt_mp_free(rt->mem_pool, process->init);
1329 nxt_mp_destroy(process->init->mem_pool);
1330 }
1331
1332 nxt_mp_free(rt->mem_pool, process);
1333}
1334
1335
1336static nxt_int_t
1337nxt_runtime_lvlhsh_pid_test(nxt_lvlhsh_query_t *lhq, void *data)

--- 289 unchanged lines hidden ---