Fixed the previous commit.
This commit is contained in:
@@ -317,19 +317,25 @@ nxt_master_start_worker_process(nxt_task_t *task, nxt_runtime_t *rt,
|
||||
return NXT_ERROR;
|
||||
}
|
||||
|
||||
init->user_cred = (nxt_user_cred_t *) (init + 1);
|
||||
|
||||
user = nxt_pointer_to(init->user_cred, sizeof(nxt_user_cred_t));
|
||||
|
||||
nxt_memcpy(user, app_conf->user.start, app_conf->user.length);
|
||||
user[app_conf->user.length] = '\0';
|
||||
|
||||
group = nxt_pointer_to(user, app_conf->user.length + 1);
|
||||
|
||||
nxt_memcpy(group, app_conf->group.start, app_conf->group.length);
|
||||
group[app_conf->group.length] = '\0';
|
||||
|
||||
init->user_cred = (nxt_user_cred_t *) (init + 1);
|
||||
|
||||
init->user_cred->user = user;
|
||||
|
||||
if (app_conf->group.start != NULL) {
|
||||
group = nxt_pointer_to(user, app_conf->user.length + 1);
|
||||
|
||||
nxt_memcpy(group, app_conf->group.start, app_conf->group.length);
|
||||
group[app_conf->group.length] = '\0';
|
||||
|
||||
} else {
|
||||
group = NULL;
|
||||
}
|
||||
|
||||
if (nxt_user_cred_get(task, init->user_cred, group) != NXT_OK) {
|
||||
return NXT_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user