nxt_process.c (382:0b999f4f3545) nxt_process.c (494:7c83ddcc1c42)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_main_process.h>

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

583 return ret;
584}
585
586
587nxt_int_t
588nxt_user_cred_set(nxt_task_t *task, nxt_user_cred_t *uc)
589{
590 nxt_debug(task, "user cred set: \"%s\" uid:%uL base gid:%uL",
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_main_process.h>

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

583 return ret;
584}
585
586
587nxt_int_t
588nxt_user_cred_set(nxt_task_t *task, nxt_user_cred_t *uc)
589{
590 nxt_debug(task, "user cred set: \"%s\" uid:%uL base gid:%uL",
591 uc->user, (uint64_t) uc->uid, uc->base_gid);
591 uc->user, (uint64_t) uc->uid, (uint64_t) uc->base_gid);
592
593 if (setgid(uc->base_gid) != 0) {
594 nxt_log(task, NXT_LOG_CRIT, "setgid(%d) failed %E",
595 uc->base_gid, nxt_errno);
596 return NXT_ERROR;
597 }
598
599 if (uc->gids != NULL) {

--- 95 unchanged lines hidden ---
592
593 if (setgid(uc->base_gid) != 0) {
594 nxt_log(task, NXT_LOG_CRIT, "setgid(%d) failed %E",
595 uc->base_gid, nxt_errno);
596 return NXT_ERROR;
597 }
598
599 if (uc->gids != NULL) {

--- 95 unchanged lines hidden ---