]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/libsystemd/sd-bus/bus-creds.h
update TODO
[thirdparty/systemd.git] / src / libsystemd / sd-bus / bus-creds.h
CommitLineData
5b12334d
LP
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3#pragma once
4
5/***
6 This file is part of systemd.
7
8 Copyright 2013 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22***/
23
24#include <stdbool.h>
25
26#include "sd-bus.h"
5b12334d
LP
27
28struct sd_bus_creds {
29 bool allocated;
30 unsigned n_ref;
0f514420 31
5b12334d 32 uint64_t mask;
0f514420 33 uint64_t augmented;
5b12334d
LP
34
35 uid_t uid;
705a415f
LP
36 uid_t euid;
37 uid_t suid;
38 uid_t fsuid;
5b12334d 39 gid_t gid;
705a415f
LP
40 gid_t egid;
41 gid_t sgid;
42 gid_t fsgid;
43
02581590
LP
44 gid_t *supplementary_gids;
45 unsigned n_supplementary_gids;
46
1386e47d 47 pid_t ppid;
5b12334d 48 pid_t pid;
5b12334d
LP
49 pid_t tid;
50
51 char *comm;
52 char *tid_comm;
53 char *exe;
54
55 char *cmdline;
49b832c5 56 size_t cmdline_size;
5b12334d
LP
57 char **cmdline_array;
58
59 char *cgroup;
60 char *session;
61 char *unit;
62 char *user_unit;
63 char *slice;
64
4761e880
LP
65 char *tty;
66
7d9fcc2b 67 uint32_t *capability;
5b12334d
LP
68
69 uint32_t audit_session_id;
70 uid_t audit_login_uid;
71
72 char *label;
49b832c5
LP
73
74 char *unique_name;
75
65dae17a 76 char **well_known_names;
fb6d9b77
LP
77 bool well_known_names_driver:1;
78 bool well_known_names_local:1;
751bc6ac
LP
79
80 char *cgroup_root;
cccb0b2c 81
455971c1 82 char *description, *unescaped_description;
5b12334d
LP
83};
84
85sd_bus_creds* bus_creds_new(void);
86
87void bus_creds_done(sd_bus_creds *c);
88
89int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid);
49b832c5
LP
90
91int bus_creds_extend_by_pid(sd_bus_creds *c, uint64_t mask, sd_bus_creds **ret);