| 1 |
'\" t |
| 2 |
.TH "SD_BUS_MESSAGE_SENSITIVE" "3" "" "systemd 261~rc3" "sd_bus_message_sensitive" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
sd_bus_message_sensitive \- Mark a message object as containing sensitive data |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.sp |
| 26 |
.ft B |
| 27 |
.nf |
| 28 |
#include <systemd/sd\-bus\&.h> |
| 29 |
.fi |
| 30 |
.ft |
| 31 |
.HP \w'int\ sd_bus_message_sensitive('u |
| 32 |
.BI "int sd_bus_message_sensitive(sd_bus_message\ *" "message" ");" |
| 33 |
.SH "DESCRIPTION" |
| 34 |
.PP |
| 35 |
\fBsd_bus_message_sensitive()\fR |
| 36 |
marks an allocated bus message as containing sensitive data\&. This ensures that the message data is carefully removed from memory (specifically, overwritten with zero bytes) when released\&. It is recommended to mark all incoming and outgoing messages like this that contain security credentials and similar data that should be dealt with carefully\&. Note that it is not possible to unmark messages like this, it is a one way operation\&. If a message is already marked sensitive and then marked sensitive a second time the message remains marked so and no further operation is executed\&. |
| 37 |
.PP |
| 38 |
As a safety precaution all messages that are created as reply to messages that are marked sensitive are also implicitly marked so\&. |
| 39 |
.SH "RETURN VALUE" |
| 40 |
.PP |
| 41 |
On success, this functions return 0 or a positive integer\&. On failure, it returns a negative errno\-style error code\&. |
| 42 |
.SS "Errors" |
| 43 |
.PP |
| 44 |
Returned errors may indicate the following problems: |
| 45 |
.PP |
| 46 |
\fB\-EINVAL\fR |
| 47 |
.RS 4 |
| 48 |
The |
| 49 |
\fImessage\fR |
| 50 |
parameter is |
| 51 |
\fBNULL\fR\&. |
| 52 |
.sp |
| 53 |
Added in version 245\&. |
| 54 |
.RE |
| 55 |
.SH "NOTES" |
| 56 |
.PP |
| 57 |
Functions described here are available as a shared library, which can be compiled against and linked to with the |
| 58 |
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1) |
| 59 |
file\&. |
| 60 |
.PP |
| 61 |
The code described here uses |
| 62 |
\fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call |
| 63 |
\fBsetenv\fR(3) |
| 64 |
from a parallel thread\&. It is recommended to only do calls to |
| 65 |
\fBsetenv()\fR |
| 66 |
from an early phase of the program when no other threads have been started\&. |
| 67 |
.SH "HISTORY" |
| 68 |
.PP |
| 69 |
\fBsd_bus_message_sensitive()\fR |
| 70 |
was added in version 245\&. |
| 71 |
.SH "SEE ALSO" |
| 72 |
.PP |
| 73 |
\fBsystemd\fR(1), \fBsd-bus\fR(3), \fBsd_bus_message_new_method_call\fR(3) |