common: compile libconfig as C++
[lttng-tools.git] / src / common / credentials.h
CommitLineData
18710679 1/*
ab5be9fa 2 * Copyright (C) 2019 Jérémie Galarneau <jeremie.galarneau@efficios.com>
18710679 3 *
ab5be9fa 4 * SPDX-License-Identifier: GPL-2.0-only
18710679 5 *
18710679
JG
6 */
7
8#ifndef LTTNG_CREDENTIALS_H
9#define LTTNG_CREDENTIALS_H
10
11#include <sys/types.h>
894e6e1c 12#include <stdbool.h>
84e46494 13#include "macros.h"
18710679 14
ff588497
JR
15#include "optional.h"
16
7966af57
SM
17#ifdef __cplusplus
18extern "C" {
19#endif
20
18710679 21struct lttng_credentials {
ff588497
JR
22 LTTNG_OPTIONAL(uid_t) uid;
23 LTTNG_OPTIONAL(gid_t) gid;
18710679
JG
24};
25
ff588497 26uid_t lttng_credentials_get_uid(const struct lttng_credentials *creds);
84e46494 27
ff588497
JR
28gid_t lttng_credentials_get_gid(const struct lttng_credentials *creds);
29
30bool lttng_credentials_is_equal_uid(const struct lttng_credentials *a,
31 const struct lttng_credentials *b);
32
33bool lttng_credentials_is_equal_gid(const struct lttng_credentials *a,
34 const struct lttng_credentials *b);
35
894e6e1c
JR
36bool lttng_credentials_is_equal(const struct lttng_credentials *a,
37 const struct lttng_credentials *b);
38
7966af57
SM
39#ifdef __cplusplus
40}
41#endif
42
18710679 43#endif /* LTTNG_CREDENTIALS_H */
This page took 0.032917 seconds and 4 git commands to generate.