mirror of
https://github.com/systemd/systemd
synced 2026-03-18 19:14:46 +01:00
Compare commits
9 Commits
f7bef77a16
...
e4948b0f0a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4948b0f0a | ||
|
|
e19b0746f1 | ||
|
|
e65357b658 | ||
|
|
21d03e6c63 | ||
|
|
c35949a51c | ||
|
|
a3f5f4a5c0 | ||
|
|
7802194ac0 | ||
|
|
2429808b29 | ||
|
|
0f97b7c338 |
@ -58,8 +58,9 @@
|
||||
|
||||
<para><parameter>callback</parameter> is called with the path and userdata pointer registered
|
||||
with <function>sd_bus_add_node_enumerator()</function>. When called, it should store all the
|
||||
child object paths of the given path prefix in <parameter>ret_nodes</parameter> and return the
|
||||
number of child objects under the given prefix. If an error occurs, it can either return a
|
||||
child object paths of the given path prefix in <parameter>ret_nodes</parameter> with a NULL
|
||||
terminator item. The callback should return a non-negative value on success.
|
||||
If an error occurs, it can either return a
|
||||
negative integer, set <parameter>ret_error</parameter> to a non-empty error or do both. Any
|
||||
errors returned by the callback are encoded as D-Bus errors and sent back to the caller. Errors
|
||||
in <parameter>ret_error</parameter> take priority over negative return values.</para>
|
||||
|
||||
@ -253,7 +253,7 @@
|
||||
<para><function>sd_bus_error_move()</function> is similar to <function>sd_bus_error_copy()</function>,
|
||||
but will move any error information from <parameter>e</parameter> into <parameter>dst</parameter>,
|
||||
resetting the former. This function cannot fail, as no new memory is allocated. Note that if
|
||||
<parameter>e</parameter> is not set, <parameter>dst</parameter> is initializated to
|
||||
<parameter>e</parameter> is not set, <parameter>dst</parameter> is initialized to
|
||||
<constant>SD_BUS_ERROR_NULL</constant>. Moreover, if <parameter>dst</parameter> is
|
||||
<constant>NULL</constant> no operation is executed on it and resources held by <parameter>e</parameter>
|
||||
are freed and reset. Returns a converted <varname>errno</varname>-like, non-positive error value.</para>
|
||||
|
||||
@ -461,8 +461,17 @@
|
||||
<listitem>
|
||||
<para>Takes a boolean. If set to true, sets up the default route bound to the interface.
|
||||
Defaults to false. This is useful when creating routes on point-to-point interfaces.
|
||||
This is equivalent to e.g. the following.
|
||||
<programlisting>ip route add default dev veth99</programlisting></para>
|
||||
This is equivalent to e.g. the following,
|
||||
<programlisting>ip route add default dev veth99</programlisting>
|
||||
or,
|
||||
<programlisting>[Route]
|
||||
Gateway=0.0.0.0</programlisting></para>
|
||||
<para>Currently, there are no way to specify e.g., the table for the route configured by
|
||||
this setting. To configure the default route with such an additional property, please use
|
||||
the following instead:
|
||||
<programlisting>[Route]
|
||||
Gateway=0.0.0.0
|
||||
Table=1234</programlisting></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
||||
@ -188,7 +188,7 @@ int genuine_random_bytes(void *p, size_t n, RandomFlags flags) {
|
||||
* invocations or so. That's because we don't really care about the quality here. We
|
||||
* generally prefer using RDRAND if the caller allows us to, since this way we won't upset
|
||||
* the kernel's random subsystem by accessing it before the pool is initialized (after all it
|
||||
* will kmsg log about every attempt to do so)..*/
|
||||
* will kmsg log about every attempt to do so). */
|
||||
for (;;) {
|
||||
unsigned long u;
|
||||
size_t m;
|
||||
|
||||
@ -1192,7 +1192,7 @@ int sockaddr_un_set_path(struct sockaddr_un *ret, const char *path) {
|
||||
/* Don't allow paths larger than the space in sockaddr_un. Note that we are a tiny bit more restrictive than
|
||||
* the kernel is: we insist on NUL termination (both for abstract namespace and regular file system socket
|
||||
* addresses!), which the kernel doesn't. We do this to reduce chance of incompatibility with other apps that
|
||||
* do not expect non-NUL terminated file system path*/
|
||||
* do not expect non-NUL terminated file system path. */
|
||||
if (l+1 > sizeof(ret->sun_path))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@ -668,7 +668,8 @@ static int service_setup_bus_name(Service *s) {
|
||||
|
||||
assert(s);
|
||||
|
||||
if (s->type != SERVICE_DBUS)
|
||||
/* If s->bus_name is not set, then the unit will be refused by service_verify() later. */
|
||||
if (s->type != SERVICE_DBUS || !s->bus_name)
|
||||
return 0;
|
||||
|
||||
r = unit_add_dependency_by_name(UNIT(s), UNIT_REQUIRES, SPECIAL_DBUS_SOCKET, true, UNIT_DEPENDENCY_FILE);
|
||||
|
||||
@ -242,7 +242,7 @@ void server_space_usage_message(Server *s, JournalStorage *storage) {
|
||||
|
||||
static bool uid_for_system_journal(uid_t uid) {
|
||||
|
||||
/* Returns true if the specified UID shall get its data stored in the system journal*/
|
||||
/* Returns true if the specified UID shall get its data stored in the system journal. */
|
||||
|
||||
return uid_is_system(uid) || uid_is_dynamic(uid) || uid == UID_NOBODY;
|
||||
}
|
||||
|
||||
@ -2854,7 +2854,7 @@ int journal_file_compare_locations(JournalFile *af, JournalFile *bf) {
|
||||
assert(bf->location_type == LOCATION_SEEK);
|
||||
|
||||
/* If contents, timestamps and seqnum match, these entries are
|
||||
* identical*/
|
||||
* identical. */
|
||||
if (sd_id128_equal(af->current_boot_id, bf->current_boot_id) &&
|
||||
af->current_monotonic == bf->current_monotonic &&
|
||||
af->current_realtime == bf->current_realtime &&
|
||||
|
||||
@ -560,7 +560,7 @@ static int umount_with_timeout(MountPoint *m, int umount_log_level) {
|
||||
* rather than blocking indefinitely. If the filesysten is
|
||||
* "busy", this may allow processes to die, thus making the
|
||||
* filesystem less busy so the unmount might succeed (rather
|
||||
* then return EBUSY).*/
|
||||
* than return EBUSY). */
|
||||
r = umount2(m->path, MNT_FORCE);
|
||||
if (r < 0)
|
||||
log_full_errno(umount_log_level, errno, "Failed to unmount %s: %m", m->path);
|
||||
|
||||
@ -36,7 +36,7 @@ static void test_make_salt(void) {
|
||||
static int test_hash_password(void) {
|
||||
log_info("/* %s */", __func__);
|
||||
|
||||
/* As a warmup exercise, check if we can hash passwords. */
|
||||
/* As a warm-up exercise, check if we can hash passwords. */
|
||||
|
||||
bool have_sane_hash = false;
|
||||
const char *hash;
|
||||
|
||||
@ -65,6 +65,10 @@ test -f /run/dbus1
|
||||
systemd-run --unit=dbus2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=dbus -p BusName=systemd.test.ExecStopPost -p ExecStopPost='/bin/touch /run/dbus2' true
|
||||
test -f /run/dbus2
|
||||
|
||||
# https://github.com/systemd/systemd/issues/19920
|
||||
systemd-run --unit=dbus3.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=dbus -p ExecStopPost='/bin/touch /run/dbus3' true \
|
||||
&& { echo 'unexpected success'; exit 1; }
|
||||
|
||||
cat >/tmp/notify1.sh <<EOF
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Dispatch Password Requests to Console Directory Watch
|
||||
Documentation=man:systemd-ask-password-console.service(8)
|
||||
Documentation=man:systemd-ask-password-console.path(8)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target emergency.service
|
||||
After=plymouth-start.service
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Forward Password Requests to Wall Directory Watch
|
||||
Documentation=man:systemd-ask-password-console.service(8)
|
||||
Documentation=man:systemd-ask-password-wall.path(8)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target emergency.service
|
||||
Before=paths.target shutdown.target cryptsetup.target
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Forward Password Requests to Wall
|
||||
Documentation=man:systemd-ask-password-console.service(8)
|
||||
Documentation=man:systemd-ask-password-wall.service(8)
|
||||
After=systemd-user-sessions.service
|
||||
|
||||
[Service]
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Hibernate
|
||||
Documentation=man:systemd-suspend.service(8)
|
||||
Documentation=man:systemd-hibernate.service(8)
|
||||
DefaultDependencies=no
|
||||
Requires=sleep.target
|
||||
After=sleep.target
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Hybrid Suspend+Hibernate
|
||||
Documentation=man:systemd-suspend.service(8)
|
||||
Documentation=man:systemd-hybrid-sleep.service(8)
|
||||
DefaultDependencies=no
|
||||
Requires=sleep.target
|
||||
After=sleep.target
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=initctl Compatibility Named Pipe
|
||||
Documentation=man:systemd-initctl.service(8)
|
||||
Documentation=man:systemd-initctl.socket(8)
|
||||
DefaultDependencies=no
|
||||
Before=sockets.target
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Reboot via kexec
|
||||
Documentation=man:systemd-halt.service(8)
|
||||
Documentation=man:systemd-kexec.service(8)
|
||||
DefaultDependencies=no
|
||||
Requires=shutdown.target umount.target final.target
|
||||
After=shutdown.target umount.target final.target
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Power-Off
|
||||
Documentation=man:systemd-halt.service(8)
|
||||
Documentation=man:systemd-poweroff.service(8)
|
||||
DefaultDependencies=no
|
||||
Requires=shutdown.target umount.target final.target
|
||||
After=shutdown.target umount.target final.target
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Reboot
|
||||
Documentation=man:systemd-halt.service(8)
|
||||
Documentation=man:systemd-reboot.service(8)
|
||||
DefaultDependencies=no
|
||||
Requires=shutdown.target umount.target final.target
|
||||
After=shutdown.target umount.target final.target
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Suspend; Hibernate if not used for a period of time
|
||||
Documentation=man:systemd-suspend.service(8)
|
||||
Documentation=man:systemd-suspend-then-hibernate.service(8)
|
||||
DefaultDependencies=no
|
||||
Requires=sleep.target
|
||||
After=sleep.target
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=udev Control Socket
|
||||
Documentation=man:systemd-udevd.service(8) man:udev(7)
|
||||
Documentation=man:systemd-udevd-control.socket(8) man:udev(7)
|
||||
DefaultDependencies=no
|
||||
Before=sockets.target
|
||||
ConditionPathIsReadWrite=/sys
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=udev Kernel Socket
|
||||
Documentation=man:systemd-udevd.service(8) man:udev(7)
|
||||
Documentation=man:systemd-udevd-kernel.socket(8) man:udev(7)
|
||||
DefaultDependencies=no
|
||||
Before=sockets.target
|
||||
ConditionPathIsReadWrite=/sys
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Update UTMP about System Runlevel Changes
|
||||
Documentation=man:systemd-update-utmp.service(8) man:utmp(5)
|
||||
Documentation=man:systemd-update-utmp-runlevel.service(8) man:utmp(5)
|
||||
DefaultDependencies=no
|
||||
RequiresMountsFor=/var/log/wtmp
|
||||
Conflicts=shutdown.target
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user