Commit Graph

45740 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 37b22b3b47 tree: wide "the the" and other trivial grammar fixes 2020-07-02 09:51:38 +02:00
Susant Sahani 838d39af93 network: Allow DHCPv6 client to start solicit mode
Now DHCPv6 client start only DHCPv6 INFORMATION-REQUEST mode.
Let's enable Solicit mode too.
2020-07-02 16:18:48 +09:00
AsciiWolf 51115fdc42 l10n: update Czech Translation 2020-07-01 17:44:20 +02:00
Franck Bui 6371e69b49 fstab-generator: introduce an helper to write extra dependencies specified via the mount options
No functional change.
2020-07-01 16:35:13 +02:00
Franck Bui 045c5faf5a fstab-generator: extra dependencies specified in fstab should be applied to the mount unit
If an entry in fstab uses "x-systemd.automount" option and also asks for
additionnal dependencies via x-systemd.requires or such, then the dependencies
were applied to the automount unit.

But this unlikely to do the right thing and is inconsistent with what's done
for network mounts.

Indeed when an fstab entries has "_netdev,x-systemd.automount" options, the
dependencies against the network requested by "_netdev" are (correctly) applied
to the mount unit only and the automount unit remains ordered against
local-fs.target.

The same logic should be followed when extra deps are specified via the mount
options as automount units should always be ordered against local-fs.target.

Note: in general explicit deps specified via mount options should be used with
care and should be used to specify dependencies on other mount units only as it
can easily create ordering cycles otherwise like it's been seen in
https://github.com/systemd/systemd-stable/issues/69. Mount units (as well as
automount ones) are ordered before local-fs.target by default which is a
low-level target that most other units depend on.
2020-07-01 16:34:42 +02:00
Lennart Poettering c8fe23d45c update TODO 2020-07-01 11:20:26 +02:00
Lennart Poettering 4442c26942 man: update homectl man page with documentation for new features 2020-07-01 11:20:26 +02:00
Lennart Poettering fe2520fbb5 docs: document new FIDO2 user record fields 2020-07-01 11:20:26 +02:00
Lennart Poettering 0eb3be4644 homectl: add --pkcs11-uri=auto and --pkcs-11-uri=list support
We have the same for FIDO2 devices, for listing suitable devices, or
picking the right one automatically, let's add that for PKCS11 too.
2020-07-01 11:20:26 +02:00
Lennart Poettering 2af3966af3 homectl: add acquired fido2 PIN to user record
If we successfully acquired the PIN for the fido2 key, let's add it to
our user record, so that we can pass it to homed, which will need it
too.
2020-07-01 11:20:26 +02:00
Lennart Poettering 93295a2501 homectl: split out pkcs#11 related code bits into own .c/.h file
There's some highly specific PKCS#11 code in homectl.c. Let's split that
out, since it is easily isolatable, to make homectl.c a bit more
readable.

No funcional changes, just some moving around and renaming two functions
to make them more suitably named when exported.
2020-07-01 11:20:25 +02:00
Lennart Poettering c98811d837 homectl: rework how we log when doing a home directory update
When updating a home directory we might update the record first, then
resize the image and finally synchronize the passwords to the storage
layers. These are three individually authenticated operations. Since
each might require touching a FIDO2 or PKCS#11 key we should say what we
are doing. Hence do so.

Usually we are pretty quiet with what we do, and let's stick to that.
Hence show this information only if we actually do more than one thing.
If we only update (and do not resize/sync passwords) then let's be quiet
as usual, as the command line then sufficiently clarifies what we are
doing.
2020-07-01 11:17:28 +02:00
Lennart Poettering 8e62dfb12a homectl: do generic error handling/retry also when creating a home directory
After all, when creating we might need interaction with the security
token too, and our initial attempt to create the user will fail, since
we do not allow interactive auth on the security token, so that we then
can print a log message and retry with interactive auth then enabled.
2020-07-01 11:17:28 +02:00
Lennart Poettering f737186ab1 homectl: show touch emoji when asking for PKCS#11 protected auth path 2020-07-01 11:17:28 +02:00
Lennart Poettering 85b1294488 pam-systemd-home: print helpful message when token's PIN is locked 2020-07-01 11:17:28 +02:00
Lennart Poettering 7b78db28e5 homed: add support for authenticating with fido2 hmac-secret tokens 2020-07-01 11:17:28 +02:00
Lennart Poettering 1c0c4a43c6 homectl: add support for enrolling FIDO2 HMAC-SECRET tokens 2020-07-01 11:17:28 +02:00
Lennart Poettering 5e4fa456fa user-record: add fields for FIDO2 HMAC authentication options 2020-07-01 11:17:28 +02:00
Lennart Poettering af4fbd463f build-sys: add libfido2 as optional dependency 2020-07-01 11:17:28 +02:00
Lennart Poettering c0bde0d240 user-record: rename JSON field "pkcs11Pin" to "tokenPin"
We'd like to use it for FIDO2 tokens too, and the concept is entirely
generic, hence let's just reuse the field, but rename it. Read the old
name for compatibility, and treat the old name and the new name as
identical for most purposes.
2020-07-01 11:17:28 +02:00
Lennart Poettering d00f318323 user-record: securely erase pkcs#11 when assigned NULL too 2020-07-01 11:17:28 +02:00
Lennart Poettering 7b8d55b72c homectl: add missing log messages when json_variant_format() fails 2020-07-01 11:17:28 +02:00
Lennart Poettering c63ec11bf5 pkcs11-util: reduce scope of a variable 2020-07-01 11:17:28 +02:00
Lennart Poettering 1146b664e6 macro: add new FOREACH_POINTER() macro magic
This allows us to iterate through a series of specified pointers. It's a
bit like FOREACH_STRING(), but for all kinds of pointers.
2020-07-01 11:17:28 +02:00
Lennart Poettering 428d32afea locale-util: add support for touch emoji
We can use this to highlight when users are supposed to touch their
security tokens.
2020-07-01 11:17:27 +02:00
Yu Watanabe 830ffbce1b doc: add recentry introduced transient settings
Also sort entries for service settings.
2020-07-01 10:38:08 +02:00
Yu Watanabe 9457b6bb21
Merge pull request #16303 from poettering/dbus-util-split
shared: split src/shared/bus-util.c into multiple files
2020-07-01 14:15:40 +09:00
Yu Watanabe 3d2c26925f test-network: add tests for SR-IOV
This also adjusts test_sysctl_disable_ipv6(), as rt_trap flag may be
added to routes on some environments.
2020-07-01 13:51:35 +09:00
Yu Watanabe c3a5025dc6 network: add MACAddress= setting in [SR-IOV] section 2020-07-01 13:51:35 +09:00
Yu Watanabe e64b31c848 network: add VLANProtocol= setting in [SR-IOV] section 2020-07-01 13:51:35 +09:00
Susant Sahani 518cd6b527 network: Introduce SR-IOV
SR-IOV provides the ability to partition a single physical PCI
resource into virtual PCI functions which can then be injected in
to a VM. In the case of network VFs, SR-IOV improves north-south n
etwork performance (that is, traffic with endpoints outside the
host machine) by allowing traffic to bypass the host machine’s network stack.
2020-07-01 13:51:33 +09:00
Susant Sahani 5908ddd763 sd-netlink: Add SR-IOV netlink properties 2020-07-01 13:50:49 +09:00
Marc Kleine-Budde b46d8c1c70 udev: spi: include chip select number in ID_PATH
All devices behind a SPI controller have the same udev ID_PATH property.
This is a problem for predicable network names for CAN controllers.

CAN controllers, in contrast to Ethernet controllers, don't have a MAC
Address, so there's no way to tell two CAN controllers on the same SPI
host controller apart:

$ udevadm info /sys/class/net/can0
P: /devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.1/net/can0
L: 0
E: DEVPATH=/devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.1/net/can0
E: INTERFACE=can0
E: IFINDEX=3
E: SUBSYSTEM=net
E: USEC_INITIALIZED=11187199
E: ID_PATH=platform-fe204000.spi
E: ID_PATH_TAG=platform-fe204000_spi
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/can0
E: TAGS=:systemd:

$ udevadm info /sys/class/net/can1
P: /devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.0/net/can1
L: 0
E: DEVPATH=/devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.0/net/can1
E: INTERFACE=can1
E: IFINDEX=4
E: SUBSYSTEM=net
E: USEC_INITIALIZED=11192211
E: ID_PATH=platform-fe204000.spi
E: ID_PATH_TAG=platform-fe204000_spi
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/can1
E: TAGS=:systemd:

With this the chip select number is added to the ID_PATH, to make
predictable network names possible.

$ sudo udevadm info /sys/class/net/can0
P: /devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.1/net/can0
L: 0
E: DEVPATH=/devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.1/net/can0
E: INTERFACE=can0
E: IFINDEX=3
E: SUBSYSTEM=net
E: USEC_INITIALIZED=11187199
E: ID_PATH=platform-fe204000.spi-cs-1
E: ID_PATH_TAG=platform-fe204000_spi-cs-1
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/can0
E: TAGS=:systemd:

$ sudo udevadm info /sys/class/net/can1
P: /devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.0/net/can1
L: 0
E: DEVPATH=/devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.0/net/can1
E: INTERFACE=can1
E: IFINDEX=4
E: SUBSYSTEM=net
E: USEC_INITIALIZED=11192211
E: ID_PATH=platform-fe204000.spi-cs-0
E: ID_PATH_TAG=platform-fe204000_spi-cs-0
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/can1
E: TAGS=:systemd:
2020-07-01 13:12:11 +09:00
Zbigniew Jędrzejewski-Szmek d17eabb105 Fix build with µhttpd 0.9.71
The return type of callbacks was changed from int to an enum.
2020-07-01 13:10:48 +09:00
Yu Watanabe 116739cfb6
Merge pull request #16316 from yuwata/backlight-use-actual-brightness
backlight: use actual_brightness attribute to get current backlight level
2020-07-01 13:10:15 +09:00
Lennart Poettering 5c236388c3 update TODO 2020-06-30 17:13:38 +02:00
Zbigniew Jędrzejewski-Szmek 6c3a19d5b3
Merge pull request #16313 from yuwata/network-move-ipv6ll-gen-mode
network: move IPv6LinkLocalAddressGenerationMode= to [Network] section
2020-06-30 17:13:02 +02:00
Luca Boccassi 7233e91af0 core: store timestamps of unit load attempts
When the system is under heavy load, it can happen that the unit cache
is refreshed for an unrelated reason (in the test I simulate this by
attempting to start a non-existing unit). The new unit is found and
accounted for in the cache, but it's ignored since we are loading
something else.
When we actually look for it, by attempting to start it, the cache is
up to date so no refresh happens, and starting fails although we have
it loaded in the cache.

When the unit state is set to UNIT_NOT_FOUND, mark the timestamp in
u->fragment_loadtime. Then when attempting to load again we can check
both if the cache itself needs a refresh, OR if it was refreshed AFTER
the last failed attempt that resulted in the state being
UNIT_NOT_FOUND.

Update the test so that this issue reproduces more often.
2020-06-30 16:50:00 +02:00
Zbigniew Jędrzejewski-Szmek f93dd4b940
Merge pull request #16282 from poettering/repart-copy-blocks
repart: add new CopyBlocks= setting
2020-06-30 15:26:06 +02:00
Yu Watanabe 437b9a7f75 backlight: read current backlight brightness from 'actual_brightness' attribute
Closes #16302.
2020-06-30 22:19:21 +09:00
Yu Watanabe daa227a320 backlight: call log_setup_service() before logging 2020-06-30 22:19:21 +09:00
Yu Watanabe 74f1bb5c9f backlight: use SYNTHETIC_ERRNO() macro 2020-06-30 22:19:21 +09:00
Lennart Poettering 40af3d020f shared: split out property get helpers
No code changes, just some refactoring.
2020-06-30 15:10:17 +02:00
Lennart Poettering 9176326ba2 shared: split out code for printing properties
No code changes, just some refactoring.
2020-06-30 15:09:56 +02:00
Lennart Poettering 807542bece shared: split out code that maps properties to local structs
Just some refactoring, no code changes.
2020-06-30 15:09:35 +02:00
Lennart Poettering 9b71e4ab90 shared: actually move all BusLocator related calls to bus-locator.c 2020-06-30 15:09:19 +02:00
Lennart Poettering c664cf5607 shared: split out BusObjectImplementor APIs
Just some refactoring, no code changes
2020-06-30 15:08:35 +02:00
Amos Bird 7aee1e7304
hwdb: adjust touchpad edge detection for X1Tab3 (#16310) 2020-06-30 19:04:08 +09:00
Yu Watanabe aa0b850bca NEWS: minor fixes 2020-06-30 19:00:18 +09:00
Yu Watanabe 6f6296b93f network: move IPv6LinkLocalAddressGenerationMode= to [Network] section
This also moves and renames variables and functions.

Follow-ups for a6f1848a23.
2020-06-30 18:58:52 +09:00