Commit graph

27917 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 5e176a4dee Merge pull request #14368 from poettering/repart 2020-01-23 19:07:02 +01:00
Anita Zhang 72528419e1
Merge pull request #14618 from poettering/growfs-rootfs
generator: order growfs for the root fs after systemd-remount-fs
2020-01-22 05:32:18 -08:00
Anita Zhang fe888c79f5
Merge pull request #14614 from poettering/import-fixlets
three small importd fixes
2020-01-22 03:48:31 -08:00
Lennart Poettering dc084399fa loginctl: use /org/freedesktop/login1/session/auto when "lock-session" is called without argument
This way we'll use the "display" session automatically, and that makes
the call work when invoked from user@.service.

Fixes: #13614
2020-01-22 15:36:35 +09:00
Lennart Poettering fbbe240b21
Merge pull request #14605 from aerusso/pulls/x-systemd-wantedby-requiredby
Implemented x-systemd.{required,wanted}-by= options
2020-01-21 19:21:49 +01:00
Yu Watanabe 5029912157 network,udev: use uint64_t for bit rate
Fixes #14620.
2020-01-21 16:51:19 +01:00
Lennart Poettering ce96c9cb1a timesyncd: log louder when we refuse a server due to root distance
This is something people should know about, since it's caused by
misconfiguration.

Fixes: #13912
2020-01-21 15:20:17 +01:00
Lennart Poettering c680e4efa8
Merge pull request #14617 from poettering/no-strv-clear
strv: remove strv_clear() and some other minor fixes
2020-01-21 15:08:38 +01:00
Lennart Poettering e704a09409
Merge pull request #14622 from poettering/uid-ref-fixlets
trivial uid ref counting clean-ups
2020-01-21 15:08:02 +01:00
Lennart Poettering f1f20764f9 resolved: drop DNSSEC root key that is not valid anymore
I guess we can drop this now, the key is no longer valid until
2019-01-11, hence there's no point in still including it in our trust
anchor.
2020-01-21 15:06:53 +01:00
Antonio Russo be02c1cf42 Implemented x-systemd.{required,wanted}-by= options
Teaches systemd-fstab-generator these two unit options,
creating appropriate dependencies on the generated .mount
units.  When used, they override any other automatically
generated dependencies, such as local-fs.target, and are
NOT suppressed by noauto.  The new options are ignored for
/, in the same way that noauto is ignored.

Fixes: #14380
Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2020-01-21 06:54:34 -07:00
Lennart Poettering e0567bc8ad journal: don't use startswith() on something that is not a NUL-terminated string
Otherwise we might access memory coming after it that is not valid or
allocated.

Fixes: #14114
2020-01-21 14:32:15 +01:00
Yu Watanabe 680120bb20 virt: do not define vm_from_string() for non-x86 architecture
Fixes #14615.
2020-01-21 13:47:08 +01:00
Lennart Poettering b90cf10245 core: make a number of functions not used externally static 2020-01-21 11:51:45 +01:00
Lennart Poettering 96462ae998 core: show the UID we cannot parse 2020-01-21 11:51:26 +01:00
Lennart Poettering 898820edb5 json: lower maximum allowed recursion to 2K
Apparently 4K is too high still, let's halve it.

Fixes: #14396
2020-01-21 10:50:09 +01:00
Lennart Poettering 18e6e8635f generator: order growfs for the root fs after systemd-remount-fs
Fixes: #14603
2020-01-21 10:40:18 +01:00
Lennart Poettering d6bd2bb444 hwdb: fix error numbers passed to log_syntax() 2020-01-21 10:15:26 +01:00
Lennart Poettering 2aecc66887 hwdb: use strv_extend() where we can 2020-01-21 10:13:07 +01:00
Lennart Poettering 2e5180d38b strv: get rid of strv_clear()
Let's remove a function of questionnable utility.

strv_clear() frees the items of a string array, but not the array
itself. i.e. it half-drestructs a string array and makes it empty. This
is not too useful an operation since we almost never need to just do
that, we also want to free the whole thing. In fact, strv_clear() is
only used in one of our .c file, and there it appears like unnecessary
optimization, given that for each array with n elements it leaves the
number of free()s we need to at O(n) which is not really an optimization
at all (it goes from n+1 to n, that's all).

Prompted by the discussions on #14605
2020-01-21 10:07:34 +01:00
Lennart Poettering f85df81817 import: let's disable UNIX signal generation from curl 2020-01-20 22:09:38 +01:00
Lennart Poettering d076f9fd56 import: put a time-out on downloads
Let's abort downloads when they are stuck by setting a download speed
threshold (as suggested in the CURL docs)

Fixes: #14215
2020-01-20 22:07:02 +01:00
Lennart Poettering 137c6c6b36 import: don't complain if FS_NOCOW_FL is not available
Let's downgrade the log message to LOG_DEBUG if triggered by an fs that
doesn't support the flag.
2020-01-20 21:10:31 +01:00
Lennart Poettering e594a3b154 repart: add new systemd-repart tool
Fixes: #14052
2020-01-20 17:42:03 +01:00
Lennart Poettering b57ebc6004 conf-parser: add parser for 32bit signed integers 2020-01-20 17:42:03 +01:00
Lennart Poettering 7e70f2cb0e locale-util: add special glyph Σ 2020-01-20 17:42:03 +01:00
Lennart Poettering 1d2a1a0cb8 locale-util: add block drawing special glyphs 2020-01-20 17:42:03 +01:00
Lennart Poettering 137688dff4 format-table: add support for formatting uuids/id128 values 2020-01-20 17:42:03 +01:00
Lennart Poettering 1293a168f1 id128: move make_v4_uuid into id128-util.h to make it generally useful 2020-01-20 17:42:03 +01:00
Lennart Poettering 449d530700 makefs: simplify SPDX header 2020-01-20 17:42:03 +01:00
Lennart Poettering e56a8790a0 test: add test for https://github.com/systemd/systemd/issues/14560 2020-01-20 17:19:51 +01:00
Lennart Poettering 3b7f79dc9f core: make sure StandardInput=file: doesn't get dup'ed to stdout/stderr by default
Fixes: #14560
2020-01-20 17:19:42 +01:00
Sascha Dewald fc57f105d9 pkgconf: add full generator paths 2020-01-18 17:48:28 +01:00
Lennart Poettering 7e284b054e tree-wide: we forgot to destroy some bus errors 2020-01-18 17:47:20 +01:00
Zbigniew Jędrzejewski-Szmek 8a9125cbb3
Merge pull request #14596 from poettering/no-mask-perpetual
core: don't allow perpetual units to be masked
2020-01-18 10:17:10 +01:00
Wieland Hoffmann 287cf2d802 typo: "May modify to" -> "May modify" 2020-01-18 10:08:27 +01:00
Lennart Poettering 0879fbd6fe mount: make checks on perpetual mount units more lax
We don#t really care where perpetual mounts are mounted from, since they
have to exist since before we run anyway.
2020-01-17 15:09:18 +01:00
Lennart Poettering 88414eed6f core: never allow perpetual units to be masked
Fixes: #14550
2020-01-17 15:02:15 +01:00
Zbigniew Jędrzejewski-Szmek 4ca739e20a core: reduce indentation a bit 2020-01-17 08:13:09 +01:00
Zbigniew Jędrzejewski-Szmek b0a94df963 logind: use loop instead of repeated code
https://github.com/systemd/systemd/pull/14096#discussion_r350953689
2020-01-17 08:13:09 +01:00
Zbigniew Jędrzejewski-Szmek ddee3ada46 shared/user-record-nss: use macro to avoid repeats
It's easier to read when each field is intialized in exactly one place.
2020-01-17 08:13:09 +01:00
Zbigniew Jędrzejewski-Szmek 192aee3cae shared/user-record-nss: shorten code a bit
free_and_strdup() already does comparison internally.
2020-01-16 21:57:00 +01:00
Arian van Putten c7d26acce6 Disable reading SystemdOptions EFI Var when in SecureBoot mode
In SecureBoot mode this is probably not what you want. As your cmdline
is cryptographically signed like when using Type #2 EFI Unified Kernel
Images (https://systemd.io/BOOT_LOADER_SPECIFICATION/) The user's
intention is then that the cmdline should not be modified.  You want to
make sure that the system starts up as exactly specified in the signed
artifact.
2020-01-16 18:46:56 +01:00
Zbigniew Jędrzejewski-Szmek 32458cc968 sysctl: downgrade message when we have no permission
We need to run sysctl also in containers, because the network
subtree is namespaces and may legitimately be writable. But logging
all "errors" at notice level creates unwanted noise.

Also downgrade message about missing sysctls to log_info. This might also be
relatively common when configuration is targeted at different kernel
versions. With log_debug it'll still end up in the logs, but isn't really worth
of "notice" most of the time.

https://bugzilla.redhat.com/show_bug.cgi?id=1609806
2020-01-16 14:45:50 +01:00
Zbigniew Jędrzejewski-Szmek b2ae4d9eb8 sysctl: move hashmap allocation out of main function
This allocation is a low level detail, and it seems nicer to keep it
out of run().
2020-01-16 14:45:37 +01:00
Zbigniew Jędrzejewski-Szmek 251d3d20c3
Merge pull request #14581 from poettering/setcred-alternative-fix
alternative pam_setcred() fix
2020-01-16 09:53:26 +01:00
Lennart Poettering 4bb68f2fee core: on each iteration processing /proc/self/mountinfo merge all discovery flags for each path
This extends on d253a45e1c, and instead of
merging just a single flag from previous mount entries of
/proc/self/mountinfo for the same path we merge all three.

This shouldn't change behaviour, but I think make things more readable.

Previously we'd set MOUNT_PROC_IS_MOUNTED unconditionally, we still do.

Previously we'd inherit MOUNT_PROC_JUST_MOUNTED from a previous entry on
the same line, we still do.

MOUNT_PROC_JUST_CHANGED should generally stay set too. Why that? If we
have two mount entries on the same mount point we'd first process one
and then the other, and the almost certainly different mount parameters
of the two would mean we'd set MOUNT_PROC_JUST_CHANGED for the second.
And with this we'll definitely do that still.

This also adds a comment explaining the situation a bit, and why we get
into this situation.
2020-01-15 17:42:12 +01:00
Lennart Poettering 46d7c6afbf execute: allow pam_setcred() to fail, ignore errors
Fixes: #14567
Alternative-To: #14569
2020-01-15 17:10:43 +01:00
Lennart Poettering 5b8d1f6b77 execute: add const to array parameters, where possible 2020-01-15 17:10:28 +01:00
Lennart Poettering f9c1f4e193 pam-systemd: apply user record properties to session
This way any component providing us with JSON user record data can use
this for automatic resource management and other session properties.
2020-01-15 15:30:02 +01:00