Commit graph

44185 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 2cb9a8b963 test-resolve: add a bunch more packets for testing
Let's append the date to the domain in the file name, to be able
to have multiple versions for the same domain.

There is no particular rhyme or reason to the domains being used:
I just pulled a few domains that happened to be present in issues reported
on github, even though the issues were not about pretty printing.
2020-04-17 18:29:15 +02:00
Zbigniew Jędrzejewski-Szmek a8cff0034c
Merge pull request #15347 from hakman/journald-upload-public-cloud
Support journal-upload HTTPS without key and certificate
2020-04-17 11:26:34 +02:00
Zbigniew Jędrzejewski-Szmek c3b22a92a9
Merge pull request #15452 from keszybz/fix-ipproto-assert
Fix static assertion failure with recent glibc
2020-04-17 11:25:40 +02:00
Lennart Poettering ce416f425c resolved: tone down comment in /run/systemd/{stub-,}resolve.conf
There are legitimate reasons to access the file directly, as currently
discussed on fedora-devel. Hence tone things down from "must" to "should
typically not".

Also, let's use fputs() instead of fputs_unlocked() here,
fopen_temporary_label() turns off stdio locking anyway for the whole
FILE*, hence no need to do this manually each time.
2020-04-16 19:43:00 +02:00
Lennart Poettering b11b278097
Merge pull request #15448 from keszybz/logind-avoid-polkit-query
logind: avoid polkit query for SetWallMessage()
2020-04-16 19:42:42 +02:00
Zbigniew Jędrzejewski-Szmek fac2166359 network: use "FooOverUDP" as one word
The whole thing is one name, and I think it's confusing to break it
up into separate words.
2020-04-16 17:23:41 +02:00
Zbigniew Jędrzejewski-Szmek 3d58d7328a network: fix static assertion on IPPROTO_MAX range
Builds with recent glibc would fail with:
../src/network/netdev/fou-tunnel.c: In function ‘config_parse_ip_protocol’:
../src/basic/macro.h:380:9: error: static assertion failed: "IPPROTO_MAX-1 <= UINT8_MAX"
  380 |         static_assert(expr, #expr)
      |         ^~~~~~~~~~~~~
../src/network/netdev/fou-tunnel.c:161:9: note: in expansion of macro ‘assert_cc’
  161 |         assert_cc(IPPROTO_MAX-1 <= UINT8_MAX);
      |         ^~~~~~~~~

This is because f9ac84f92f151e07586c55e14ed628d493a5929d (present in
glibc-2.31.9000-9.fc33.x86_64) added IPPROTO_MPTCP=262, following
v5.5-rc5-1002-gfaf391c382 in the kernel.
2020-04-16 17:21:49 +02:00
Lennart Poettering e46736fbb6 units: use correct path to refer to plymouth
This doesn't really matter, since in non-/usr-merged systems plymouth
needs to be in /bin and on merged ones it doesn't matter, but it is
still prettier to insert the right path, and avoid /bin on merged
systems, since it's just a compat symlink.

Replaces: #15351
2020-04-16 16:33:01 +02:00
Alin Popa c5f8a179a2 watchdog: reduce watchdog pings in timeout interval
The watchdog ping is performed for every iteration of manager event
loop. This results in a lot of ioctls on watchdog device driver
especially during boot or if services are aggressively using sd_notify.
Depending on the watchdog device driver this may have performance
impact on embedded systems.
The patch skips sending the watchdog to device driver if the ping is
requested before half of the watchdog timeout.
2020-04-16 16:32:05 +02:00
Lennart Poettering 0f6d7be844
Merge pull request #15437 from keszybz/man-nss-resolve
Move "files" and "dns" later in the recommended hosts: lines
2020-04-16 16:11:24 +02:00
Lennart Poettering 9ba4029f8f
Merge pull request #15441 from sartura/src/analyze
systemd-analyze: Add new meson configure option for controlling systemd-analyze support
2020-04-16 14:11:44 +02:00
Zbigniew Jędrzejewski-Szmek 5644d47b7c logind: skip polkit query with --no-wall
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1800875.
2020-04-16 14:07:39 +02:00
Zbigniew Jędrzejewski-Szmek 8183ebcd45 loginctl: adjust indentation 2020-04-16 13:18:03 +02:00
Ciprian Hacman 3dadb54f5f Support journal-upload HTTPS without key and certificate 2020-04-16 14:05:41 +03:00
Zbigniew Jędrzejewski-Szmek f2a20e9966 man: move "myhostname" right after "resolve"
The text in the man page provides the justification why I think this is
generally the right thing. An additional reason is that with the previous
commit (to move resolved earlier), since resolved internally implements the
same rules that nss-myhostname does, we'd have this strange inversion where
the priority of external configuration would be different in the "resolve"
path and in the fallback path.
2020-04-16 12:13:42 +02:00
Zbigniew Jędrzejewski-Szmek 44b7aedbde man: move "files" after "resolve" in the suggested configuration
resolved caches files, so we should move nss-files after nss-resolve
to speed up local access (and yes, people like to have thousands of
lines in /etc/hosts).

See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/LCX6YXLM62QEYJSOLJBWXXVXTZVL73GI/
for the background.
2020-04-16 12:13:39 +02:00
Jakov Smolic f30bf4d937
Include new configure options in features list
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2020-04-16 10:40:31 +02:00
Susant Sahani ac24e418d9 network: Allow DHCPv6 client to be started even if no O or M bit in RA. 2020-04-16 09:32:19 +02:00
Chris Down 9b4f3fa3ea virt: Use cache for VIRTUALIZATION_PROOT
Of course, the very moment after I merged #15426, I noticed something
was off: everything works, but the cache isn't updated. 🙈
2020-04-16 08:55:32 +02:00
Arthur Moraes do Lago 67551eac30 Add Logitech G502 HERO to mouse hwdb 2020-04-16 08:27:05 +02:00
Jan Janssen 904ebcb200 sd-boot: Add → as alternative to boot selected entry
This is sometimes slightly more convenient to use
and is also what GRUB supports.
2020-04-15 21:29:41 +01:00
Chris Down 80cc3e3eab virt: Detect proot virtualisation by ptrace metadata
proot provides userspace-powered emulation of chroot and mount --bind,
lending it to be used on environments without unprivileged user
namespaces, or in otherwise restricted environments like Android.

In order to achieve this, proot makes use of the kernel's ptrace()
facility, which we can use in order to detect its presence. Since it
doesn't use any kind of namespacing, including PID namespacing, we don't
need to do any tricks when trying to get the tracer's metadata.

For our purposes, proot is listed as a "container", since we mostly use
this also as the bucket for non-container-but-container-like
technologies like WSL. As such, it seems like a good fit for this
section as well.
2020-04-15 18:36:35 +01:00
Lennart Poettering 6ab2e1178e
Merge pull request #15431 from poettering/lock-and-key-emoji
display lock/key emoji when prompting for passwords
2020-04-15 17:55:21 +02:00
Jakov Smolic dd0f79523f
Add new meson configure option for controlling systemd-analyze support
Enables building systemd without systemd-analyze, which in
return saves approx. 4 MB of space upon installing systemd.

Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2020-04-15 17:53:43 +02:00
Lennart Poettering f4ff71b360 man: update os-release(5) to use 24bit ANSI color in example
Given that ANSI_COLOR= is mostly about branding it probably makes sense
to use RGB rather than paletted colors for them, so that the colors
match the project design as close as possible. Hence, provide a 25bit
RGB example for ANSI_COLOR, and update the overall example to something
newer.

Also see: https://bugzilla.redhat.com/show_bug.cgi?id=1823099
2020-04-15 16:30:57 +02:00
Zbigniew Jędrzejewski-Szmek 3614df0575 meson,resolved: make default LLMNR= and MulticastDNS= values configurable
For https://fedoraproject.org/wiki/Changes/systemd-resolved.
2020-04-15 14:37:21 +02:00
Lennart Poettering e3ac53a27d ask-password-api: reword some debug messages
Otherwise, seeing this in the log output is confusing since we don't
know what kind of timeout or what kind if key we are adjusting here.
2020-04-15 12:04:35 +02:00
Lennart Poettering 52d199e318 ask-password: prefix password questions with lock and key emoji
It's pretty, and it highlights that the pw prompt is kinda special and
needs user input.

We suppress the emoji entirel if there's no emoji support (i.e. this
means we suppress the ASCII replacement), since it carries no additional
information, it is just decoration to highlight a line.
2020-04-15 12:04:23 +02:00
Lennart Poettering 539ee0989e locale-util: export emoji_enable() for other code to use 2020-04-15 12:04:08 +02:00
Lennart Poettering 48d70b4ac9 locale-util: add support for lock+key emoji
It looks pretty nice on gnome-terminal at least, let's make use of it
when asking for passwords.
2020-04-15 12:03:31 +02:00
Giedrius Statkevičius c90c597ee3 verify: ignore nonexistent executables if required
We provide a way via the '-' symbol to ignore errors when nonexistent
executable files are passed to Exec* parameters & so on. In such a case,
the flag `EXEC_COMMAND_IGNORE_FAILURE` is set and we go on happily with
our life if that happens. However, `systemd-analyze verify` complained
about missing executables even in such a case. In such a case it is not
an error for this to happen so check if the flag is set before checking
if the file is accessible and executable.

Add some small tests to check this condition.

Closes #15218.
2020-04-14 21:23:31 +02:00
Jakov Smolic 5fa5c3e2d0 Add meson build option to prevent building kernel-install
This commit introduces new meson build option "kernel-install" to prevent kernel-install from building if the user
sets the added option as "false".
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2020-04-14 20:22:32 +02:00
Zbigniew Jędrzejewski-Szmek 3cfb7cc507
Merge pull request #15417 from poettering/fileno-can-fail
fileio: fileno() can realistically return -1
2020-04-14 12:54:27 +02:00
Anita Zhang a3af963958
Merge pull request #15414 from mrc0mmand/coredumpctl-file
coredumpctl: support --file=PATH
2020-04-13 13:54:24 -07:00
Joel Shapiro 332f38d084 Fix pam_systemd_home's debug parameter to match man page description 2020-04-13 17:41:27 +02:00
Susant Sahani 76643fedc8 sd-network: DHCPv6 - Add status codes
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-5
2020-04-13 17:40:00 +02:00
Lennart Poettering daf8f72b4e core: make sure ProtectHostname= is handled gracefully in containers lacking seccomp
Fixes: #15408
2020-04-13 17:32:27 +02:00
Frantisek Sumsal aeb5645082 coredumpctl: support --file=PATH
Let's match journalctl's functionality by throwing --file for
coredumpctl into the mix, so we can work on a single journal file
as well.
2020-04-13 17:10:27 +02:00
Lennart Poettering 6663cfd574 update TODO 2020-04-13 14:31:46 +02:00
Lennart Poettering 648ba0ee81 hwdb: optimize isatty()-per-line away
Fixes: #15407
2020-04-13 11:27:35 +02:00
Lennart Poettering 451fcbfc58 fileio: extend comment a bit 2020-04-13 11:27:31 +02:00
Lennart Poettering 609ae0f596 fileio: optionally allow telling read_line_full() whether we are processing a tty or not 2020-04-13 11:27:07 +02:00
Lennart Poettering 14f594b995 fileio: fileno() can realistically return -1
An stdio FILE* stream usually refers to something with a file
descriptor, but that's just "usually". It doesn't have to, when taking
fmemopen() and similar into account. Most of our calls to fileno()
assumed the call couldn't fail. In most cases this was correct, but in
some cases where we didn't know whether we work on files or memory we'd
use the returned fd as if it was unconditionally valid while it wasn't,
and passed it to a multitude of kernel syscalls. Let's fix that, and do
something reasonably smart when encountering this case.

(Running test-fileio with this patch applied will remove tons of ioctl()
calls on -1).
2020-04-13 11:26:49 +02:00
Lennart Poettering 9d5dac4dce
Merge pull request #15411 from ssahani/systemd-issue-15375
sd-network: DHCPv6 - Add NoPrefixAvail to error code
2020-04-13 10:58:38 +02:00
Lennart Poettering d9235719f2
Merge pull request #15397 from ssahani/vxlan
network: VXlan group and remote fixes
2020-04-13 10:47:40 +02:00
Zbigniew Jędrzejewski-Szmek 38cd55b007 Remove unneded {}s
$ perl -i -0pe 's|\s+{\n([^\n]*;)\n\s+}\n|\n\1\n|gms' **/*.c

Inspired by ea7cbf5bdd.
2020-04-13 09:31:49 +02:00
Susant Sahani 667ceb9d9d sd-network: DHCP6 - Use readable error status rather than numeric
value in the log message
2020-04-13 06:06:14 +02:00
Zbigniew Jędrzejewski-Szmek 8cf85bb575
Merge pull request #15281 from keszybz/functional-test-rework
Post-merge tweaks to the functional tests
2020-04-12 19:31:53 +02:00
Zbigniew Jędrzejewski-Szmek 92cad3f82d
Merge pull request #15406 from DaanDeMeyer/sd-bus-set-exec-docs
Add sd_bus_set_exec docs
2020-04-12 18:38:49 +02:00
Daan De Meyer 3415b0cc8a sd-bus: Add sd_bus_set_exec docs 2020-04-12 17:24:01 +02:00