SD_BUS_MESSAGE_SENSITIVE(3)
π
SD_BUS_MESSAGE_SENSITIVE(3) β like, the sd_bus_message_sensitive page, bestie
okay so this is the manual page for sd_bus_message_sensitive, and honestly? it's short but it matters, so pay attention π«Ά
β¨ NAME β¨
sd_bus_message_sensitive β mark a message object as containing sensitive data π
πΈ SYNOPSIS πΈ
#include <systemd/sd-bus.h>
int sd_bus_message_sensitive(sd_bus_message *message);
π DESCRIPTION π
so sd_bus_message_sensitive() does one thing and does it iconically: it marks an allocated bus message as containing sensitive data. and why do we care? because when that message gets released, its data gets carefully removed from memory β specifically, overwritten with zero bytes. no leftovers, no crumbs, nothing for the memory gremlins to find. β¨
the recommendation, straight up: mark all incoming and outgoing messages like this whenever they contain security credentials and similar data that should be dealt with carefully. it's giving responsible main character energy. π₯
β οΈ heads up bestie β you literally cannot unmark a message. it's a one way operation, periodt. and if a message is already marked sensitive and then you mark it sensitive a second time, it stays marked and no further operation is executed. no drama, no double work. π
also, as a safety precaution: every message that's created as a reply to a message that's marked sensitive gets implicitly marked too. the sensitivity is contagious in the best way. π¦
β RETURN VALUE β
on success, this function returns 0 or a positive integer. on failure, it returns a negative errno-style error code. π
π Errors
the errors it may throw back at you indicate the following problems:
-EINVALβ themessageparameter isNULL. yeah. that one. π«
Added in version 245.
π NOTES π
the functions described here are available as a shared library, which you can compile against and link to with the libsystemd pkg-config(1) file. π
all functions listed here are thread-agnostic, and only a single thread may operate on a given object at any given time. different threads may access the same object at different times, and multiple independent objects can be used from different threads in parallel. so likeβ¦ share the objects, not the moment. iykyk. π§
the code described here uses getenv(3), which is declared to be not multi-thread-safe. what that means for you: code calling the functions described here must not call setenv(3) from a parallel thread. the recommendation is to only do calls to setenv() from an early phase of the program, back when no other threads have been started. get it done first, then spawn the chaos. π
π HISTORY π
sd_bus_message_sensitive() was added in version 245. a classic, an icon, a legend. β
π₯ SEE ALSO π₯
systemd(1), sd-bus(3), sd_bus_message_new_method_call(3)
and that's the whole page, bestie β no cap π this was systemd 261.3, dated SD_BUS_MESSAGE_SENSITIVE(3), and honestly? she ate. πβ¨
π¦ where this page comes from
- ubuntu stonking: libsystemd-dev 261.3-0ubuntu3 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms