Commit Graph

46238 Commits

Author SHA1 Message Date
Alyssa Ross 556a7bbed6
load-fragment: fix grammar in error messages 2020-08-18 20:56:59 +00:00
Nicolas Fella 07b4f44968 Fix function description in logind man page
Fix a presumed copy&paste error. SetLockedHint corresponds to the "locked hint", not the "idle hint".
2020-08-18 22:44:45 +02:00
Yu Watanabe 46b875fb80 network: do not fail if UseMTU=yes on DHCP lease lost
This fixes a bug introduced by 6906794dd1.

Fixes #16768.
2020-08-18 20:33:58 +02:00
Zbigniew Jędrzejewski-Szmek f9536e6793
Merge pull request #16687 from DaanDeMeyer/bootloader-machine-id
Allow bootctl and kernel-install to be called without /etc/machine-id present
2020-08-18 15:05:26 +02:00
Lennart Poettering 64dc138d1e homework: downgrade chattr failure log message
NOCOW is a btrfs-only thing hence don't log louder than necessary if we
don't have it.
2020-08-18 12:41:31 +02:00
Lennart Poettering df14bda2b5 homework: explicitly close cryptsetup context, to not keep loopback device busy
The cryptsetup context pins the loop device even after deactivation.
Let's explicitly release the context to make sure the subsequent
loopback device detaching works cleanly.
2020-08-18 12:41:26 +02:00
Lennart Poettering 6d7b47eb3e homework: correct error passed into log message 2020-08-18 12:41:22 +02:00
Lennart Poettering a2a8a509cd homework: sync everything to disk before we rename LUKS loopback file into place
This how this works on Linux: when atomically creating a file we need to
fully populate it under a temporary name and then when we are fully
done, sync it and the directory it is contained in, before renaming it
to the final name.
2020-08-18 12:41:18 +02:00
Lennart Poettering 5e5e11b874 homed: downgrade quota message in containers
quota syscalls and operations are typically prohibited in containers.
Let's not make noise about that, needlessly.
2020-08-18 12:40:57 +02:00
Franck Bui 21fd6bc263 log: don't explicitly re-open log for failed assertions
This was needed before commit 16e4fd87c5 added a
mode that opens the log fds for every single log message. This mode is used in
execute.c since then making the explicit call to log_open unnecessary.

This basically reverts ea89a119cd.
2020-08-18 10:31:25 +02:00
Dimitri John Ledkov 1c7466aa2e resolve: lift limits on search domains count or length
glibc 2.26 lifted restrictions on search domains count or length to
unlimited. This has also been backported to 2.17 in some distributions (RHEL 7
and derivatives). Other softwares may have their own limits for search domains,
but we should not restrict what is written out any more.

https://sourceware.org/legacy-ml/libc-announce/2017/msg00001.html
2020-08-18 10:06:25 +02:00
Zbigniew Jędrzejewski-Szmek 170a8c365b
Merge pull request #16761 from keszybz/missing-syscall-cleanup
Missing syscall cleanup
2020-08-18 10:01:19 +02:00
Zbigniew Jędrzejewski-Szmek faeae444ea missing_syscall: do not use function name that may conflict with glibc
This was done for all replacements back in 5187dd2c40,
but some newer stuff didn't do this.
2020-08-17 19:56:55 +02:00
Zbigniew Jędrzejewski-Szmek 23654cee13 missing_syscall: fix pidfd_{send_signal,open} numbers for alpha
Also order the syscalls by syscall number for easier comparisons with the
kernel headers.

Fixup for 5f152f43d0.
2020-08-17 19:56:55 +02:00
Zbigniew Jędrzejewski-Szmek 0e68241138 missing_syscall: add forgotten check for __NR_get_mempolicy nonnegativity
We do it in other cases, we should here too.

Fixup for b070c7c0e1.
2020-08-17 19:56:25 +02:00
Zbigniew Jędrzejewski-Szmek 3a193ac62e shared/cgroup-setup: reduce scope of variables 2020-08-17 19:48:32 +02:00
Zbigniew Jędrzejewski-Szmek 618727dae5 basic/utf8: rename parameter
Every time I was using this function I had to check whether "newline"
means that newlines are good or bad.
2020-08-17 19:48:32 +02:00
Zbigniew Jędrzejewski-Szmek 9a485918db basic/string-util: reduce scope of variables 2020-08-17 19:48:32 +02:00
Zbigniew Jędrzejewski-Szmek b91ae210e6 journal: adjust line about when the journal begins and ends
This comes up occasionally with new users. The phrase "Logs begin ..." is
ambiguous because it can be taken to mean the logs being displayed or all logs
(the intended meaning). Let's rephrase this as "Journal begins ..." to make
this clearer.
2020-08-17 19:48:32 +02:00
Zbigniew Jędrzejewski-Szmek a9134af2e3 analyze-security: include an actual syscall name in the message
This information was already available in the debug output, but I think it
is good to include it in the message in the table. This makes it easier to wrap
one's head around the allowlist/denylist filtering.
2020-08-17 19:48:32 +02:00
Lennart Poettering 5b5ce6298e test: accept that char device 0/0 can now be created witout privileges
Fixes: #16721
2020-08-17 19:28:32 +02:00
Grant Mathews 340e1933c4 hwdb: ACCEL_MOUNT_MATRIX quirk for Acer SP111-32* 2020-08-17 18:57:53 +02:00
Lennart Poettering ceffbc584d socket-netlink: make address argument const 2020-08-17 18:56:42 +02:00
Lennart Poettering d296c20f1f man: move 'files' module in NSS 'hosts:' line before myhostname
I am pretty sure /etc/hosts (i.e. an explicitly configured, local,
trusted database) should be useful for overriding the automatic
myhostname logic.

resolved's internal logic handles it that way and hence we should
suggest it in the NSS fallback line, too.

Let's also bring the factory file back into sync with what the docs say.

And update the prose a bit too, to actually match what we recommend.
2020-08-17 18:55:59 +02:00
Haochen Tong f331733645 tools/make-man-index: fix purpose text that contains tags 2020-08-17 18:32:51 +02:00
Topi Miettinen 209650b720 test-fs-util: skip encrypted path test if we get EACCES
Unprivileged test-fs-util fails on my system since /sys/dev/block is
inaccessible for unprivileged users, so let's skip encrypted path test if we
get EACCES or similar.
2020-08-17 18:30:24 +02:00
Lennart Poettering bfeb370abc README: fix indentation
All paragraphs are indented to 8 spaces, but one. Fix that.
2020-08-17 16:46:59 +09:00
Lennart Poettering bb970e5774 update TODO 2020-08-17 09:12:02 +02:00
Michael Scherer bcf08acbff Newer Glibc use faccessat2 to implement faccessat
cf https://repo.or.cz/glibc.git/commit/3d3ab573a5f3071992cbc4f57d50d1d29d55bde2

This cause breakage on Fedora Rawhide: https://bugzilla.redhat.com/show_bug.cgi?id=1869030
2020-08-16 15:10:13 +02:00
Lennart Poettering 61c8b73a35
Merge pull request #16705 from bluca/verity_udev_wait
Verity: use udev to wait for symlink creation on concurrent activations
2020-08-14 20:14:57 +02:00
Luca Boccassi ce5eef6530 shared/udev-util: fix sd_device leak in device_wait_for_initialization
If the caller doesn't pass a return pointer, or if sd_event_loop fails
after the device was found and referenced, it never gets dereferenced.
2020-08-14 15:26:04 +01:00
Luca Boccassi efc3b12fdb tree-wide: enable/disable libcrypsetup debug output depending on our level
Avoid always setting to debug, as it will incur in many more callbacks from
libcrypsetup that then get discarded, wasting resources.
2020-08-14 15:26:04 +01:00
Luca Boccassi ecab4c470c dissect: yield for 2ms when a verity device cannot be opened before retrying
If we don't succeed on the first try it's because another process is
opening the same device. Do a microsleep for 2ms to increase the
chances it has completed the next time around the loop.
2020-08-14 15:26:04 +01:00
Luca Boccassi 9ecb5c10fd dissect: account for EBUSY when verity device already exists
In some cases, libdevmapper/libcrypsetup might return EBUSY instead of
EEXIST when opening a shared device. Treat it in the same way.
2020-08-14 15:26:04 +01:00
Luca Boccassi c419b6f0cf dissect: wait for udev event if verity device not yet available
The symlink /dev/mapper/dm_name is created by udev after a mapper
device is set up. So libdevmapper/libcrypsetup might tell us that
a verity device exists, but the symlink we use as the source for
the mount operation might not be there yet.
Instead of falling back to a new unique device set up, wait for
the udev event matching on the expected devlink for at least 100ms
(after which the benefits of sharing a device in terms of setup
time start to disappear - on my production machines, opening a new
verity device seems to take between 150ms and 300ms)
2020-08-14 15:26:04 +01:00
Luca Boccassi 030a0d79ff udev-util: add device_wait_for_devlink
Allows to wait for an event by matching on the devlink that gets
created.
2020-08-14 15:26:04 +01:00
Lennart Poettering 3f181262f4 namespace: fix minor memory leak 2020-08-14 15:33:04 +02:00
Lennart Poettering 830171936c
Merge pull request #16612 from poettering/dissect-copy
teach systemd-dissect file copying, and make it officially supported, move to /usr/bin + man page
2020-08-13 11:26:49 +02:00
Lennart Poettering 1af83e7c37 update TODO 2020-08-12 22:39:43 +02:00
Lennart Poettering 35afe47abe test: update tests to use new JSON output instead of human readable output 2020-08-12 22:39:43 +02:00
Lennart Poettering de8231b007 dissect: add support for outputting JSON 2020-08-12 22:39:43 +02:00
Lennart Poettering 0b9481cf2e json: add helpers for dealing with id128 + strv 2020-08-12 22:39:43 +02:00
Lennart Poettering 61f403a14f man: document systemd-dissect 2020-08-11 22:29:50 +02:00
Lennart Poettering 5a151082d7 meson: move systemd-dissect to /usr/bin 2020-08-11 22:29:50 +02:00
Lennart Poettering af8219d562 dissect: show proper error strings for more errors
Also, make inability to decrypt and EBUSY a non-fatal issue, since we
still are able to display the mount table then.
2020-08-11 22:29:50 +02:00
Lennart Poettering af187ab237 dissect: introduce new helper dissected_image_mount_and_warn() and use it everywhere 2020-08-11 22:26:48 +02:00
Lennart Poettering fa45d12c1c dissect: use recognizable error if we are supposed to mount an encrypted fs
Also, document EBUSY
2020-08-11 22:26:48 +02:00
Lennart Poettering 37e44c3f95 dissect: immediately close pipes when we determined we have no data for them
This effectively makes little difference because we exit soon later
anyway, which will close the fds, too. However, it's still useful since
it means the parent will get EOF events on them in the order we process
things and isn't delayed to process the data from the pipes until the
child dies.
2020-08-11 22:26:48 +02:00
Lennart Poettering f5ea63a5e1 dissect: properly propagate some relevant dissection errors
Let's send some specific error codes from helper process to parent via
the return value, and convert them back there.
2020-08-11 22:26:48 +02:00
Lennart Poettering 89d00f2e3f dissect: beef up dissection output
Let's use a proper table for outputting partition information. Let's
also put the general information about the image first, and the table
after that.

Moreover, dissect the image before showing any output, so that we can
early on return an error if the image is not valid.
2020-08-11 22:26:48 +02:00