1SD_BUS_MESSAGE_SENSITIVE(3)sd_bus_message_sensitiveSD_BUS_MESSAGE_SENSITIVE(3)
2
3
4
6 sd_bus_message_sensitive - Mark a message object as containing
7 sensitive data
8
10 #include <systemd/sd-bus.h>
11
12 int sd_bus_message_sensitive(sd_bus_message *message);
13
15 sd_bus_message_sensitive() marks an allocated bus message as containing
16 sensitive data. This ensures that the message data is carefully removed
17 from memory (specifically, overwritten with zero bytes) when released.
18 It is recommended to mark all incoming and outgoing messages like this
19 that contain security credentials and similar data that should be dealt
20 with carefully. Note that it is not possible to unmark messages like
21 this, it's a one way operation. If a message is already marked
22 sensitive and then marked sensitive a second time the message remains
23 marked so and no further operation is executed.
24
25 As a safety precaution all messages that are created as reply to
26 messages that are marked sensitive are also implicitly marked so.
27
29 On success, this functions return 0 or a positive integer. On failure,
30 it returns a negative errno-style error code.
31
32 Errors
33 Returned errors may indicate the following problems:
34
35 -EINVAL
36 The message parameter is NULL.
37
39 Functions described here are available as a shared library, which can
40 be compiled against and linked to with the libsystemd pkg-config(1)
41 file.
42
43 The code described here uses getenv(3), which is declared to be not
44 multi-thread-safe. This means that the code calling the functions
45 described here must not call setenv(3) from a parallel thread. It is
46 recommended to only do calls to setenv() from an early phase of the
47 program when no other threads have been started.
48
50 systemd(1), sd-bus(3), sd_bus_message_new_method_call(3)
51
52
53
54systemd 254 SD_BUS_MESSAGE_SENSITIVE(3)