1SD_BUS_GET_NAME_CREDS(3)     sd_bus_get_name_creds    SD_BUS_GET_NAME_CREDS(3)
2
3
4

NAME

6       sd_bus_get_name_creds, sd_bus_get_owner_creds - Query bus client
7       credentials
8

SYNOPSIS

10       #include <systemd/sd-bus.h>
11
12       int sd_bus_get_name_creds(sd_bus *bus, const char *name, uint64_t mask,
13                                 sd_bus_creds **creds);
14
15       int sd_bus_get_owner_creds(sd_bus *bus, uint64_t mask,
16                                  sd_bus_creds **creds);
17

DESCRIPTION

19       sd_bus_get_name_creds() queries the credentials of the bus client
20       identified by name. The mask parameter is a combo of SD_BUS_CREDS_*
21       flags that indicate which credential info the caller is interested in.
22       See sd_bus_creds_new_from_pid(3) for a list of possible flags. On
23       success, creds contains a new sd_bus_creds instance with the requested
24       information. Ownership of this instance belongs to the caller and it
25       should be freed once no longer needed by calling sd_bus_creds_unref(3).
26
27       sd_bus_get_owner_creds() queries the credentials of the creator of the
28       given bus. The mask and creds parameters behave the same as in
29       sd_bus_get_name_creds().
30

RETURN VALUE

32       On success, these functions return a non-negative integer. On failure,
33       they return a negative errno-style error code.
34
35   Errors
36       Returned errors may indicate the following problems:
37
38       -EINVAL
39           An argument is invalid.
40
41       -ENOPKG
42           The bus cannot be resolved.
43
44       -EPERM
45           The bus has already been started.
46
47       -ECHILD
48           The bus was created in a different process.
49
50       -ENOMEM
51           Memory allocation failed.
52

NOTES

54       These APIs are implemented as a shared library, which can be compiled
55       and linked to with the libsystemd pkg-config(1) file.
56

SEE ALSO

58       systemd(1), sd-bus(3), sd_bus_creds_unref(3)
59
60
61
62systemd 251                                           SD_BUS_GET_NAME_CREDS(3)
Impressum