Commit Graph

48145 Commits

Author SHA1 Message Date
Lennart Poettering e6a7bee538 sd-event: let's suffix last_run/last_log with "_usec"
Otherwise it's a bit confusing what this is about: two timestamps.
2020-12-01 15:10:50 +01:00
Lennart Poettering 1e45e3fecc sd-event: split out code to add/remove timer event sources to earliest/latest prioq
Just some refactoring that makes code prettier, and will come handy
later, because we can reuse these functions at more places.
2020-12-01 15:10:50 +01:00
Lennart Poettering 41c63f36c3 sd-event: split clock data allocation out of sd_event_add_time()
Just some simple refactoring, that will make things easier for us later.
But it looks better this way even without the later function reuse.
2020-12-01 15:10:50 +01:00
Lennart Poettering f80a5d6a86 sd-event: mention that two debug logged events are ignored 2020-12-01 14:36:06 +01:00
Lennart Poettering 8c437318b8 update TODO 2020-12-01 14:27:33 +01:00
Lennart Poettering 59d6f7b097 man: drop comment about ECC vs. RSA and Yubikey
The comment is pointless, ECC systematically doesn't allow
encryption/decryption directly, only RSA does that. If you want to use
ECC for asymmetric encryption/decryption you have to combine it with key
exchange scheme and symmetric scheme. This all is not a limitation of
the Yubikey, hence don't claim so. It's just how ECC is.
2020-12-01 14:27:33 +01:00
Lennart Poettering 96e9a9a4e6 man: document how cryptsetup keys may be acquired via AF_UNIX sockets 2020-12-01 14:27:12 +01:00
Lennart Poettering e060ed32e4 cryptsetup: modify keyfile search logic to use read_file_full() too
Let's move the 3rd way how cryptsetup acquires key files to
read_file_full() too.

Since load_key_file()'s raison d'etre now is just the search path logic,
let's rename the function to find_key_file().
2020-12-01 14:27:01 +01:00
Lennart Poettering e2c2f868b2 cryptsetup: port cryptsetup's main key file logic over to read_full_file_full()
Previously, we'd load the file with libcryptsetup's calls. Let's do that
in our own, so that we can make use of READ_FULL_FILE_CONNECT_SOCKET,
i.e. read in keys via AF_UNIX sockets, so that people can plug key
providers into our logic.

This provides functionality similar to Debian's keyscript= crypttab
option (see → #3007), as it allows key scripts to be run as socket
activated services, that have stdout connected to the activated socket.
In contrast to traditional keyscript= support this logic runs stuff out
of process however, which is beneficial, since it allows sandboxing and
similar.
2020-12-01 14:17:47 +01:00
Lennart Poettering 4d1bb8f397 cryptsetup: port PKCS#11 code to read key file with read_full_file()
Now that we can read from offsets/with size, let's port the cryptsetup
PKCS#11 key file logic over to read_full_file_full().
2020-12-01 14:17:47 +01:00
Lennart Poettering 986311c2da fileio: teach read_full_file_full() to read from offset/with maximum size 2020-12-01 14:17:47 +01:00
Lennart Poettering c61f46fe31 journal-remote: suffix cmdline option that expects arg with = 2020-12-01 14:17:47 +01:00
Lennart Poettering ce82de671f man: mention that --key= is about *secret* keys 2020-12-01 14:17:47 +01:00
Lennart Poettering e5de42e6f2 journal-remote: use READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE when reading PEM secret key
It's secret data, hence use the appropriate flags.
2020-12-01 14:17:46 +01:00
Lennart Poettering 8b3c3a4973 repart: warn about world writable key files
We have easy support for this, hence use it for privileged key data.
2020-12-01 14:17:46 +01:00
Lennart Poettering ae9cf30b2f dissect-image: use simple version of read_full_file() where we can 2020-12-01 14:17:46 +01:00
Lennart Poettering f362fe731b journal-remote: erase secret PEM key from memory after use 2020-12-01 14:17:46 +01:00
Zbigniew Jędrzejewski-Szmek ce9067697b meson: add missing "S" to SYSTEMD_CGROUPS_AGENT_PATH
Other similar variables use the binary name underscorified and upppercased
(with "_BINARY" appended in some cases to avoid ambiguity). Add "S" to follow
the same pattern for systemd-cgroups-agent.

Based on the discussion in #16715.
2020-12-01 09:34:17 +01:00
Franck Bui e9eec8b5d2 scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgroup scope
Commit 428a9f6f1d freed u->pids which is
problematic since the references to this unit in m->watch_pids were no more
removed when the unit was freed.

This patch makes sure to clean all this refs up before freeing u->pids by
calling unit_unwatch_all_pids().
2020-12-01 09:33:14 +01:00
Vito Caputo cb9d621ebb
sd-event: fix delays assert brain-o (#17790)
s/sizeof/ELEMENTSOF/

Bug introduced in 34b8751774.
2020-12-01 09:26:54 +01:00
Pavel Sapezhko e11ec61d65 mkosi: make ubuntu image bootable by default 2020-11-30 22:14:57 +00:00
igo95862 1edc1f1b62 man: Speicfy exact return values of sd_bus_message_enter_container 2020-11-30 12:21:20 +01:00
Piotr Drąg a75471ced1 po: add units/systemd-journald.service.in to POTFILES.skip 2020-11-30 10:36:31 +01:00
Michał Kopeć e7ab349f64 hwdb: add axis range corrections for Lenovo ThinkPad T14 Gen1 2020-11-30 10:28:16 +01:00
Yu Watanabe 53ec5dd028 network: use IN_SET() macro
Follow-up for 1d370b2c18.
2020-11-30 12:41:41 +09:00
Yu Watanabe 0d0799daf4 network: treat IPv4LL is one of dynamic addressing protocol
This makes an IPv4LL address optional when multiple dynamic
addressing protocols are enabled.
2020-11-30 12:41:41 +09:00
Yu Watanabe 0b4b66cc53 network: simplify the condition about ipv4ll is enabled or not 2020-11-30 12:41:41 +09:00
Yu Watanabe d19b993983 network: shorten link_check_ready() a bit 2020-11-30 12:41:41 +09:00
Yu Watanabe 8ccae2dd2d network: stop IPv4LL engine when DHCPv4 address is successfully acquired 2020-11-30 12:41:30 +09:00
Zbigniew Jędrzejewski-Szmek 0107b769b1 networkd: start ipv4ll when dhcp has trouble getting a lease
Fixes #13316.
2020-11-30 12:37:36 +09:00
Zbigniew Jędrzejewski-Szmek fb536bc5da sd-dhcp-client: report transient DHCP failure to the caller
So far we only reported major state transitions like failure to acquire
the message. Let's report the initial failure after a few timeouts in
a new event type.

The number of timeouts is hardcoded as 3, since Windows seems to be using
that. I don't think we need to make this configurable out of the box. A
reasonable default may be enough.
2020-11-30 12:37:36 +09:00
Zbigniew Jędrzejewski-Szmek 3ca1fab70a networkd: merge ll addressing fallback modes into normal "boolean" values
They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From https://github.com/systemd/systemd/issues/13316#issuecomment-582906817:
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e81083bd. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
2020-11-30 12:37:36 +09:00
Zbigniew Jędrzejewski-Szmek e4dc0845bc sd-dhcp-client: minor simplification 2020-11-30 12:37:36 +09:00
Zbigniew Jędrzejewski-Szmek 573b02f5c1 man: adjust description of MaxAttempts
The code was changed in 715cedfbf0 to allow more than
six attempts and the old description stopped making sense.
2020-11-30 12:37:36 +09:00
Yu Watanabe bb2d0a24f3
Merge pull request #17761 from keszybz/documentation-followups
Two tiny fixlets
2020-11-29 05:32:33 +09:00
nihilix-melix eee582e795 Update logind-button.c 2020-11-28 12:44:48 +01:00
Zbigniew Jędrzejewski-Szmek 78cafcbc7e test-networkd-conf: add missing assert_se
Coverity CID#1437351. Fixup for f706340979.
2020-11-28 11:27:31 +01:00
Frantisek Sumsal ed9192bb55 semaphore: temporarily disable the timedated test suite
All otherwise passing Semaphore CI builds are now getting stuck on the
timedated test suite. Let's temporarily skip it until the issue is
resolved.

See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975010
2020-11-28 08:53:38 +09:00
Konomi 55260eeb78 hwdb: 60-keyboard: Add Dell Inspiron 11 3168 Fn+Home/End/PageUp/PageDown key mappings
On the Dell Inspiron 11 3168 the Fn and Arrow Keys control the Home, End, Page Up and Page Down keys. This commit allows those keys to work correctly.
2020-11-27 13:14:12 +01:00
Zbigniew Jędrzejewski-Szmek b2363dcdd8
Merge pull request #17734 from yuwata/parse-hwdb
hwdb: add missing Group()
2020-11-27 13:12:23 +01:00
Zbigniew Jędrzejewski-Szmek 1526e55f6c
Merge pull request #17732 from yuwata/core-use-synthetic_errno
core,network: use SYNTHETIC_ERRNO() macro
2020-11-27 12:55:37 +01:00
Zbigniew Jędrzejewski-Szmek 832eedd192 NEWS: really fix kernel version number reference
Fixes #17736.
2020-11-27 12:51:48 +01:00
Yu Watanabe 61c26ca87f coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro 2020-11-27 14:35:20 +09:00
Yu Watanabe ba715423fe cryptsetup: drop unnecessary bracket 2020-11-27 14:35:20 +09:00
Yu Watanabe 2940b12826 test: use for(;;) instead of while(true) 2020-11-27 14:35:20 +09:00
Yu Watanabe 614f57ed76 core/scope: use set_ensure_put() 2020-11-27 14:35:20 +09:00
Yu Watanabe 75f79cd2d8 mount-util: use mfree() 2020-11-27 14:35:20 +09:00
Yu Watanabe 95ca39f04e oom: use CMP() macro 2020-11-27 14:35:20 +09:00
Yu Watanabe 751b440063 core: fix typo 2020-11-27 14:35:20 +09:00
Yu Watanabe 1c1729c9be coccinelle: add rules for log_unit_error_errno() or friends 2020-11-27 14:35:20 +09:00