xref: /unit/src/nxt_credential.h (revision 1306:3604d05e48be)
11305St.nateldemoura@f5.com /*
21305St.nateldemoura@f5.com  * Copyright (C) Igor Sysoev
31305St.nateldemoura@f5.com  * Copyright (C) NGINX, Inc.
41305St.nateldemoura@f5.com  */
51305St.nateldemoura@f5.com 
61305St.nateldemoura@f5.com #ifndef _NXT_CREDENTIAL_H_INCLUDED_
71305St.nateldemoura@f5.com #define _NXT_CREDENTIAL_H_INCLUDED_
81305St.nateldemoura@f5.com 
91305St.nateldemoura@f5.com 
101305St.nateldemoura@f5.com typedef uid_t   nxt_uid_t;
111305St.nateldemoura@f5.com typedef gid_t   nxt_gid_t;
121305St.nateldemoura@f5.com 
131305St.nateldemoura@f5.com typedef struct {
141305St.nateldemoura@f5.com     const char  *user;
151305St.nateldemoura@f5.com     nxt_uid_t   uid;
161305St.nateldemoura@f5.com     nxt_gid_t   base_gid;
171305St.nateldemoura@f5.com     nxt_uint_t  ngroups;
181305St.nateldemoura@f5.com     nxt_gid_t   *gids;
191305St.nateldemoura@f5.com } nxt_credential_t;
201305St.nateldemoura@f5.com 
211305St.nateldemoura@f5.com 
221305St.nateldemoura@f5.com NXT_EXPORT nxt_int_t nxt_credential_get(nxt_task_t *task, nxt_mp_t *mp,
231305St.nateldemoura@f5.com     nxt_credential_t *uc, const char *group);
24*1306St.nateldemoura@f5.com NXT_EXPORT nxt_int_t nxt_credential_setuid(nxt_task_t *task,
25*1306St.nateldemoura@f5.com     nxt_credential_t *uc);
26*1306St.nateldemoura@f5.com NXT_EXPORT nxt_int_t nxt_credential_setgids(nxt_task_t *task,
271305St.nateldemoura@f5.com     nxt_credential_t *uc);
281305St.nateldemoura@f5.com 
291305St.nateldemoura@f5.com 
301305St.nateldemoura@f5.com #endif /* _NXT_CREDENTIAL_H_INCLUDED_ */
31