Commit Graph

46181 Commits

Author SHA1 Message Date
Lennart Poettering 8609bb80dd update TODO 2020-08-19 10:08:33 +02:00
Lennart Poettering 5f10408044 mountpoint-util: use new kernel 5.8 statx() API for determining mount points
We finally have an explicit API for this in the kernel. It's great and
simple. Let's use it!
2020-08-19 10:08:29 +02:00
Lennart Poettering 69b3fa14cd mountpoint-util: use new kernel 5.8 statx() API for determining mnt_id
The kernel finally has a proper API to determine the mnt_id of a file.
Let's use it.

This adds support for the STATX_MNT_ID field of statx(), added in
kernel 5.8.
2020-08-19 10:08:24 +02:00
Lennart Poettering ffaf45e4f3 mountpoint-util: minor modernizations 2020-08-19 10:07:49 +02:00
Anita Zhang 9c23ce7363
Merge pull request #16780 from alyssais/grammar
load-fragment: fix grammar in error messages
2020-08-18 22:41:34 -07:00
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
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
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
Lennart Poettering e3659eb236 dissect: load verity metadata earlier
That way we can turn off kernel partition scanning if verity data is
available (as we don't support verity for full GPT images, only for
simple file system images).
2020-08-11 22:26:48 +02:00
Lennart Poettering 16b7459280 dissect: show more information in output
Let's show size and image filename.
2020-08-11 22:26:48 +02:00
Lennart Poettering 33973b841d dissect: add support for copying files in/out of image 2020-08-11 22:26:48 +02:00
Lennart Poettering bacf21e9e9 copy: add copy_access() helper for copying access mode 2020-08-11 22:26:48 +02:00
Lennart Poettering 5c05f06264 dissect: optionally mkdir directory to overmount 2020-08-11 22:26:48 +02:00