Lines Matching refs:task

9 static nxt_int_t nxt_credential_groups_get(nxt_task_t *task, nxt_mp_t *mp,
14 nxt_credential_get(nxt_task_t *task, nxt_mp_t *mp, nxt_credential_t *uc, in nxt_credential_get() argument
27 nxt_alert(task, "getpwnam(\"%s\") failed, user \"%s\" not found", in nxt_credential_get()
30 nxt_alert(task, "getpwnam(\"%s\") failed %E", uc->user, nxt_errno); in nxt_credential_get()
47 nxt_alert(task, in nxt_credential_get()
51 nxt_alert(task, "getgrnam(\"%s\") failed %E", group, nxt_errno); in nxt_credential_get()
60 nxt_debug(task, "about to get \"%s\" groups (uid:%d, base gid:%d)", in nxt_credential_get()
63 if (nxt_credential_groups_get(task, mp, uc) != NXT_OK) { in nxt_credential_get()
81 nxt_debug(task, "user \"%s\" has gids:%*s", uc->user, p - msg, msg); in nxt_credential_get()
95 nxt_credential_groups_get(nxt_task_t *task, nxt_mp_t *mp, in nxt_credential_groups_get() argument
105 nxt_alert(task, "getgrouplist(\"%s\", %d, ...) failed %E", uc->user, in nxt_credential_groups_get()
127 nxt_alert(task, "getgrouplist(\"%s\", %d) failed %E", uc->user, in nxt_credential_groups_get()
180 nxt_credential_groups_get(nxt_task_t *task, nxt_mp_t *mp, nxt_credential_t *uc) in nxt_credential_groups_get() argument
189 nxt_alert(task, "getgroups(0, NULL) failed %E", nxt_errno); in nxt_credential_groups_get()
193 nxt_debug(task, "getgroups(0, NULL): %d", nsaved); in nxt_credential_groups_get()
215 nxt_alert(task, "getgroups(%d) failed %E", nsaved, nxt_errno); in nxt_credential_groups_get()
219 nxt_debug(task, "getgroups(): %d", nsaved); in nxt_credential_groups_get()
223 nxt_log(task, NXT_LOG_NOTICE, in nxt_credential_groups_get()
232 nxt_alert(task, "initgroups(%s, %d) failed %E", in nxt_credential_groups_get()
241 nxt_alert(task, "getgroups(0, NULL) failed %E", nxt_errno); in nxt_credential_groups_get()
245 nxt_debug(task, "getgroups(0, NULL): %d", ngroups); in nxt_credential_groups_get()
256 nxt_alert(task, "getgroups(%d) failed %E", ngroups, nxt_errno); in nxt_credential_groups_get()
267 nxt_alert(task, "setgroups(%d) failed %E", nsaved, nxt_errno); in nxt_credential_groups_get()
283 nxt_credential_setuid(nxt_task_t *task, nxt_credential_t *uc) in nxt_credential_setuid() argument
285 nxt_debug(task, "user cred set: \"%s\" uid:%d", uc->user, uc->uid); in nxt_credential_setuid()
291 nxt_log(task, NXT_LOG_ERR, "The uid %d (user \"%s\") isn't " in nxt_credential_setuid()
297 nxt_alert(task, "setuid(%d) failed %E", uc->uid, nxt_errno); in nxt_credential_setuid()
306 nxt_credential_setgids(nxt_task_t *task, nxt_credential_t *uc) in nxt_credential_setgids() argument
310 nxt_debug(task, "user cred set gids: base gid:%d, ngroups: %d", in nxt_credential_setgids()
313 rt = task->thread->runtime; in nxt_credential_setgids()
319 nxt_log(task, NXT_LOG_ERR, "The gid %d isn't valid in the " in nxt_credential_setgids()
325 nxt_alert(task, "setgid(%d) failed %E", uc->base_gid, nxt_errno); in nxt_credential_setgids()
338 nxt_log(task, NXT_LOG_ERR, "The user \"%s\" (uid: %d) has " in nxt_credential_setgids()
345 nxt_alert(task, "setgroups(%i) failed %E", uc->ngroups, nxt_errno); in nxt_credential_setgids()