]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoudev: apply access mode/ownership to device nodes with O_PATH 17190/head
Lennart Poettering [Mon, 14 Sep 2020 19:58:40 +0000 (21:58 +0200)] 
udev: apply access mode/ownership to device nodes with O_PATH

Let's open the device node to modify with O_PATH, and then adjust it
only after verifying everything is in order. This fixes a race where the
a device appears, disappears and quickly reappers, while we are still
running the rules for the first appearance: when going by path we'd
possibly adjust half of the old and half of the new node. By O_PATH we
can pin the node while we operate on it, thus removing the race.

Previously, we'd do a superficial racey check if the device node changed
undearneath us, and would propagate EEXIST in that case, failing the
rule set. With this change we'll instead gracefully handle this, exactly
like in the pre-existing case when the device node disappeared in the
meantime.

3 years agofs-util: add new futimens_opath() helper
Lennart Poettering [Fri, 25 Sep 2020 14:40:02 +0000 (16:40 +0200)] 
fs-util: add new futimens_opath() helper

futimens() that works for O_PATH fds.

3 years agoselinux: add apis to set labels/fix labels per fd instead of path
Lennart Poettering [Mon, 14 Sep 2020 19:54:20 +0000 (21:54 +0200)] 
selinux: add apis to set labels/fix labels per fd instead of path

3 years agoudev-util: simplify device_is_renaming() error handling
Lennart Poettering [Fri, 25 Sep 2020 14:48:07 +0000 (16:48 +0200)] 
udev-util: simplify device_is_renaming() error handling

3 years agoupdate TODO
Lennart Poettering [Mon, 28 Sep 2020 14:29:20 +0000 (16:29 +0200)] 
update TODO

3 years agoPrevent triple reporting of rfkill button on HP Elite x2 1013 G3, plus five other...
RussianNeuroMancer [Sun, 27 Sep 2020 01:25:27 +0000 (09:25 +0800)] 
Prevent triple reporting of rfkill button on HP Elite x2 1013 G3, plus five other hotkeys

1. rfkill hotkey is reported from three source: keyboard, Intel HID and HP Wireless hotkeys. Let's block first two.
2. Correct mapping for calendar, micmute, display and brightness hotkeys.

3 years agocore: move reset_arguments() to the end of main's finish
Anita Zhang [Thu, 17 Sep 2020 08:49:17 +0000 (01:49 -0700)] 
core: move reset_arguments() to the end of main's finish

Fixes #16991

fb39af4ce42d7ef9af63009f271f404038703704 replaced `free_arguments()` with
`reset_arguments()`, which frees arg_* variables as before, but also resets all
of them to the default values. `reset_arguments()` was positioned
in such a way that it overrode some arg_* values still in use at shutdown.

To avoid further unintentional resets, I moved `reset_arguments()`
right before the return, when nothing else will be using the arg_* variables.

3 years agoAdd accel mount matrix for Irbis NB111 transformer
RussianNeuroMancer [Fri, 25 Sep 2020 18:03:50 +0000 (02:03 +0800)] 
Add accel mount matrix for Irbis NB111 transformer

3 years agocore: ensure that namespace tmp directories always get the correct label
bauen1 [Fri, 25 Sep 2020 16:45:29 +0000 (18:45 +0200)] 
core: ensure that namespace tmp directories always get the correct label

If a namespace with PrivateTmp=true is constructed we need to restore
the context of the namespaces /tmp directory (i.e.
/tmp/systemd-private-XXXXX/tmp) to the (default) context of /tmp .
Otherwise filetransitions might result in the namespaces tmp directory
having the wrong context.

3 years agoRemoving unused n_fields in journal-gatewayd
Samuel BF [Sun, 27 Sep 2020 20:01:44 +0000 (22:01 +0200)] 
Removing unused n_fields in journal-gatewayd

3 years agolibcrypt-util: use build-time check for crypt_preferred_method
Luca Boccassi [Fri, 25 Sep 2020 10:19:56 +0000 (11:19 +0100)] 
libcrypt-util: use build-time check for crypt_preferred_method

After https://github.com/systemd/systemd/pull/16981 only the presence of crypt_gensalt_ra
is checked, but there are cases where that function is available but crypt_preferred_method
is not, and they are used in the same ifdef.
Add a check for the latter as well.

3 years agoTranslated using Weblate (Turkish)
Oğuz Ersen [Sat, 26 Sep 2020 06:29:30 +0000 (08:29 +0200)] 
Translated using Weblate (Turkish)

Currently translated at 100.0% (133 of 133 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/master

3 years agorepart: use proper API to check if block device can do partition scanning
Lennart Poettering [Fri, 25 Sep 2020 15:23:34 +0000 (17:23 +0200)] 
repart: use proper API to check if block device can do partition scanning

We have the API wrapper already, hence use it, instead of using a
limited version of it that only works for loopback devices.

3 years agoAdd Chinese translation
huangyong [Fri, 25 Sep 2020 09:49:36 +0000 (17:49 +0800)] 
Add Chinese translation

3 years agomount-util: show mount source in mount_verbose_full() debug output
Lennart Poettering [Thu, 24 Sep 2020 13:07:52 +0000 (15:07 +0200)] 
mount-util: show mount source in mount_verbose_full() debug output

3 years agoMerge pull request #17166 from poettering/loop-mini-fixes
Lennart Poettering [Fri, 25 Sep 2020 15:55:18 +0000 (17:55 +0200)] 
Merge pull request #17166 from poettering/loop-mini-fixes

two minor fixes to the loop block device handling

3 years agoloop-util: apparently opening a loop device sometimes results in ENXIO, handle this 17166/head
Lennart Poettering [Thu, 24 Sep 2020 13:08:22 +0000 (15:08 +0200)] 
loop-util: apparently opening a loop device sometimes results in ENXIO, handle this

3 years agoloop-util: use right flags field
Lennart Poettering [Thu, 24 Sep 2020 13:09:14 +0000 (15:09 +0200)] 
loop-util: use right flags field

3 years agoMerge pull request #17148 from jlebon/pr/crypt-source
Lennart Poettering [Fri, 25 Sep 2020 13:50:15 +0000 (15:50 +0200)] 
Merge pull request #17148 from jlebon/pr/crypt-source

cryptsetup-generator: use "/proc/cmdline" as source when appropriate

3 years agoMerge pull request #17132 from keszybz/test-suite-update
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 11:39:24 +0000 (13:39 +0200)] 
Merge pull request #17132 from keszybz/test-suite-update

Test suite updates

3 years agocryptsetup-generator: avoid magic value in ternary 17148/head
Jonathan Lebon [Wed, 23 Sep 2020 19:25:41 +0000 (15:25 -0400)] 
cryptsetup-generator: avoid magic value in ternary

`startswith` already returns the string with the prefix skipped, so we
can simplify this further and avoid using a magic value.

Noticed in passing.

Co-authored-by: Lennart Poettering <lennart@poettering.net>
3 years agosd-dhcp6-client: Fix sending prefix delegation request (#17136)
mog422 [Thu, 24 Sep 2020 15:04:52 +0000 (00:04 +0900)] 
sd-dhcp6-client: Fix sending prefix delegation request (#17136)

SD_DHCP6_OPTION_IA_NA does not exist in DHCP6_ADVERTISE packet if DHCP server only provides prefix delegation. So the attempt to send the DHCP6_REQUEST packet fails on r = dhcp6_option_append_ia(&opt, &optlen, &client->lease->ia); forever.

3 years agotest-seccomp: accept ENOSYS from sysctl(2) too 17132/head
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 17:05:17 +0000 (19:05 +0200)] 
test-seccomp: accept ENOSYS from sysctl(2) too

It seems that kernel 5.9 started returning that.

3 years agotest: switch TEST-02-CRYPTSETUP and TEST-24-UNITTESTS
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 16:26:28 +0000 (18:26 +0200)] 
test: switch TEST-02-CRYPTSETUP and TEST-24-UNITTESTS

When tests are executed serially (the default), it seems better to launch
the fairly generic test that runs the unittests early in the sequence.
Right now the tests are ordered based on when they were written, but
this doesn't make much sense.

3 years agoMerge pull request #17145 from poettering/kill-chmod-and-chown-unsafe
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 07:40:56 +0000 (09:40 +0200)] 
Merge pull request #17145 from poettering/kill-chmod-and-chown-unsafe

remove chmod_and_chown_unsafe()

3 years agoMerge pull request #17143 from keszybz/late-exec-resolution-alt
Lennart Poettering [Thu, 24 Sep 2020 07:38:36 +0000 (09:38 +0200)] 
Merge pull request #17143 from keszybz/late-exec-resolution-alt

Late exec resolution (subset)

3 years agohwdb: add Medion Akoya E2221T MD60691 (#17147)
germanztz [Thu, 24 Sep 2020 07:33:43 +0000 (09:33 +0200)] 
hwdb: add Medion Akoya E2221T MD60691 (#17147)

3 years agoTranslated using Weblate (Chinese (Simplified))
Charles Lee [Thu, 24 Sep 2020 04:29:28 +0000 (06:29 +0200)] 
Translated using Weblate (Chinese (Simplified))

Currently translated at 63.1% (118 of 187 strings)

Co-authored-by: Charles Lee <lchopn@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_CN/
Translation: systemd/master

3 years agorandom-util: Add an environment variable to disable RDRAND.
Kyle Huey [Wed, 23 Sep 2020 21:19:09 +0000 (14:19 -0700)] 
random-util: Add an environment variable to disable RDRAND.

SYSTEMD_RDRAND=0 will prevent using RDRAND even on systems whose CPUID claims
to support it. All other values have no effect.

Fixes: #17112
3 years agoMerge pull request #17142 from poettering/catalog-fix-de
Anita Zhang [Thu, 24 Sep 2020 06:41:38 +0000 (23:41 -0700)] 
Merge pull request #17142 from poettering/catalog-fix-de

catalog: add missing @ to German catalog file

3 years agoMerge pull request #17146 from poettering/use-more-proc-mounted
Anita Zhang [Thu, 24 Sep 2020 06:39:20 +0000 (23:39 -0700)] 
Merge pull request #17146 from poettering/use-more-proc-mounted

use proc_mounted() more

3 years agoMerge pull request #17118 from poettering/sync-shutdown-loop
Lennart Poettering [Wed, 23 Sep 2020 19:47:03 +0000 (21:47 +0200)] 
Merge pull request #17118 from poettering/sync-shutdown-loop

fsync() block devices before detaching them during shutdown

3 years agoMerge pull request #17144 from poettering/mount-nofollow
Lennart Poettering [Wed, 23 Sep 2020 19:46:02 +0000 (21:46 +0200)] 
Merge pull request #17144 from poettering/mount-nofollow

tree-wide: mostly avoid following symlinks when mounting

3 years agocryptsetup-generator: use "/proc/cmdline" as source when appropriate
Jonathan Lebon [Wed, 23 Sep 2020 19:23:58 +0000 (15:23 -0400)] 
cryptsetup-generator: use "/proc/cmdline" as source when appropriate

Right now, we always say `/etc/crypttab` even if the source was fully
derived from the kargs.

Let's match what `systemd-fstab-generator` does and use `/proc/cmdline`
when that's the case.

3 years agoupdate TODO 17144/head
Lennart Poettering [Wed, 23 Sep 2020 08:11:49 +0000 (10:11 +0200)] 
update TODO

3 years agotree-wide: port remaining umount() calls to umount_verbose()
Lennart Poettering [Wed, 23 Sep 2020 13:28:59 +0000 (15:28 +0200)] 
tree-wide: port remaining umount() calls to umount_verbose()

3 years agotree-wide: switch remaining mount() invocations over to mount_nofollow_verbose()
Lennart Poettering [Wed, 23 Sep 2020 08:12:56 +0000 (10:12 +0200)] 
tree-wide: switch remaining mount() invocations over to mount_nofollow_verbose()

(Well, at least the ones where that makes sense. Where it does't make
sense are the ones that re invoked on the root path, which cannot
possibly be a symlink.)

3 years agomount-util: rework umount_verbose() to take log level and flags arg
Lennart Poettering [Tue, 22 Sep 2020 14:32:07 +0000 (16:32 +0200)] 
mount-util: rework umount_verbose() to take log level and flags arg

Let's make umount_verbose() more like mount_verbose_xyz(), i.e. take log
level and flags param. In particular the latter matters, since we
typically don't actually want to follow symlinks when unmounting.

3 years agomount-util: switch most mount_verbose() code over to not follow symlinks
Lennart Poettering [Tue, 22 Sep 2020 13:51:17 +0000 (15:51 +0200)] 
mount-util: switch most mount_verbose() code over to not follow symlinks

3 years agomount-util: make sure get_mount_flags() ever follows symlinks
Lennart Poettering [Tue, 22 Sep 2020 13:16:37 +0000 (15:16 +0200)] 
mount-util: make sure get_mount_flags() ever follows symlinks

It doesn't follow symlinks when we check for the mount flags via
libmount, hence it shouldn't do either when we go via statvfs().

3 years agomount-util: add helpers for mount() without following symlinks
Lennart Poettering [Tue, 22 Sep 2020 13:16:15 +0000 (15:16 +0200)] 
mount-util: add helpers for mount() without following symlinks

3 years agoshutdown: also fsync() DM devices before going down 17118/head
Lennart Poettering [Tue, 22 Sep 2020 09:23:35 +0000 (11:23 +0200)] 
shutdown: also fsync() DM devices before going down

Similar reasons as the previous patch.

3 years agoshutdown: also fsync() MD devices when going down
Lennart Poettering [Tue, 22 Sep 2020 09:21:27 +0000 (11:21 +0200)] 
shutdown: also fsync() MD devices when going down

Let's make this explicit, just in case this suffers by the same issues
as the loopback devices, and drops in-flight IO when we disassemble it.

3 years agoshutdown: don't compare pointers with 0
Lennart Poettering [Tue, 22 Sep 2020 09:21:19 +0000 (11:21 +0200)] 
shutdown: don't compare pointers with 0

3 years agoshutdown: fsync() before detaching loopback devices
Lennart Poettering [Tue, 22 Sep 2020 09:19:37 +0000 (11:19 +0200)] 
shutdown: fsync() before detaching loopback devices

This is a follow-up for cae1e8fb88c5a6b0960a2d0be3df8755f0c78462: we
also call the detach ioctls in the shutdown code, hence add the fsync()s
there too, just to be safe.

3 years agofs-util: check for /proc mounted in access_fd() 17146/head
Lennart Poettering [Wed, 23 Sep 2020 16:19:21 +0000 (18:19 +0200)] 
fs-util: check for /proc mounted in access_fd()

It's a very basic function very similar to other cases where we go via
/proc/self/fd/, hence do the explicit proc_mounted() check here too.

3 years agofs-util: use strna() on returned strings of fd_get_path() if we don't check its retur...
Lennart Poettering [Wed, 23 Sep 2020 16:18:03 +0000 (18:18 +0200)] 
fs-util: use strna() on returned strings of fd_get_path() if we don't check its return value

Let's make sure to use strna() on the strings returned by fd_get_path()
where we knowingly ignore any failures. We got this right in most cases,
but two were missing.

3 years agobasic: update fd_get_path() to use proc_mounted() helper
Lennart Poettering [Wed, 23 Sep 2020 16:16:34 +0000 (18:16 +0200)] 
basic: update fd_get_path() to use proc_mounted() helper

We use it pretty much everywhere else, hence use it here too.

This also changes the error generated from EOPNOTSUPP to ENOSYS, to
match the other cases where we do such a check. One user checked for
EOPNOTSUPP which is updated to check for ENOSYS instead.

3 years agofs-util: drop chmod_and_chown_unsafe() which is unused now 17145/head
Lennart Poettering [Wed, 23 Sep 2020 15:51:08 +0000 (17:51 +0200)] 
fs-util: drop chmod_and_chown_unsafe() which is unused now

3 years agosysusers: modernize file backup logic a bit
Lennart Poettering [Wed, 23 Sep 2020 15:49:35 +0000 (17:49 +0200)] 
sysusers: modernize file backup logic a bit

Let's use _cleanup_ magic to clean up files, let's fully operate by fds
whenever we can.

3 years agoupdate TODO
Lennart Poettering [Wed, 23 Sep 2020 13:25:25 +0000 (15:25 +0200)] 
update TODO

3 years agorun: let systemd resolve the path with RootDirectory=/RootImage= 17143/head
Zbigniew Jędrzejewski-Szmek [Thu, 17 Sep 2020 13:44:59 +0000 (15:44 +0200)] 
run: let systemd resolve the path with RootDirectory=/RootImage=

Fixes #13338.

3 years agocore: don't try to load units from non-absolute paths
Zbigniew Jędrzejewski-Szmek [Fri, 18 Sep 2020 12:48:40 +0000 (14:48 +0200)] 
core: don't try to load units from non-absolute paths

The error message disagreed with the check that was actually performed. Adjust the check.

3 years agocatalog: add missing @ to German catalog file 17142/head
Lennart Poettering [Wed, 23 Sep 2020 11:56:51 +0000 (13:56 +0200)] 
catalog: add missing @ to German catalog file

3 years agosd-radv: fix indentation
Lennart Poettering [Wed, 23 Sep 2020 11:25:27 +0000 (13:25 +0200)] 
sd-radv: fix indentation

Fix-up for 97efde65d81b1501a3737f408f1234c6c25da61c

3 years agomachine: fix error code propagation in two cases
Lennart Poettering [Wed, 23 Sep 2020 08:21:27 +0000 (10:21 +0200)] 
machine: fix error code propagation in two cases

3 years agoMerge pull request #17130 from keszybz/static-analyzer-cleanups
Lennart Poettering [Wed, 23 Sep 2020 11:23:56 +0000 (13:23 +0200)] 
Merge pull request #17130 from keszybz/static-analyzer-cleanups

Trivial cleanups based on static analysis

3 years agoman: sd_bus_message_new: fix typo
Roy Chen (陳彥廷) [Wed, 23 Sep 2020 09:52:22 +0000 (17:52 +0800)] 
man: sd_bus_message_new: fix typo

3 years agosd-path: include 'search' in search pathnames
Ronan Pigott [Wed, 23 Sep 2020 00:21:27 +0000 (17:21 -0700)] 
sd-path: include 'search' in search pathnames

3 years agozsh: add systemd-path completions
Ronan Pigott [Wed, 23 Sep 2020 00:52:53 +0000 (17:52 -0700)] 
zsh: add systemd-path completions

3 years agoMerge pull request #17124 from bluca/copypasta
Lennart Poettering [Wed, 23 Sep 2020 07:43:39 +0000 (09:43 +0200)] 
Merge pull request #17124 from bluca/copypasta

dissect-image: use correct path variable when reading verity signatures, do not refuse verity GPT without /usr partition

3 years agoMerge pull request #17127 from poettering/errno-fixup
Lennart Poettering [Wed, 23 Sep 2020 07:43:18 +0000 (09:43 +0200)] 
Merge pull request #17127 from poettering/errno-fixup

make more use of errno-util.h macros

3 years agoMerge pull request #16938 from poettering/homed-rtc-wrong
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 18:51:39 +0000 (20:51 +0200)] 
Merge pull request #16938 from poettering/homed-rtc-wrong

homed: don't refuse logins when RTC is wrong

3 years agoMerge pull request #17109 from fbuihuu/udev-opts-tweaks
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 16:54:48 +0000 (18:54 +0200)] 
Merge pull request #17109 from fbuihuu/udev-opts-tweaks

Udev opts tweaks

3 years agotest/run-integration-tests: do not run the tests if only "clean" is passed
Zbigniew Jędrzejewski-Szmek [Mon, 21 Sep 2020 22:00:59 +0000 (00:00 +0200)] 
test/run-integration-tests: do not run the tests if only "clean" is passed

3 years agoshared/conf-parser: drop redundant cast to boolean 17130/head
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 11:05:31 +0000 (13:05 +0200)] 
shared/conf-parser: drop redundant cast to boolean

parse_boolean returns either 0 or 1 or error, and we checked for errors
earlier already.

3 years agologind: use _cleanup_ in one more place
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 15:33:24 +0000 (17:33 +0200)] 
logind: use _cleanup_ in one more place

3 years agosd-{login,netlink,network}: use TAKE_FD() in more places
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 15:33:06 +0000 (17:33 +0200)] 
sd-{login,netlink,network}: use TAKE_FD() in more places

3 years agotest-bus-chat: add missing return value in check
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 15:32:26 +0000 (17:32 +0200)] 
test-bus-chat: add missing return value in check

3 years agovarious: remove assignments of unread variables
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 15:30:47 +0000 (17:30 +0200)] 
various: remove assignments of unread variables

3 years agoactivate: reduce scope of iterator variable
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 15:31:08 +0000 (17:31 +0200)] 
activate: reduce scope of iterator variable

3 years agocore/namespace: drop bitfield annotations from boolean fields
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 10:48:25 +0000 (12:48 +0200)] 
core/namespace: drop bitfield annotations from boolean fields

Such microoptimization makes sense when the structure is used in many many copies,
but here's it's not, and the few bytes we save are not worth the extra code the
compiler has to generate:

    return  ns_info->mount_apivfs ||
            ns_info->protect_control_groups ||
            ns_info->protect_kernel_tunables ||
            ...
before:
  49b187:       48 8b 45 f8             mov    -0x8(%rbp),%rax
  49b18b:       0f b6 00                movzbl (%rax),%eax
  49b18e:       83 e0 80                and    $0xffffff80,%eax
  49b191:       84 c0                   test   %al,%al
  49b193:       75 32                   jne    49b1c7 <namespace_info_mount_apivfs+0x80>
  49b195:       48 8b 45 f8             mov    -0x8(%rbp),%rax
  49b199:       0f b6 00                movzbl (%rax),%eax
  49b19c:       83 e0 08                and    $0x8,%eax
  49b19f:       84 c0                   test   %al,%al
  49b1a1:       75 24                   jne    49b1c7 <namespace_info_mount_apivfs+0x80>
  49b1a3:       48 8b 45 f8             mov    -0x8(%rbp),%rax
  49b1a7:       0f b6 00                movzbl (%rax),%eax
  49b1aa:       83 e0 10                and    $0x10,%eax
  49b1ad:       84 c0                   test   %al,%al
  49b1af:       75 16                   jne    49b1c7 <namespace_info_mount_apivfs+0x80>

after:
  49b024:       48 8b 45 f8             mov    -0x8(%rbp),%rax
  49b028:       0f b6 40 07             movzbl 0x7(%rax),%eax
  49b02c:       84 c0                   test   %al,%al
  49b02e:       75 2e                   jne    49b05e <namespace_info_mount_apivfs+0x7a>
  49b030:       48 8b 45 f8             mov    -0x8(%rbp),%rax
  49b034:       0f b6 40 03             movzbl 0x3(%rax),%eax
  49b038:       84 c0                   test   %al,%al
  49b03a:       75 22                   jne    49b05e <namespace_info_mount_apivfs+0x7a>
  49b03c:       48 8b 45 f8             mov    -0x8(%rbp),%rax
  49b040:       0f b6 40 04             movzbl 0x4(%rax),%eax
  49b044:       84 c0                   test   %al,%al
  49b046:       75 16                   jne    49b05e <namespace_info_mount_apivfs+0x7a>

3 years agoMerge pull request #17086 from keszybz/developer-mode-default
Lennart Poettering [Tue, 22 Sep 2020 14:29:28 +0000 (16:29 +0200)] 
Merge pull request #17086 from keszybz/developer-mode-default

Update dbus docs, make developer mode default

3 years agoptyfwd: use ERRNO_IS_DISCONNECT() when checking for disconnection on foreign fds 17127/head
Lennart Poettering [Tue, 22 Sep 2020 12:18:11 +0000 (14:18 +0200)] 
ptyfwd: use ERRNO_IS_DISCONNECT() when checking for disconnection on foreign fds

3 years agotree-wide: use ERRNO_IS_PRIVILEGE() whereever appropriate
Lennart Poettering [Tue, 22 Sep 2020 12:13:18 +0000 (14:13 +0200)] 
tree-wide: use ERRNO_IS_PRIVILEGE() whereever appropriate

3 years agodissect-image: do not refuse verity GPT without /usr partition 17124/head
Luca Boccassi [Tue, 22 Sep 2020 14:24:59 +0000 (15:24 +0100)] 
dissect-image: do not refuse verity GPT without /usr partition

Only enforce that /usr verity partition is present if a /usr
partition is there

3 years agodissect-image: use correct path variable when reading verity signatures
Luca Boccassi [Tue, 22 Sep 2020 12:19:19 +0000 (13:19 +0100)] 
dissect-image: use correct path variable when reading verity signatures

Copypasta slipped in via https://github.com/systemd/systemd/pull/17101

3 years agoTry stopping MD RAID devices in shutdown too
Hubert Kario [Sun, 20 Sep 2020 16:59:58 +0000 (18:59 +0200)] 
Try stopping MD RAID devices in shutdown too

Currently the systemd-shutdown command attempts to stop swaps, DM
(crypt, LVM2) and loop devices, but it doesn't attempt to stop MD
RAID devices, which means that if the RAID is set up on crypt,
loop, etc. device, it won't be able to stop those underlying devices.

This code extends the shutdown application to also attempt stopping
the MD RAID devices.

Signed-off-by: Hubert Kario <hubert@kario.pl>
3 years agoudevadm: rename option '--log-priority' into '--log-level' 17109/head
Franck Bui [Mon, 21 Sep 2020 09:22:12 +0000 (11:22 +0200)] 
udevadm: rename option '--log-priority' into '--log-level'

Let's be consistent with systemctl(1).

'--log-priority' i still kept only for backward compatibility.

3 years agoudev: rename kernel option 'log_priority' into 'log_level'
Franck Bui [Mon, 21 Sep 2020 09:10:50 +0000 (11:10 +0200)] 
udev: rename kernel option 'log_priority' into 'log_level'

Let's be consistent with the rest of the project.

'log_priority' is still supported for backward compatibility.

3 years agomeson: remove multi-line statement with trailing '\'
Anita Zhang [Mon, 21 Sep 2020 18:41:17 +0000 (11:41 -0700)] 
meson: remove multi-line statement with trailing '\'

Error on meson 0.47:
```
meson.build:885:47: ERROR:  Expecting colon got eol_cont.
crypt_header = conf.get('HAVE_CRYPT_H') == 1 ? \
                                               ^
```

This seems to have been fixed in meson 0.50 after a report from
https://github.com/mesonbuild/meson/issues/4720

3 years agohomed: in images that lack mkfs.btrfs automatically fall back to ext4 16938/head
Lennart Poettering [Mon, 21 Sep 2020 15:30:03 +0000 (17:30 +0200)] 
homed: in images that lack mkfs.btrfs automatically fall back to ext4

It's better to tweak suboptimal defaults than to just fail with
compiled-in defaults.

3 years agohomed: show actual file system in messages about file systems
Lennart Poettering [Mon, 21 Sep 2020 15:21:12 +0000 (17:21 +0200)] 
homed: show actual file system in messages about file systems

3 years agouser-record: don't refuse login when last pw change time is in the future
Lennart Poettering [Wed, 2 Sep 2020 14:37:42 +0000 (16:37 +0200)] 
user-record: don't refuse login when last pw change time is in the future

The RTC is like just off, it's a weird system state, let's continue
without requiring pw change.

3 years agohomed: ignore ratelimiting counters when timestamp is from future
Lennart Poettering [Wed, 2 Sep 2020 14:36:27 +0000 (16:36 +0200)] 
homed: ignore ratelimiting counters when timestamp is from future

This likely indicates that the system clock is simply wrong, hence allow
access in this case.

Fixes: #15917
3 years agohomed: don't block logins into accounts with future change time
Lennart Poettering [Wed, 2 Sep 2020 14:35:22 +0000 (16:35 +0200)] 
homed: don't block logins into accounts with future change time

This might happen if the system clock is wrong, and we should allow
access in this case (though certainly log about it).

3 years agoMerge pull request #17101 from poettering/gpt-usr
Lennart Poettering [Mon, 21 Sep 2020 11:45:04 +0000 (13:45 +0200)] 
Merge pull request #17101 from poettering/gpt-usr

add gpt types for /usr/, similar to how we have it for root partitions

3 years agoupdate-dbus-docs: skip test if python is too old 17086/head
Zbigniew Jędrzejewski-Szmek [Sun, 20 Sep 2020 11:15:44 +0000 (13:15 +0200)] 
update-dbus-docs: skip test if python is too old

3 years agoupdate TODO 17101/head
Lennart Poettering [Thu, 17 Sep 2020 16:59:10 +0000 (18:59 +0200)] 
update TODO

3 years agodoc: document the new GPT partition type UUIDs
Lennart Poettering [Thu, 17 Sep 2020 16:57:27 +0000 (18:57 +0200)] 
doc: document the new GPT partition type UUIDs

3 years agoman: emphasize that part table shown by systemd-dissect is not complete
Lennart Poettering [Thu, 17 Sep 2020 16:00:26 +0000 (18:00 +0200)] 
man: emphasize that part table shown by systemd-dissect is not complete

3 years agodissect-image: process /usr/ GPT partition type
Lennart Poettering [Sat, 22 Aug 2020 10:21:51 +0000 (12:21 +0200)] 
dissect-image: process /usr/ GPT partition type

3 years agogpt: add new GPT partition types of /usr partitions
Lennart Poettering [Sat, 22 Aug 2020 10:23:01 +0000 (12:23 +0200)] 
gpt: add new GPT partition types of /usr partitions

3 years agoMerge pull request #17100 from poettering/homed-fixes 16211/head
Zbigniew Jędrzejewski-Szmek [Sat, 19 Sep 2020 16:17:56 +0000 (18:17 +0200)] 
Merge pull request #17100 from poettering/homed-fixes

various homed fixes

3 years agomkosi: include libfido2 binary package in mkosi manually for now
Lennart Poettering [Fri, 18 Sep 2020 20:27:36 +0000 (22:27 +0200)] 
mkosi: include libfido2 binary package in mkosi manually for now

As long as the RPM version does not include a dep for it yet, we need to
add it manually, since we now link against it.

Follow-up for: 95f7ab2fe66cc3bb3a95eb8690114732eab30555

3 years agoMerge pull request #17102 from weblate/weblate-systemd-master
Zbigniew Jędrzejewski-Szmek [Sat, 19 Sep 2020 16:05:59 +0000 (18:05 +0200)] 
Merge pull request #17102 from weblate/weblate-systemd-master

Translations update from Weblate

3 years agoTranslated using Weblate (Turkish) 17102/head
Oğuz Ersen [Sat, 19 Sep 2020 12:22:13 +0000 (14:22 +0200)] 
Translated using Weblate (Turkish)

Currently translated at 100.0% (133 of 133 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/master

3 years agoTranslated using Weblate (Danish)
scootergrisen [Sat, 19 Sep 2020 12:22:13 +0000 (14:22 +0200)] 
Translated using Weblate (Danish)

Currently translated at 100.0% (187 of 187 strings)

Translated using Weblate (Danish)

Currently translated at 100.0% (187 of 187 strings)

Translated using Weblate (Danish)

Currently translated at 95.7% (179 of 187 strings)

Translated using Weblate (Danish)

Currently translated at 78.6% (147 of 187 strings)

Co-authored-by: scootergrisen <scootergrisen@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/da/
Translation: systemd/master

3 years agoMerge pull request #17082 from poettering/nspawn-ctty-tweaks
Anita Zhang [Fri, 18 Sep 2020 21:26:14 +0000 (14:26 -0700)] 
Merge pull request #17082 from poettering/nspawn-ctty-tweaks

nspawn controlling tty tweaks

3 years agounits: pass CAP_SYS_RESOURCE to homed 17100/head
Lennart Poettering [Fri, 18 Sep 2020 20:01:49 +0000 (22:01 +0200)] 
units: pass CAP_SYS_RESOURCE to homed

The ext4 fs resize ioctl needs CAP_SYS_RESOURCE, irritatingly. Let's
grant it to homed hence.

Fixes: #15115