Commit Graph

44998 Commits

Author SHA1 Message Date
Lennart Poettering effefa30de update TODO 2020-05-26 23:52:34 +02:00
Lennart Poettering 0e42cbe254 sysv: generate warning for every SysV service lacking a native systemd unit
It's 2020, let's tighten the screws a bit and start warning about
left-over SysV services that still have no native systemd unit file.
2020-05-26 23:52:30 +02:00
Lennart Poettering 470ab28d07 sysv: use structured initialization 2020-05-26 23:52:26 +02:00
Lennart Poettering c8aa4b5b86 core: voidify one function return 2020-05-26 23:52:22 +02:00
Lennart Poettering b0cea477d4 core: some more structured initialization 2020-05-26 23:52:18 +02:00
Lennart Poettering 4c42543429 core: also log about left-over processes during unit stop
Only log at LOG_INFO level, i.e. make this informational. During start
let's leave it at LOG_WARNING though.

Of course, it's ugly leaving processes around like that either in start
or in stop, but at start its more dangerous than on stop, so be tougher
there.
2020-05-26 23:52:13 +02:00
Lennart Poettering 021acbc188 units: remove KillMode=process in our regular gettys
In our regular gettys the actual shell commands live the the session
scope anyway (as long as logind is used). Hence, let's avoid
KillMode=process, it serves no purpose and is simply unsafe since it
disables systemd's own process lifecycle management.
2020-05-26 23:52:09 +02:00
Lennart Poettering 9b52e0d81a man: document that KillMode=none is a bad idea 2020-05-26 23:51:51 +02:00
Lennart Poettering d068765b68 core: warn if KillMode=none is used 2020-05-26 23:50:54 +02:00
Lennart Poettering 7b11770bae gpt: include homed GPT partition type in well-known partition table 2020-05-26 23:38:15 +02:00
Lennart Poettering 48432791ac units: don't set PrivateNetwork= in systemd-homed.service
We want to watch USB sticks being plugged in, and that requires
AF_NETLINK to work correctly and get the host's events. But if we live
in a network namespace AF_NETLINK is disconnected too and we'll not get
the host udev events.

Fixes: #15287
2020-05-26 23:37:44 +02:00
Daan De Meyer 8a7b71bd97
Merge pull request #15910 from poettering/tmpfiles-pstore-tweak
tmpfiles: let's make pstore sysfs failure silent
2020-05-26 21:59:13 +02:00
Lennart Poettering 4b019d2f2d tmpfiles: deal with kernel errno change if quota is not enabled
Old kernels returned EINVAL if quota was off but we tried to manipulate
it anyway. Since
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8a36e408d40606e21cd4e2dd9601004a67b14868
this changed: now ENOTCONN is returned. This of course is a kernel API
compat breakage, but let's not make a fuss and just map EINVAL to
ENOTCONN to make it recognizable the same way everywhere.

Fixes: #15896
2020-05-26 21:36:29 +02:00
Lennart Poettering 548af942b8 Revert "presets: "disable" all passive targets by default"
This reverts commit 61c3e2c8bf.

The original commit doesn't make sense to me, none of the listed units
have an [Install] section, they hence are not subject to enable/disable
and hence not preset either. This commit hence has no effect whatsoever,
let's undo it to avoid further confusion.
2020-05-26 20:51:58 +02:00
Florian Klink 90bdc8be66 resolved-dns-query: remove dns_query_candidate_is_routable
Resolved can't reliably determine on whether "it makes sense" to query
AAAA records when not explicitly specifying it in the request, so we
shouldn't remove them.

After having done the resolving, applications can use RFC6724 to
determine whether that address is reachable.

We can't know whether an address is reachable before having resolved it
and inspecting the routing table, and not resolving AAAA just because
there's no IPv6 default route on the main interface link them breaks
various setups, including IPv6-providing wireguard tunnels on a
non-dualstacked environment.

Fixes #5782
Fixes #5915
Fixes #8017
2020-05-26 19:30:23 +02:00
Daniel Fullmer e6190e2882 sd-boot: fix menu ordering with boot counting
systemd-boot selects the last valid entry by default, not the first.

Fixes: #15256
2020-05-26 19:27:59 +02:00
Lennart Poettering 2d2d75047e update TODO 2020-05-26 19:05:54 +02:00
Lennart Poettering 7257f717c1
Merge pull request #15920 from keszybz/userwork-proc-title
Avoid log noise when setting proc titles and some doc updates
2020-05-26 18:29:06 +02:00
Lennart Poettering cf3317f63a
Merge pull request #15906 from keszybz/busctl-stdout-stderr
Make busctl stdout/stderr split consistent
2020-05-26 15:38:14 +02:00
Lennart Poettering 47eeb381c8
Merge pull request #15909 from keszybz/sd-network-serialization
networkd link serialization fix
2020-05-26 15:37:57 +02:00
Andreas Rammhold 3544f65f0c editorconfig: add man configuration
My VIM usually defaults to tabs (8ch) on these XML files. With this
change it behaves as defined in the coding style documentation.
2020-05-26 15:37:05 +02:00
Norbert Lange 6589a56972 dont install systemd-initctl, runlevel, telinit if no SYSV compat
systemd-initctl executable is still built.
2020-05-26 15:04:36 +02:00
Evgeny Vereshchagin a53a85b35e
Merge pull request #15914 from poettering/ubsan-float-check
json: disable ubsan float checking
2020-05-26 15:11:16 +03:00
Zbigniew Jędrzejewski-Szmek e1a0423266 man: reword description of IPAddressDeny/Allow a bit 2020-05-26 11:13:06 +02:00
Zbigniew Jędrzejewski-Szmek 201632e314 tree-wide: s/time-out/timeout/g
See 3f9a0a522f for justification.
2020-05-26 10:28:59 +02:00
Zbigniew Jędrzejewski-Szmek e14db35072 userwork: fix typos in comment 2020-05-26 10:28:59 +02:00
Zbigniew Jędrzejewski-Szmek c55104ce58 basic/process-util: only try PR_SET_MM once
userwork wants to update the title many times, and a strace is full of
attempts that fail the same way:

[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid()                   = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce32901d, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] accept4(3, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid()                   = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce329020, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid()                   = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce32901d, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] accept4(3, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid()                   = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce329020, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid()                   = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce32901d, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] accept4(3, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid()                   = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce329020, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0

If we get a permission error, don't try again.
2020-05-26 10:28:59 +02:00
Zbigniew Jędrzejewski-Szmek ad4f7f6747 basic/process-util: create helper function
No functional change.
2020-05-26 10:28:59 +02:00
Zbigniew Jędrzejewski-Szmek fdf3c16d75 man: beef up $MAINPID examples
Inspired by https://github.com/systemd/systemd/pull/15400#discussion_r428537955.
2020-05-26 10:28:59 +02:00
Zbigniew Jędrzejewski-Szmek d8bff5cc37 network: simplify how initial space is handled 2020-05-26 10:19:31 +02:00
Zbigniew Jędrzejewski-Szmek d5e172d2fb networkd: unfoobar serialization of links
We'd start writing an entry line, then another one, then another one,
and then output the rest of the first one, and then some other random
stuff, and the rest of some other lines... Results were ...eh... random.

Let's define a helper to avoid some of the copy&paste madness, and separate
blocks that output a single line with /**********************************/.

This rework doesn't change what data is written, it only tries to fix the
format of the output. The fact that some entries only write data from
link->network, and some from either link->network or link, some stuff only
for dhpc4 leases while some for both dhpc4 and dhcp6, etc, looks rather
suspicious too, but I didn't touch this.
2020-05-26 10:08:54 +02:00
Lennart Poettering 253acc229c
Merge pull request #15840 from Werkov/mkosi-opensuse
mkosi: openSUSE updates
2020-05-26 10:02:29 +02:00
Zbigniew Jędrzejewski-Szmek 00813316b0 sd-dhcp6: constify output arguments in get_{ntp,nds}_addr
This matches what we do for ipv4 and is in general better.
2020-05-26 09:47:45 +02:00
Zbigniew Jędrzejewski-Szmek dddc8d1e1e sd-network: reduce scope of some variables 2020-05-26 09:47:45 +02:00
Lennart Poettering ffec8658db
Merge pull request #15862 from hunger/master
repart: Add Uuid option to config files
2020-05-26 09:32:22 +02:00
Lennart Poettering 6ae8c6f5d7 update TODO 2020-05-26 09:21:40 +02:00
Zbigniew Jędrzejewski-Szmek 445bd57e39 busctl: drop unneeded param 2020-05-26 09:13:39 +02:00
Zbigniew Jędrzejewski-Szmek 50f20d1bc2 busctl: verify args early and always print results to stdout
We would print the error sometimes to stdout and sometimes to stderr. It *is*
useful to get the message if one of the names is not found on the bus to
stdout, so that this shows out in the pager. So let's do verification of args
early to catch invalid arguments, and then if we receive an error over the bus
(most likely that the name is not activatable), let's print to stdout so it
gets paged. E.g. 'busctl tree org.freedesktop.systemd1 org.freedesktop.systemd2'
gives a nicely usable output.
2020-05-26 09:07:27 +02:00
Evgeny Vereshchagin e5af586f49 add a test triggering https://github.com/systemd/systemd/issues/15907 2020-05-26 09:01:26 +02:00
Lennart Poettering 8e2fa6e223 json: turn off ubsan for json_variant_has_type()
Fixes: #15907
2020-05-26 09:01:26 +02:00
Lennart Poettering 6028d766d1 macro: introduce DISABLE_WARNING_TYPE_LIMITS and make use of it everywhere 2020-05-25 18:25:09 +02:00
Lennart Poettering 56e577c62f tree-wide: use DISABLE_WARNING_FORMAT_NONLITERAL where appropriate 2020-05-25 18:25:05 +02:00
Lennart Poettering 6a5b28def2 json: use our regular way to turn off compiler warnings 2020-05-25 18:23:50 +02:00
Lennart Poettering 1283366a90
Merge pull request #15167 from ssahani/address-gen-mode
networkctl: Add a range to address genmode
2020-05-25 17:32:00 +02:00
Lennart Poettering a177f05a5c
Merge pull request #15872 from keszybz/networkd-types
Type and parsing fixes for networkd
2020-05-25 17:31:00 +02:00
Lennart Poettering 203c07c95b tmpfiles: don't complain if we can't enable pstore in containers 2020-05-25 16:43:35 +02:00
Lennart Poettering 1baaf8aa04 tmpfiles: downgrade log message when we can't write a file and failure is allowed 2020-05-25 16:43:35 +02:00
Tobias Hunger 7b5cb4ceb4 Repart: Add simple tests for Label="" and UUID=""
Make sure Labels and UUIDs taken from destination definitions are
taken into account when no Label/UUID is currently set already.
2020-05-25 15:48:59 +02:00
Tobias Hunger 129635333d repart: Add UUID option to config files
Add a option to provide a UUID for the partition that will get
created and document that.
2020-05-25 15:48:59 +02:00
Zbigniew Jędrzejewski-Szmek 10b20e5a93 network: allow empty assignment to PreferredLifetime=
Users might want to use that to unset a previous setting. The docs seem OK as
they are: we don't need to explictly mention the empty value, since it is
almost always allowed.
2020-05-25 14:52:04 +02:00