1<?xml version='1.0'?> <!--*-nxml-*--> 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> 5 6<refentry id="sd_bus_message_sensitive" xmlns:xi="http://www.w3.org/2001/XInclude"> 7 8 <refentryinfo> 9 <title>sd_bus_message_sensitive</title> 10 <productname>systemd</productname> 11 </refentryinfo> 12 13 <refmeta> 14 <refentrytitle>sd_bus_message_sensitive</refentrytitle> 15 <manvolnum>3</manvolnum> 16 </refmeta> 17 18 <refnamediv> 19 <refname>sd_bus_message_sensitive</refname> 20 21 <refpurpose>Mark a message object as containing sensitive data</refpurpose> 22 </refnamediv> 23 24 <refsynopsisdiv> 25 <funcsynopsis> 26 <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> 27 28 <funcprototype> 29 <funcdef>int <function>sd_bus_message_sensitive</function></funcdef> 30 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef> 31 </funcprototype> 32 </funcsynopsis> 33 </refsynopsisdiv> 34 35 <refsect1> 36 <title>Description</title> 37 38 <para><function>sd_bus_message_sensitive()</function> marks an allocated bus message as containing 39 sensitive data. This ensures that the message data is carefully removed from memory (specifically, 40 overwritten with zero bytes) when released. It is recommended to mark all incoming and outgoing messages 41 like this that contain security credentials and similar data that should be dealt with carefully. Note 42 that it is not possible to unmark messages like this, it's a one way operation. If a message is already 43 marked sensitive and then marked sensitive a second time the message remains marked so and no further 44 operation is executed.</para> 45 46 <para>As a safety precaution all messages that are created as reply to messages that are marked sensitive 47 are also implicitly marked so.</para> 48 </refsect1> 49 50 <refsect1> 51 <title>Return Value</title> 52 53 <para>On success, this functions return 0 or a positive integer. On failure, it returns a 54 negative errno-style error code.</para> 55 56 <refsect2> 57 <title>Errors</title> 58 59 <para>Returned errors may indicate the following problems:</para> 60 61 <variablelist> 62 <varlistentry> 63 <term><constant>-EINVAL</constant></term> 64 65 <listitem><para>The <parameter>message</parameter> parameter is 66 <constant>NULL</constant>.</para></listitem> 67 </varlistentry> 68 69 </variablelist> 70 </refsect2> 71 </refsect1> 72 73 <xi:include href="libsystemd-pkgconfig.xml" /> 74 75 <refsect1> 76 <title>See Also</title> 77 78 <para> 79 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 80 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 81 <citerefentry><refentrytitle>sd_bus_message_new_method_call</refentrytitle><manvolnum>3</manvolnum></citerefentry> 82 </para> 83 </refsect1> 84 85</refentry> 86