Debian Codegraph @

src/shared/machine-bind-user.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "shared-forward.h"
5
6 typedef struct MachineBindUserData {
7 /* The host's user/group records */
8 UserRecord *host_user;
9 GroupRecord *host_group;
10
11 /* The mapped records to place into the container */
12 UserRecord *payload_user;
13 GroupRecord *payload_group;
14 } MachineBindUserData;
15
16 typedef struct MachineBindUserContext {
17 MachineBindUserData *data;
18 size_t n_data;
19 } MachineBindUserContext;
20
21 MachineBindUserContext* machine_bind_user_context_free(MachineBindUserContext *c);
22
23 DEFINE_TRIVIAL_CLEANUP_FUNC(MachineBindUserContext*, machine_bind_user_context_free);
24
25 int machine_bind_user_prepare(
26 const char *directory,
27 char **bind_user,
28 const char *bind_user_shell,
29 bool bind_user_shell_copy,
30 const char *bind_user_home_mount_directory,
31 char **bind_user_groups,
32 MachineBindUserContext **ret);