systemd/man/sd-bus-errors.xml
2023-12-25 15:51:47 +01:00

347 lines
16 KiB
XML

<?xml version='1.0'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<refentry id="sd-bus-errors"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>sd-bus-errors</title>
<productname>systemd</productname>
</refentryinfo>
<refmeta>
<refentrytitle>sd-bus-errors</refentrytitle>
<manvolnum>3</manvolnum>
</refmeta>
<refnamediv>
<refname>sd-bus-errors</refname>
<refname>SD_BUS_ERROR_FAILED</refname>
<refname>SD_BUS_ERROR_NO_MEMORY</refname>
<refname>SD_BUS_ERROR_SERVICE_UNKNOWN</refname>
<refname>SD_BUS_ERROR_NAME_HAS_NO_OWNER</refname>
<refname>SD_BUS_ERROR_NO_REPLY</refname>
<refname>SD_BUS_ERROR_IO_ERROR</refname>
<refname>SD_BUS_ERROR_BAD_ADDRESS</refname>
<refname>SD_BUS_ERROR_NOT_SUPPORTED</refname>
<refname>SD_BUS_ERROR_LIMITS_EXCEEDED</refname>
<refname>SD_BUS_ERROR_ACCESS_DENIED</refname>
<refname>SD_BUS_ERROR_AUTH_FAILED</refname>
<refname>SD_BUS_ERROR_NO_SERVER</refname>
<refname>SD_BUS_ERROR_TIMEOUT</refname>
<refname>SD_BUS_ERROR_NO_NETWORK</refname>
<refname>SD_BUS_ERROR_ADDRESS_IN_USE</refname>
<refname>SD_BUS_ERROR_DISCONNECTED</refname>
<refname>SD_BUS_ERROR_INVALID_ARGS</refname>
<refname>SD_BUS_ERROR_FILE_NOT_FOUND</refname>
<refname>SD_BUS_ERROR_FILE_EXISTS</refname>
<refname>SD_BUS_ERROR_UNKNOWN_METHOD</refname>
<refname>SD_BUS_ERROR_UNKNOWN_OBJECT</refname>
<refname>SD_BUS_ERROR_UNKNOWN_INTERFACE</refname>
<refname>SD_BUS_ERROR_UNKNOWN_PROPERTY</refname>
<refname>SD_BUS_ERROR_PROPERTY_READ_ONLY</refname>
<refname>SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</refname>
<refname>SD_BUS_ERROR_INVALID_SIGNATURE</refname>
<refname>SD_BUS_ERROR_INCONSISTENT_MESSAGE</refname>
<refname>SD_BUS_ERROR_TIMED_OUT</refname>
<refname>SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</refname>
<refname>SD_BUS_ERROR_MATCH_RULE_INVALID</refname>
<refname>SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED</refname>
<refname>SD_BUS_ERROR_INVALID_FILE_CONTENT</refname>
<refname>SD_BUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN</refname>
<refname>SD_BUS_ERROR_OBJECT_PATH_IN_USE</refname>
<refpurpose>Standard D-Bus error names</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
<funcsynopsisinfo>
#define SD_BUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
#define SD_BUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
#define SD_BUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown"
#define SD_BUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner"
#define SD_BUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply"
#define SD_BUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError"
#define SD_BUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress"
#define SD_BUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported"
#define SD_BUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded"
#define SD_BUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied"
#define SD_BUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed"
#define SD_BUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer"
#define SD_BUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout"
#define SD_BUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork"
#define SD_BUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse"
#define SD_BUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected"
#define SD_BUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
#define SD_BUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound"
#define SD_BUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists"
#define SD_BUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod"
#define SD_BUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject"
#define SD_BUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface"
#define SD_BUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty"
#define SD_BUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error.PropertyReadOnly"
#define SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
#define SD_BUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature"
#define SD_BUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error.InconsistentMessage"
#define SD_BUS_ERROR_TIMED_OUT "org.freedesktop.DBus.Error.TimedOut"
#define SD_BUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound"
#define SD_BUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid"
#define SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED \
"org.freedesktop.DBus.Error.InteractiveAuthorizationRequired"
#define SD_BUS_ERROR_INVALID_FILE_CONTENT "org.freedesktop.DBus.Error.InvalidFileContent"
#define SD_BUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN \
"org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
#define SD_BUS_ERROR_OBJECT_PATH_IN_USE "org.freedesktop.DBus.Error.ObjectPathInUse"
</funcsynopsisinfo>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>In addition to the error names user programs define, D-Bus
knows a number of generic, standardized error names that are
listed below.</para>
<para>In addition to this list, in sd-bus, the special error
namespace <literal>System.Error.</literal> is used to map
arbitrary Linux system errors (as defined by <citerefentry
project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
to D-Bus errors and back. For example, the error
<constant>EUCLEAN</constant> is mapped to
<literal>System.Error.EUCLEAN</literal> and back.</para>
<variablelist>
<varlistentry>
<term><constant>SD_BUS_ERROR_FAILED</constant></term>
<listitem><para>A generic error indication. See the error
message for further details. This error name should be
avoided, in favor of a more expressive error
name.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_NO_MEMORY</constant></term>
<listitem><para>A memory allocation failed, and the requested
operation could not be completed.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_SERVICE_UNKNOWN</constant></term>
<listitem><para>The contacted bus service is unknown and
cannot be activated.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_NAME_HAS_NO_OWNER</constant></term>
<listitem><para>The specified bus service name currently has
no owner.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_NO_REPLY</constant></term>
<listitem><para>A message did not receive a reply. This error
is usually generated after a timeout.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_IO_ERROR</constant></term>
<listitem><para>Generic input/output error, for example when
accessing a socket or other I/O context.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_BAD_ADDRESS</constant></term>
<listitem><para>The specified D-Bus bus address string is
malformed.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_NOT_SUPPORTED</constant></term>
<listitem><para>The requested operation is not supported on
the local system.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_LIMITS_EXCEEDED</constant></term>
<listitem><para>Some limited resource has been
exhausted.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_ACCESS_DENIED</constant></term>
<listitem><para>Access to a resource has been denied due to security restrictions.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_AUTH_FAILED</constant></term>
<listitem><para>Authentication did not complete successfully.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_NO_SERVER</constant></term>
<listitem><para>Unable to connect to the specified server.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_TIMEOUT</constant></term>
<listitem><para>An operation timed out. Note that method calls
which timeout generate a
<constant>SD_BUS_ERROR_NO_REPLY</constant>.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_NO_NETWORK</constant></term>
<listitem><para>No network available to execute requested network operation on.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_ADDRESS_IN_USE</constant></term>
<listitem><para>The specified network address is already being listened on.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_DISCONNECTED</constant></term>
<listitem><para>The connection has been terminated.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_INVALID_ARGS</constant></term>
<listitem><para>One or more invalid arguments have been passed.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_FILE_NOT_FOUND</constant></term>
<listitem><para>The requested file could not be found.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_FILE_EXISTS</constant></term>
<listitem><para>The requested file already exists.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_UNKNOWN_METHOD</constant></term>
<listitem><para>The requested method does not exist in the selected interface.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_UNKNOWN_OBJECT</constant></term>
<listitem><para>The requested object does not exist in the selected service.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_UNKNOWN_INTERFACE</constant></term>
<listitem><para>The requested interface does not exist on the selected object.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_UNKNOWN_PROPERTY</constant></term>
<listitem><para>The requested property does not exist in the selected interface.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_PROPERTY_READ_ONLY</constant></term>
<listitem><para>A write operation was requested on a read-only property.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</constant></term>
<listitem><para>The requested PID is not known.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_INVALID_SIGNATURE</constant></term>
<listitem><para>The specified message signature is not
valid.</para>
<xi:include href="version-info.xml" xpointer="v223"/>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_INCONSISTENT_MESSAGE</constant></term>
<listitem><para>The passed message does not validate
correctly.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</constant></term>
<listitem><para>The specified match rule does not exist.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_MATCH_RULE_INVALID</constant></term>
<listitem><para>The specified match rule is invalid.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
<varlistentry>
<term><constant>SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED</constant></term>
<listitem><para>Access to the requested operation is not
permitted. However, it might be available after interactive
authentication. This is usually returned by method calls
supporting a framework for additional interactive
authorization, when interactive authorization was not enabled
with the
<citerefentry><refentrytitle>sd_bus_message_set_allow_interactive_authorization</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for the method call message.</para>
<xi:include href="version-info.xml" xpointer="v223"/></listitem>
</varlistentry>
</variablelist>
</refsect1>
<xi:include href="libsystemd-pkgconfig.xml" />
<refsect1>
<title>See Also</title>
<para><simplelist type="inline">
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>libsystemd</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>sd_bus_message_set_allow_interactive_authorization</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
<member><citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
<member><citerefentry project='man-pages'><refentrytitle>strerror_r</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
</simplelist></para>
</refsect1>
</refentry>