nxt_clone.h (1306:3604d05e48be) nxt_clone.h (1488:6976d36be926)
1/*
2 * Copyright (C) Igor Sysoev
3 * Copyright (C) NGINX, Inc.
4 */
5
1/*
2 * Copyright (C) Igor Sysoev
3 * Copyright (C) NGINX, Inc.
4 */
5
6#ifndef _NXT_CLONE_INCLUDED_
7#define _NXT_CLONE_INCLUDED_
6#ifndef _NXT_CLONE_H_INCLUDED_
7#define _NXT_CLONE_H_INCLUDED_
8
9
10#if (NXT_HAVE_CLONE_NEWUSER)
11
12typedef struct {
13 nxt_int_t container;
14 nxt_int_t host;
15 nxt_int_t size;

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

31#endif
32
33} nxt_clone_t;
34
35
36pid_t nxt_clone(nxt_int_t flags);
37
38
8
9
10#if (NXT_HAVE_CLONE_NEWUSER)
11
12typedef struct {
13 nxt_int_t container;
14 nxt_int_t host;
15 nxt_int_t size;

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

31#endif
32
33} nxt_clone_t;
34
35
36pid_t nxt_clone(nxt_int_t flags);
37
38
39#if (NXT_HAVE_CLONE_NEWUSER)
39#define nxt_is_clone_flag_set(flags, test) \
40 ((flags & CLONE_##test) == CLONE_##test)
40
41
41#define NXT_CLONE_USER(flags) \
42 ((flags & CLONE_NEWUSER) == CLONE_NEWUSER)
43
42
43#if (NXT_HAVE_CLONE_NEWUSER)
44
44NXT_EXPORT nxt_int_t nxt_clone_credential_map(nxt_task_t *task, pid_t pid,
45 nxt_credential_t *creds, nxt_clone_t *clone);
46NXT_EXPORT nxt_int_t nxt_clone_vldt_credential_uidmap(nxt_task_t *task,
47 nxt_clone_credential_map_t *map, nxt_credential_t *creds);
48NXT_EXPORT nxt_int_t nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
49 nxt_clone_credential_map_t *map, nxt_credential_t *creds);
50
51#endif
52
45NXT_EXPORT nxt_int_t nxt_clone_credential_map(nxt_task_t *task, pid_t pid,
46 nxt_credential_t *creds, nxt_clone_t *clone);
47NXT_EXPORT nxt_int_t nxt_clone_vldt_credential_uidmap(nxt_task_t *task,
48 nxt_clone_credential_map_t *map, nxt_credential_t *creds);
49NXT_EXPORT nxt_int_t nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
50 nxt_clone_credential_map_t *map, nxt_credential_t *creds);
51
52#endif
53
53#endif /* _NXT_CLONE_INCLUDED_ */
54
55#endif /* _NXT_CLONE_H_INCLUDED_ */