xref: /unit/src/nxt_credential.h (revision 1305:966d691dab2c)
1 /*
2  * Copyright (C) Igor Sysoev
3  * Copyright (C) NGINX, Inc.
4  */
5 
6 #ifndef _NXT_CREDENTIAL_H_INCLUDED_
7 #define _NXT_CREDENTIAL_H_INCLUDED_
8 
9 
10 typedef uid_t   nxt_uid_t;
11 typedef gid_t   nxt_gid_t;
12 
13 typedef struct {
14     const char  *user;
15     nxt_uid_t   uid;
16     nxt_gid_t   base_gid;
17     nxt_uint_t  ngroups;
18     nxt_gid_t   *gids;
19 } nxt_credential_t;
20 
21 
22 NXT_EXPORT nxt_int_t nxt_credential_get(nxt_task_t *task, nxt_mp_t *mp,
23     nxt_credential_t *uc, const char *group);
24 NXT_EXPORT nxt_int_t nxt_credential_set(nxt_task_t *task,
25     nxt_credential_t *uc);
26 
27 
28 #endif /* _NXT_CREDENTIAL_H_INCLUDED_ */
29