Compare commits

..

No commits in common. "92cad3f82dd314cd4d84a85448c499b9e71a7ae8" and "5fe63895b9cf8259c145a6e1df7c505835efae09" have entirely different histories.

20 changed files with 223 additions and 402 deletions

View File

@ -283,14 +283,6 @@ sensor:modalias:acpi:ACCE0001*:dmi:*svnEndless*:*pnELT-NL3*
sensor:modalias:acpi:KIOX000A*:dmi:*:svnEVE*:pnEveV:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
#########################################
# Geo Computers
#########################################
# Geoflex
sensor:modalias:acpi:KIOX010A*:dmi:*:svnGEO*:pnGeoFlex*:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
#########################################
# Google Chromebooks
#########################################

View File

@ -146,7 +146,6 @@ manpages = [
'sd_bus_call_method_asyncv',
'sd_bus_call_methodv'],
''],
['sd_bus_can_send', '3', [], ''],
['sd_bus_close', '3', ['sd_bus_default_flush_close', 'sd_bus_flush'], ''],
['sd_bus_creds_get_pid',
'3',
@ -343,7 +342,7 @@ manpages = [
'sd_bus_request_name_async'],
''],
['sd_bus_send', '3', [], ''],
['sd_bus_set_address', '3', ['sd_bus_get_address', 'sd_bus_set_exec'], ''],
['sd_bus_set_address', '3', ['sd_bus_get_address'], ''],
['sd_bus_set_close_on_exit', '3', ['sd_bus_get_close_on_exit'], ''],
['sd_bus_set_connected_signal', '3', ['sd_bus_get_connected_signal'], ''],
['sd_bus_set_description',
@ -360,14 +359,6 @@ manpages = [
'3',
['sd_bus_get_method_call_timeout'],
''],
['sd_bus_set_property',
'3',
['sd_bus_get_property',
'sd_bus_get_property_string',
'sd_bus_get_property_strv',
'sd_bus_get_property_trivial',
'sd_bus_set_propertyv'],
''],
['sd_bus_set_sender', '3', ['sd_bus_get_sender'], ''],
['sd_bus_set_watch_bind', '3', ['sd_bus_get_watch_bind'], ''],
['sd_bus_slot_get_bus',

View File

@ -50,7 +50,6 @@
<citerefentry><refentrytitle>sd_bus_call_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call_method_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_can_send</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_close</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
@ -71,10 +70,6 @@
<citerefentry><refentrytitle>sd_bus_message_dump</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_property</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_property_trivial</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_property_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_property_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_signature</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
@ -104,8 +99,6 @@
<citerefentry><refentrytitle>sd_bus_set_connected_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_method_call_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_property</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_propertyv</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_watch_bind</refentrytitle><manvolnum>3</manvolnum></citerefentry>
<citerefentry><refentrytitle>sd_bus_set_close_on_exit</refentrytitle><manvolnum>3</manvolnum></citerefentry>,

View File

@ -133,7 +133,7 @@
<citerefentry><refentrytitle>sd_bus_message_new_method_call</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_property</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>

View File

@ -1,93 +0,0 @@
<?xml version='1.0'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1+ -->
<refentry id="sd_bus_can_send"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>sd_bus_can_send</title>
<productname>systemd</productname>
</refentryinfo>
<refmeta>
<refentrytitle>sd_bus_can_send</refentrytitle>
<manvolnum>3</manvolnum>
</refmeta>
<refnamediv>
<refname>sd_bus_can_send</refname>
<refpurpose>Check which types can be sent over a bus object</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
<funcprototype>
<funcdef>void <function>sd_bus_can_send</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>char <parameter>type</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><function>sd_bus_can_send</function> is mostly used for checking if file descriptor
passing is available on the given bus. <parameter>type</parameter> can be any of the
<constant>SD_BUS_TYPE</constant> constants.</para>
</refsect1>
<refsect1>
<title>Return Value</title>
<para>On failure, <function>sd_bus_can_send()</function> returns a negative errno-style error
code. If values of the given type can be sent over the given bus, it returns a positive integer.
Otherwise, it returns zero.</para>
<refsect2>
<title>Errors</title>
<para>Returned errors may indicate the following problems:</para>
<variablelist>
<varlistentry>
<term><constant>-ENOPKG</constant></term>
<listitem><para>The bus object <parameter>bus</parameter> could not be resolved.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>-ENOTCONN</constant></term>
<listitem><para>The input parameter <parameter>bus</parameter> is
<constant>NULL</constant> or the bus is not connected.</para></listitem>
</varlistentry>
<varlistentry>
<term><constant>-ECHILD</constant></term>
<listitem><para>The bus object <parameter>bus</parameter> was created in a different
process.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<xi:include href="libsystemd-pkgconfig.xml" />
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -48,44 +48,39 @@
<refsect1>
<title>Description</title>
<para><function>sd_bus_close()</function> disconnects the specified bus connection. When this
call is invoked and the specified bus object refers to an active connection it is immediately
terminated. No further messages may be sent or received on it. Any messages queued in the bus
object (both incoming and outgoing) are released. If invoked on <constant>NULL</constant> bus
object or when the bus connection is already closed this function executes no operation. This
call does not free or unreference the bus object itself. Use
<citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for that.</para>
<para><function>sd_bus_close()</function> disconnects the specified bus connection. When this call is invoked and
the specified bus object refers to an active connection it is immediately terminated. No further messages may be
sent or received on it. Any messages queued in the bus object (both incoming and outgoing) are released. If
invoked on <constant>NULL</constant> bus object or when the bus connection is already closed this function executes
no operation. This call does not free or unreference the bus object itself. Use
<citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> for that.</para>
<para><function>sd_bus_flush()</function> synchronously writes out all outgoing queued message
on a bus connection if there are any. This function call may block if the peer is not processing
bus messages quickly.</para>
<para><function>sd_bus_flush()</function> synchronously writes out all outgoing queued message on a bus connection
if there are any. This function call may block if the peer is not processing bus messages quickly.</para>
<para>Before a program exits it is usually a good idea to flush any pending messages with
<function>sd_bus_flush()</function> and then close connections with
<function>sd_bus_close()</function> to ensure that no unwritten messages are lost, no further
messages may be queued and all incoming but unprocessed messages are released. After both
operations have been done, it is a good idea to also drop any remaining references to the bus
object so that it may be freed. Since these three operations are frequently done together a
helper call
<citerefentry><refentrytitle>sd_bus_flush_close_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
is provided that combines them into one.</para>
<function>sd_bus_flush()</function> and then close connections with <function>sd_bus_close()</function> to ensure
that no unwritten messages are lost, no further messages may be queued and all incoming but unprocessed messages
are released. After both operations have been done, it is a good idea to also drop any remaining references to the
bus object so that it may be freed. Since these three operations are frequently done together a helper call
<citerefentry><refentrytitle>sd_bus_flush_close_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> is
provided that combines them into one.</para>
<para><function>sd_bus_default_flush_close()</function> is similar to
<function>sd_bus_flush_close_unref</function>, but does not take a bus pointer argument and
instead iterates over any of the "default" busses opened by
<function>sd_bus_flush_close_unref</function>, but does not take a bus pointer argument and instead
iterates over any of the "default" busses opened by
<citerefentry><refentrytitle>sd_bus_default</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_default_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_default_system</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
and similar calls. <function>sd_bus_default_flush_close()</function> is particularly useful to
clean up any busses opened using those calls before the program exits.</para>
and similar calls. <function>sd_bus_default_flush_close()</function> is particularly useful to clean up
any busses opened using those calls before the program exits.</para>
</refsect1>
<refsect1>
<title>Return Value</title>
<para>On success, <function>sd_bus_flush()</function> returns a non-negative integer. On
failure, it returns a negative errno-style error code.</para>
<para>On success, <function>sd_bus_flush()</function> returns 0 or a positive integer. On failure, it returns a
negative errno-style error code.</para>
<refsect2>
<title>Errors</title>
@ -96,8 +91,7 @@
<varlistentry>
<term><constant>-ECHILD</constant></term>
<listitem><para>The bus connection has been created in a different process.</para>
</listitem>
<listitem><para>The bus connection has been created in a different process.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>

View File

@ -80,7 +80,7 @@
dictionary entries, followed by a pair of values for each entry matching the element type of the
dictionary entries.</para>
<para><function>sd_bus_message_appendv()</function> is equivalent to
<para>The <function>sd_bus_message_appendv()</function> is equivalent to the
<function>sd_bus_message_append()</function>, except that it is called with a
<literal>va_list</literal> instead of a variable number of arguments. This function does not
call the <function>va_end()</function> macro. Because it invokes the

View File

@ -19,7 +19,6 @@
<refnamediv>
<refname>sd_bus_set_address</refname>
<refname>sd_bus_get_address</refname>
<refname>sd_bus_set_exec</refname>
<refpurpose>Set or query the address of the bus connection</refpurpose>
</refnamediv>
@ -40,12 +39,6 @@
<paramdef>const char** <parameter>address</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_set_exec</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>char *const *<parameter>argv</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@ -111,11 +104,6 @@
automatically by
<citerefentry><refentrytitle>sd_bus_open</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
similar calls, based on environment variables or built-in defaults.</para>
<para><function>sd_bus_set_exec</function> is a shorthand function for setting a
<literal>unixexec</literal> address that spawns the given executable with the given arguments.
If <parameter>argv</parameter> is <constant>NULL</constant>, the given executable is spawned
without any extra arguments.</para>
</refsect1>
<refsect1>

View File

@ -1,176 +0,0 @@
<?xml version='1.0'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1+ -->
<refentry id="sd_bus_set_property"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>sd_bus_set_property</title>
<productname>systemd</productname>
</refentryinfo>
<refmeta>
<refentrytitle>sd_bus_set_property</refentrytitle>
<manvolnum>3</manvolnum>
</refmeta>
<refnamediv>
<refname>sd_bus_set_property</refname>
<refname>sd_bus_set_propertyv</refname>
<refname>sd_bus_get_property</refname>
<refname>sd_bus_get_property_trivial</refname>
<refname>sd_bus_get_property_string</refname>
<refname>sd_bus_get_property_strv</refname>
<refpurpose>Set or query D-Bus service properties</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
<funcprototype>
<funcdef>int <function>sd_bus_set_property</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
<paramdef>sd_bus_message **<parameter>reply</parameter></paramdef>
<paramdef>const char *<parameter>type</parameter></paramdef>
<paramdef>...</paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_set_propertyv</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
<paramdef>sd_bus_message **<parameter>reply</parameter></paramdef>
<paramdef>const char *<parameter>type</parameter></paramdef>
<paramdef>va_list <parameter>ap</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_get_property</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
<paramdef>sd_bus_message **<parameter>reply</parameter></paramdef>
<paramdef>const char *<parameter>type</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_get_property_trivial</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
<paramdef>char <parameter>type</parameter></paramdef>
<paramdef>void *<parameter>ret_ptr</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_get_property_string</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
<paramdef>char **<parameter>ret</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_get_property_strv</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
<paramdef>char ***<parameter>ret</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>These functions set or query D-Bus properties. D-Bus properties are service fields exposed
via the <constant>org.freedesktop.DBus.Properties</constant> interface. Under the hood, these
functions call methods of the <constant>org.freedesktop.DBus.Properties</constant> interface and
as a result their semantics are similar to
<citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
<para><function>sd_bus_set_property()</function> sets a D-Bus property. On success, the response
is stored in <parameter>reply</parameter>. If setting the property fails or an internal error
occurs, an error is returned and an extended description of the error is optionally stored in
<parameter>ret_error</parameter> if it is not <constant>NULL</constant>.
<parameter>type</parameter> and the arguments that follow it describe the new value of the
property and must follow the format described in
<citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
<para><function>sd_bus_set_propertyv()</function> is equivalent to
<function>sd_bus_set_property()</function>, except that it is called with a
<literal>va_list</literal> instead of a variable number of arguments.</para>
<para><function>sd_bus_get_property()</function> queries a D-Bus property. If retrieving the
property fails or an internal error occurs, an error is returned and an extended description of
the error is optionally stored in <parameter>ret_error</parameter> if it is not
<constant>NULL</constant>. On success, the property is stored in <parameter>reply</parameter>.
<parameter>type</parameter> describes the property type and must follow the format described in
<citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
<para><function>sd_bus_get_property_trivial()</function>,
<function>sd_bus_get_property_string()</function> and
<function>sd_bus_get_property_strv()</function> are shorthands for
<function>sd_bus_get_property()</function> that are used to query basic, string and string
vector properties respectively. The caller is responsible for freeing the string and string
vector results stored in <parameter>ret</parameter> by
<function>sd_bus_get_property_string()</function> and
<function>sd_bus_get_property_strv()</function>.</para>
</refsect1>
<refsect1>
<title>Return Value</title>
<para>On success, these functions return a non-negative integer. On failure, they return a
negative errno-style error code.</para>
<refsect2 id='errors'>
<title>Errors</title>
<para>See the
<citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>
man page for a list of possible errors</para>
</refsect2>
</refsect1>
<xi:include href="libsystemd-pkgconfig.xml" />
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1055,16 +1055,6 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
if (!MANAGER_IS_SYSTEM(u->manager))
return 0;
/* For the following three directory types we need write access, and /var/ is possibly on the root
* fs. Hence order after systemd-remount-fs.service, to ensure things are writable. */
if (!strv_isempty(c->directories[EXEC_DIRECTORY_STATE].paths) ||
!strv_isempty(c->directories[EXEC_DIRECTORY_CACHE].paths) ||
!strv_isempty(c->directories[EXEC_DIRECTORY_LOGS].paths)) {
r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_REMOUNT_FS_SERVICE, true, UNIT_DEPENDENCY_FILE);
if (r < 0)
return r;
}
if (c->private_tmp) {
const char *p;

View File

@ -66,12 +66,6 @@ static enum {
EXPORT_FORMAT_MINIMAL, /* also strip signature */
} arg_export_format = EXPORT_FORMAT_FULL;
static const BusLocator home_mgr = {
.destination = "org.freedesktop.home1",
.path = "/org/freedesktop/home1",
.interface = "org.freedesktop.home1.Manager",
};
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra, json_variant_unrefp);
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra_this_machine, json_variant_unrefp);
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra_privileged, json_variant_unrefp);
@ -122,7 +116,15 @@ static int list_homes(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
r = bus_call_method(bus, &home_mgr, "ListHomes", &error, &reply, NULL);
r = sd_bus_call_method(
bus,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ListHomes",
&error,
&reply,
NULL);
if (r < 0)
return log_error_errno(r, "Failed to list homes: %s", bus_error_message(&error, r));
@ -385,7 +387,13 @@ static int activate_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "ActivateHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ActivateHome");
if (r < 0)
return bus_log_create_error(r);
@ -427,7 +435,13 @@ static int deactivate_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "DeactivateHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"DeactivateHome");
if (r < 0)
return bus_log_create_error(r);
@ -534,9 +548,27 @@ static int inspect_home(int argc, char *argv[], void *userdata) {
continue;
}
r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", *i);
r = sd_bus_call_method(
bus,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"GetUserRecordByName",
&error,
&reply,
"s",
*i);
} else {
r = bus_call_method(bus, &home_mgr, "GetUserRecordByUID", &error, &reply, "u", (uint32_t) uid);
r = sd_bus_call_method(
bus,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"GetUserRecordByUID",
&error,
&reply,
"u",
(uint32_t) uid);
}
if (r < 0) {
@ -611,7 +643,13 @@ static int authenticate_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "AuthenticateHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"AuthenticateHome");
if (r < 0)
return bus_log_create_error(r);
@ -1432,7 +1470,13 @@ static int create_home(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
r = bus_message_new_method_call(bus, &m, &home_mgr, "CreateHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"CreateHome");
if (r < 0)
return bus_log_create_error(r);
@ -1481,7 +1525,13 @@ static int remove_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "RemoveHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"RemoveHome");
if (r < 0)
return bus_log_create_error(r);
@ -1544,7 +1594,16 @@ static int acquire_updated_home_record(
if (!identity_properties_specified())
return log_error_errno(SYNTHETIC_ERRNO(EALREADY), "No field to change specified.");
r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
r = sd_bus_call_method(
bus,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"GetUserRecordByName",
&error,
&reply,
"s",
username);
if (r < 0)
return log_error_errno(r, "Failed to acquire user home record: %s", bus_error_message(&error, r));
@ -1630,7 +1689,13 @@ static int update_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
_cleanup_free_ char *formatted = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "UpdateHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"UpdateHome");
if (r < 0)
return bus_log_create_error(r);
@ -1665,7 +1730,13 @@ static int update_home(int argc, char *argv[], void *userdata) {
log_debug("Resizing");
r = bus_message_new_method_call(bus, &m, &home_mgr, "ResizeHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ResizeHome");
if (r < 0)
return bus_log_create_error(r);
@ -1698,7 +1769,13 @@ static int update_home(int argc, char *argv[], void *userdata) {
log_debug("Propagating password");
r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ChangePasswordHome");
if (r < 0)
return bus_log_create_error(r);
@ -1770,7 +1847,13 @@ static int passwd_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ChangePasswordHome");
if (r < 0)
return bus_log_create_error(r);
@ -1849,7 +1932,13 @@ static int resize_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "ResizeHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ResizeHome");
if (r < 0)
return bus_log_create_error(r);
@ -1886,7 +1975,13 @@ static int lock_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "LockHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"LockHome");
if (r < 0)
return bus_log_create_error(r);
@ -1925,7 +2020,13 @@ static int unlock_home(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "UnlockHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"UnlockHome");
if (r < 0)
return bus_log_create_error(r);
@ -1988,7 +2089,13 @@ static int with_home(int argc, char *argv[], void *userdata) {
return log_oom();
for (;;) {
r = bus_message_new_method_call(bus, &m, &home_mgr, "AcquireHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"AcquireHome");
if (r < 0)
return bus_log_create_error(r);
@ -2028,7 +2135,16 @@ static int with_home(int argc, char *argv[], void *userdata) {
}
}
r = bus_call_method(bus, &home_mgr, "GetHomeByName", &error, &reply, "s", argv[1]);
r = sd_bus_call_method(
bus,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"GetHomeByName",
&error,
&reply,
"s",
argv[1]);
if (r < 0)
return log_error_errno(r, "Failed to inspect home: %s", bus_error_message(&error, r));
@ -2055,7 +2171,13 @@ static int with_home(int argc, char *argv[], void *userdata) {
/* Close the fd that pings the home now. */
acquired_fd = safe_close(acquired_fd);
r = bus_message_new_method_call(bus, &m, &home_mgr, "ReleaseHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ReleaseHome");
if (r < 0)
return bus_log_create_error(r);
@ -2084,7 +2206,13 @@ static int lock_all_homes(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
r = bus_message_new_method_call(bus, &m, &home_mgr, "LockAllHomes");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"LockAllHomes");
if (r < 0)
return bus_log_create_error(r);

View File

@ -6,7 +6,6 @@
#include "sd-bus.h"
#include "bus-common-errors.h"
#include "bus-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "home-util.h"
@ -23,12 +22,6 @@
#define USER_RECORD_IS_HOMED INT_TO_PTR(1)
#define USER_RECORD_IS_OTHER INT_TO_PTR(2)
static const BusLocator home_mgr = {
.destination = "org.freedesktop.home1",
.path = "/org/freedesktop/home1",
.interface = "org.freedesktop.home1.Manager",
};
static int parse_argv(
pam_handle_t *handle,
int argc, const char **argv,
@ -128,7 +121,16 @@ static int acquire_user_record(
if (r != PAM_SUCCESS)
return r;
r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
r = sd_bus_call_method(
bus,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"GetUserRecordByName",
&error,
&reply,
"s",
username);
if (r < 0) {
if (sd_bus_error_has_name(&error, SD_BUS_ERROR_SERVICE_UNKNOWN) ||
sd_bus_error_has_name(&error, SD_BUS_ERROR_NAME_HAS_NO_OWNER)) {
@ -454,7 +456,13 @@ static int acquire_home(
}
}
r = bus_message_new_method_call(bus, &m, &home_mgr, do_auth ? "AcquireHome" : "RefHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
do_auth ? "AcquireHome" : "RefHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);
@ -663,7 +671,13 @@ _public_ PAM_EXTERN int pam_sm_close_session(
if (r != PAM_SUCCESS)
return r;
r = bus_message_new_method_call(bus, &m, &home_mgr, "ReleaseHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ReleaseHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);
@ -889,7 +903,13 @@ _public_ PAM_EXTERN int pam_sm_chauthtok(
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
r = sd_bus_message_new_method_call(
bus,
&m,
"org.freedesktop.home1",
"/org/freedesktop/home1",
"org.freedesktop.home1.Manager",
"ChangePasswordHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);

View File

@ -284,7 +284,7 @@ _public_ int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd) {
return 0;
}
_public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const *argv) {
_public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]) {
_cleanup_strv_free_ char **a = NULL;
int r;

View File

@ -143,7 +143,7 @@ int sd_bus_new(sd_bus **ret);
int sd_bus_set_address(sd_bus *bus, const char *address);
int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd);
int sd_bus_set_exec(sd_bus *bus, const char *path, char *const *argv);
int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]);
int sd_bus_get_address(sd_bus *bus, const char **address);
int sd_bus_set_bus_client(sd_bus *bus, int b);
int sd_bus_is_bus_client(sd_bus *bus);

View File

@ -6,14 +6,7 @@ sd_total=0
udev_good=0
udev_total=0
deprecated="
-e sd_bus_try_close
-e sd_bus_process_priority
-e sd_bus_message_get_priority
-e sd_bus_message_set_priority
"
for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | grep -wv $deprecated | sort -u` ; do
for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | grep -wv sd_bus_try_close | sort -u` ; do
if test -f ${MESON_BUILD_ROOT}/man/$symbol.3 ; then
echo "✓ Symbol $symbol() is documented."
good=1

View File

@ -12,6 +12,7 @@ Description=Load/Save Screen Backlight Brightness of %i
Documentation=man:systemd-backlight@.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-remount-fs.service
Before=sysinit.target shutdown.target
[Service]

View File

@ -12,7 +12,7 @@ Description=Process Core Dump
Documentation=man:systemd-coredump(8)
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-journald.socket
After=systemd-remount-fs.service systemd-journald.socket
Requires=systemd-journald.socket
Before=shutdown.target

View File

@ -13,8 +13,8 @@ Documentation=man:systemd-pstore(8)
ConditionDirectoryNotEmpty=/sys/fs/pstore
ConditionVirtualization=!container
DefaultDependencies=no
Conflicts=shutdown.target
Before=sysinit.target shutdown.target
Wants=systemd-remount-fs.service
After=systemd-remount-fs.service
[Service]
Type=oneshot
@ -23,4 +23,4 @@ RemainAfterExit=yes
StateDirectory=systemd/pstore
[Install]
WantedBy=sysinit.target
WantedBy=systemd-remount-fs.service

View File

@ -13,7 +13,7 @@ Documentation=man:systemd-rfkill.service(8)
DefaultDependencies=no
BindsTo=sys-devices-virtual-misc-rfkill.device
Conflicts=shutdown.target
After=sys-devices-virtual-misc-rfkill.device
After=sys-devices-virtual-misc-rfkill.device systemd-remount-fs.service
Before=shutdown.target
[Service]

View File

@ -13,7 +13,7 @@ Documentation=man:systemd-timesyncd.service(8)
ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
DefaultDependencies=no
After=systemd-sysusers.service
After=systemd-remount-fs.service systemd-sysusers.service
Before=time-set.target sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-set.target time-sync.target