]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agoupdate TODO 15442/head
Lennart Poettering [Thu, 16 Apr 2020 09:12:39 +0000 (11:12 +0200)] 
update TODO

5 years agoman: update homectl man page with documentation for new features
Lennart Poettering [Thu, 16 Apr 2020 08:51:54 +0000 (10:51 +0200)] 
man: update homectl man page with documentation for new features

5 years agodocs: document new FIDO2 user record fields
Lennart Poettering [Thu, 16 Apr 2020 08:03:44 +0000 (10:03 +0200)] 
docs: document new FIDO2 user record fields

5 years agohomectl: add --pkcs11-uri=auto and --pkcs-11-uri=list support
Lennart Poettering [Thu, 16 Apr 2020 07:44:55 +0000 (09:44 +0200)] 
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.

5 years agohomectl: add acquired fido2 PIN to user record
Lennart Poettering [Wed, 15 Apr 2020 19:56:31 +0000 (21:56 +0200)] 
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.

5 years agohomectl: split out pkcs#11 related code bits into own .c/.h file
Lennart Poettering [Wed, 15 Apr 2020 19:53:03 +0000 (21:53 +0200)] 
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.

5 years agohomectl: rework how we log when doing a home directory update
Lennart Poettering [Wed, 15 Apr 2020 17:35:55 +0000 (19:35 +0200)] 
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.

5 years agohomectl: do generic error handling/retry also when creating a home directory
Lennart Poettering [Wed, 15 Apr 2020 17:35:07 +0000 (19:35 +0200)] 
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.

5 years agohomectl: show touch emoji when asking for PKCS#11 protected auth path
Lennart Poettering [Wed, 15 Apr 2020 17:34:41 +0000 (19:34 +0200)] 
homectl: show touch emoji when asking for PKCS#11 protected auth path

5 years agopam-systemd-home: print helpful message when token's PIN is locked
Lennart Poettering [Tue, 14 Apr 2020 17:26:48 +0000 (19:26 +0200)] 
pam-systemd-home: print helpful message when token's PIN is locked

5 years agohomed: add support for authenticating with fido2 hmac-secret tokens
Lennart Poettering [Tue, 14 Apr 2020 17:18:09 +0000 (19:18 +0200)] 
homed: add support for authenticating with fido2 hmac-secret tokens

5 years agohomectl: add support for enrolling FIDO2 HMAC-SECRET tokens
Lennart Poettering [Tue, 14 Apr 2020 13:54:12 +0000 (15:54 +0200)] 
homectl: add support for enrolling FIDO2 HMAC-SECRET tokens

5 years agouser-record: add fields for FIDO2 HMAC authentication options
Lennart Poettering [Tue, 14 Apr 2020 13:53:05 +0000 (15:53 +0200)] 
user-record: add fields for FIDO2 HMAC authentication options

5 years agobuild-sys: add libfido2 as optional dependency
Lennart Poettering [Tue, 14 Apr 2020 13:54:52 +0000 (15:54 +0200)] 
build-sys: add libfido2 as optional dependency

5 years agouser-record: rename JSON field "pkcs11Pin" to "tokenPin"
Lennart Poettering [Tue, 14 Apr 2020 17:05:09 +0000 (19:05 +0200)] 
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.

5 years agouser-record: securely erase pkcs#11 when assigned NULL too
Lennart Poettering [Tue, 14 Apr 2020 13:43:01 +0000 (15:43 +0200)] 
user-record: securely erase pkcs#11 when assigned NULL too

5 years agohomectl: add missing log messages when json_variant_format() fails
Lennart Poettering [Wed, 15 Apr 2020 17:31:33 +0000 (19:31 +0200)] 
homectl: add missing log messages when json_variant_format() fails

5 years agopkcs11-util: reduce scope of a variable
Lennart Poettering [Tue, 14 Apr 2020 12:12:09 +0000 (14:12 +0200)] 
pkcs11-util: reduce scope of a variable

5 years agomacro: add new FOREACH_POINTER() macro magic
Lennart Poettering [Tue, 14 Apr 2020 16:52:24 +0000 (18:52 +0200)] 
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.

5 years agolocale-util: add support for touch emoji
Lennart Poettering [Wed, 15 Apr 2020 16:45:16 +0000 (18:45 +0200)] 
locale-util: add support for touch emoji

We can use this to highlight when users are supposed to touch their
security tokens.

5 years agodoc: add recentry introduced transient settings
Yu Watanabe [Wed, 1 Jul 2020 06:05:14 +0000 (15:05 +0900)] 
doc: add recentry introduced transient settings

Also sort entries for service settings.

5 years agoMerge pull request #16303 from poettering/dbus-util-split
Yu Watanabe [Wed, 1 Jul 2020 05:15:40 +0000 (14:15 +0900)] 
Merge pull request #16303 from poettering/dbus-util-split

shared: split src/shared/bus-util.c into multiple files

5 years agoudev: spi: include chip select number in ID_PATH
Marc Kleine-Budde [Sun, 28 Jun 2020 19:43:34 +0000 (21:43 +0200)] 
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:

5 years agoFix build with µhttpd 0.9.71
Zbigniew Jędrzejewski-Szmek [Tue, 30 Jun 2020 07:56:10 +0000 (09:56 +0200)] 
Fix build with µhttpd 0.9.71

The return type of callbacks was changed from int to an enum.

5 years agoMerge pull request #16316 from yuwata/backlight-use-actual-brightness
Yu Watanabe [Wed, 1 Jul 2020 04:10:15 +0000 (13:10 +0900)] 
Merge pull request #16316 from yuwata/backlight-use-actual-brightness

backlight: use actual_brightness attribute to get current backlight level

5 years agoupdate TODO
Lennart Poettering [Tue, 30 Jun 2020 15:13:38 +0000 (17:13 +0200)] 
update TODO

5 years agoMerge pull request #16313 from yuwata/network-move-ipv6ll-gen-mode
Zbigniew Jędrzejewski-Szmek [Tue, 30 Jun 2020 15:13:02 +0000 (17:13 +0200)] 
Merge pull request #16313 from yuwata/network-move-ipv6ll-gen-mode

network: move IPv6LinkLocalAddressGenerationMode= to [Network] section

5 years agocore: store timestamps of unit load attempts
Luca Boccassi [Tue, 16 Jun 2020 17:46:55 +0000 (18:46 +0100)] 
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.

5 years agoMerge pull request #16282 from poettering/repart-copy-blocks
Zbigniew Jędrzejewski-Szmek [Tue, 30 Jun 2020 13:26:06 +0000 (15:26 +0200)] 
Merge pull request #16282 from poettering/repart-copy-blocks

repart: add new CopyBlocks= setting

5 years agobacklight: read current backlight brightness from 'actual_brightness' attribute 16316/head
Yu Watanabe [Tue, 30 Jun 2020 10:41:39 +0000 (19:41 +0900)] 
backlight: read current backlight brightness from 'actual_brightness' attribute

Closes #16302.

5 years agobacklight: call log_setup_service() before logging
Yu Watanabe [Tue, 30 Jun 2020 10:29:42 +0000 (19:29 +0900)] 
backlight: call log_setup_service() before logging

5 years agobacklight: use SYNTHETIC_ERRNO() macro
Yu Watanabe [Tue, 30 Jun 2020 10:28:50 +0000 (19:28 +0900)] 
backlight: use SYNTHETIC_ERRNO() macro

5 years agoshared: split out property get helpers 16303/head
Lennart Poettering [Sun, 28 Jun 2020 14:43:29 +0000 (16:43 +0200)] 
shared: split out property get helpers

No code changes, just some refactoring.

5 years agoshared: split out code for printing properties
Lennart Poettering [Sun, 28 Jun 2020 14:17:46 +0000 (16:17 +0200)] 
shared: split out code for printing properties

No code changes, just some refactoring.

5 years agoshared: split out code that maps properties to local structs
Lennart Poettering [Sun, 28 Jun 2020 14:08:37 +0000 (16:08 +0200)] 
shared: split out code that maps properties to local structs

Just some refactoring, no code changes.

5 years agoshared: actually move all BusLocator related calls to bus-locator.c
Lennart Poettering [Sun, 28 Jun 2020 13:59:37 +0000 (15:59 +0200)] 
shared: actually move all BusLocator related calls to bus-locator.c

5 years agoshared: split out BusObjectImplementor APIs
Lennart Poettering [Sun, 28 Jun 2020 13:37:47 +0000 (15:37 +0200)] 
shared: split out BusObjectImplementor APIs

Just some refactoring, no code changes

5 years agohwdb: adjust touchpad edge detection for X1Tab3 (#16310)
Amos Bird [Tue, 30 Jun 2020 10:04:08 +0000 (18:04 +0800)] 
hwdb: adjust touchpad edge detection for X1Tab3 (#16310)

5 years agoNEWS: minor fixes 16313/head
Yu Watanabe [Tue, 30 Jun 2020 10:00:18 +0000 (19:00 +0900)] 
NEWS: minor fixes

5 years agonetwork: move IPv6LinkLocalAddressGenerationMode= to [Network] section
Yu Watanabe [Tue, 30 Jun 2020 08:01:30 +0000 (17:01 +0900)] 
network: move IPv6LinkLocalAddressGenerationMode= to [Network] section

This also moves and renames variables and functions.

Follow-ups for a6f1848a2328cf1493f363968d105cc23019af8a.

5 years agoNEWS: add several entries about networkd
Yu Watanabe [Tue, 30 Jun 2020 06:25:24 +0000 (15:25 +0900)] 
NEWS: add several entries about networkd

5 years agotest-repart: allow the test to pass on non-amd64 architectures
Zbigniew Jędrzejewski-Szmek [Mon, 29 Jun 2020 13:55:41 +0000 (15:55 +0200)] 
test-repart: allow the test to pass on non-amd64 architectures

We specified type=root and expected to always get root-x86-64, which obviously
cannot work.

5 years agoshell-completion: add missing verbs for networkctl
Yu Watanabe [Tue, 30 Jun 2020 05:44:41 +0000 (14:44 +0900)] 
shell-completion: add missing verbs for networkctl

5 years agotest: bump the timeout for systemd-hwdb-update.service under ASan
Frantisek Sumsal [Sun, 28 Jun 2020 16:53:28 +0000 (18:53 +0200)] 
test: bump the timeout for systemd-hwdb-update.service under ASan

Since the hwdb update from a79be2f80777eb80e0d8177f6bccd7615de7ec1a
the systemd-hwdb-update service started timing out under ASan when
compiled with gcc, as we started tripping over the 3 minutes timeout.

This affects only gcc runs, since the current gcc on Arch still suffers
from the detect_stack_use_after_return performance penalty[0]. Until
the fixed gcc is present in the respective repositories, let's bump
the timeout to 4 minutes, as we might not be able to upgrade right
away, due to systemd/systemd#16199.

Before the hwdb update:
[ 7958.292540] systemd[63]: systemd-hwdb-update.service: Executing: /usr/bin/time systemd-hwdb update
[ 7958.304005] systemd[1]: systemd-journald.service: Got notification message from PID 44 (FDSTORE=1)
[ 7958.314434] systemd[1]: systemd-journald.service: Added fd 3 (n/a) to fd store.
[ 8008.520082] systemd[1]: systemd-journald.service: Got notification message from PID 44 (WATCHDOG=1)
[ 8068.520151] systemd[1]: systemd-journald.service: Got notification message from PID 44 (WATCHDOG=1)
[ 8125.682843] time[63]: 84.47user 82.92system 2:47.50elapsed 99%CPU (0avgtext+0avgdata 811512maxresident)k
[ 8125.682843] time[63]: 0inputs+19680outputs (0major+25000853minor)pagefaults 0swaps

After the hwdb update:
[ 6215.491958] systemd[63]: systemd-hwdb-update.service: Executing: /usr/bin/time systemd-hwdb update
[ 6215.503380] systemd[1]: systemd-journald.service: Got notification message from PID 44 (FDSTORE=1)
[ 6215.514172] systemd[1]: systemd-journald.service: Added fd 3 (n/a) to fd store.
[ 6329.392918] systemd[1]: systemd-journald.service: Got notification message from PID 44 (WATCHDOG=1)
[ 6394.920205] time[63]: 89.48user 89.98system 2:59.55elapsed 99%CPU (0avgtext+0avgdata 812764maxresident)k
[ 6394.920205] time[63]: 0inputs+20568outputs (0major+27318354minor)pagefaults 0swaps

[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94910

5 years agoMerge pull request #16142 from poettering/random-seed-cmdline
Zbigniew Jędrzejewski-Szmek [Fri, 26 Jun 2020 20:42:51 +0000 (22:42 +0200)] 
Merge pull request #16142 from poettering/random-seed-cmdline

pid1: add support for allowing to pass in random seed via kernel cmdline

5 years agopid1: warn if people use User=nobody (#16293)
Lennart Poettering [Fri, 26 Jun 2020 20:36:39 +0000 (22:36 +0200)] 
pid1: warn if people use User=nobody (#16293)

5 years agoefi: define cache functions inside EFI_ENABLE ifdef
Luca Boccassi [Fri, 26 Jun 2020 15:25:13 +0000 (16:25 +0100)] 
efi: define cache functions inside EFI_ENABLE ifdef

../src/shared/efi-loader.c:738:5: error: redefinition of 'efi_loader_get_config_timeout_one_shot'
 int efi_loader_get_config_timeout_one_shot(usec_t *ret) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/shared/efi-loader.c:9:
../src/shared/efi-loader.h:85:19: note: previous definition of 'efi_loader_get_config_timeout_one_shot' was here
 static inline int efi_loader_get_config_timeout_one_shot(usec_t *ret) {
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/shared/efi-loader.c:776:5: error: redefinition of 'efi_loader_update_entry_one_shot_cache'
 int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/shared/efi-loader.c:9:
../src/shared/efi-loader.h:89:19: note: previous definition of 'efi_loader_update_entry_one_shot_cache' was here
 static inline int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) {

5 years agotree-wide: spellcheck fixes
Frantisek Sumsal [Fri, 26 Jun 2020 19:30:04 +0000 (21:30 +0200)] 
tree-wide: spellcheck fixes

Most of them were reported by Fossies.org

5 years agoNEWS: reorder entries with some minor additions
Zbigniew Jędrzejewski-Szmek [Fri, 26 Jun 2020 17:25:04 +0000 (19:25 +0200)] 
NEWS: reorder entries with some minor additions

Let's make this easier for readers by grouping common subjects together.

Roughly: pid1 features, unit file changes, general syntax changes, kernel
options, general defaults, udevd features, networkd and .network/.netdev
features, networkctl, resolved, systemctl, systemd-run, journald, journalctl,
various other tools, low-level dbus and library stuff, documentation.

5 years agocore: add device mapper to allow-list with DevicePolicy=closed and RootImage
Luca Boccassi [Fri, 26 Jun 2020 11:19:48 +0000 (12:19 +0100)] 
core: add device mapper to allow-list with DevicePolicy=closed and RootImage

To set up a verity/cryptsetup RootImage the forked child needs to
ioctl /dev/mapper/control and create a new mapper.
If PrivateDevices=yes and/or DevicePolicy=closed are used, this is
blocked by the cgroup setting, so add an exception like it's done
for loop devices (and also add a dependency on the kernel modules
implementing them).

5 years agoupdate TODO
Lennart Poettering [Fri, 26 Jun 2020 16:04:52 +0000 (18:04 +0200)] 
update TODO

5 years agoupdate TODO
Lennart Poettering [Fri, 26 Jun 2020 13:43:24 +0000 (15:43 +0200)] 
update TODO

5 years agoMerge pull request #16281 from poettering/logind-cache-more-efi
Lennart Poettering [Fri, 26 Jun 2020 13:12:57 +0000 (15:12 +0200)] 
Merge pull request #16281 from poettering/logind-cache-more-efi

logind: cache two more EFI variables in logind

5 years agoAdd quotes for -n
Gaoyi [Fri, 26 Jun 2020 05:55:41 +0000 (13:55 +0800)] 
Add quotes for -n

According to SC2070, -n doesn't work with unquoted arguments
https://github.com/koalaman/shellcheck/wiki/SC2070

Signed-off-by: Gaoyi <ymuemc@163.com>
5 years agoJOURNAL_FILE_FORMAT: minor markdown fixes
Lennart Poettering [Fri, 26 Jun 2020 11:55:18 +0000 (13:55 +0200)] 
JOURNAL_FILE_FORMAT: minor markdown fixes

5 years agoNEWS: add more items for 246
Lennart Poettering [Fri, 26 Jun 2020 11:54:54 +0000 (13:54 +0200)] 
NEWS: add more items for 246

5 years agologind: also cache LoaderEntryOneShot EFI variable 16281/head
Lennart Poettering [Thu, 25 Jun 2020 14:25:41 +0000 (16:25 +0200)] 
logind: also cache LoaderEntryOneShot EFI variable

With this we are now caching all EFI variables that we expose as
property in logind. Thus a client invoking GetAllProperties() should
only trgger a single read of each variable, but never repeated ones.

Obsoletes: #16190
Fixes: #14828
5 years agoefi-loader: cache LoaderConfigTimeoutOneShot too
Lennart Poettering [Thu, 25 Jun 2020 13:24:25 +0000 (15:24 +0200)] 
efi-loader: cache LoaderConfigTimeoutOneShot too

The data from this EFI variable is exposed as dbus property, and gdbus
clients are happy to issue GetAllProperties() as if it was free. Hence
make sure it's actually free and cache LoaderConfigTimeoutOneShot, since
it's easy.

5 years agotmpfile-util: typo fixes
Lennart Poettering [Thu, 25 Jun 2020 13:24:06 +0000 (15:24 +0200)] 
tmpfile-util: typo fixes

5 years agoutil: add missing header guard
Yu Watanabe [Thu, 25 Jun 2020 20:36:01 +0000 (05:36 +0900)] 
util: add missing header guard

5 years agoMerge pull request #16096 from poettering/journal-hash-fix
Zbigniew Jędrzejewski-Szmek [Fri, 26 Jun 2020 05:27:05 +0000 (07:27 +0200)] 
Merge pull request #16096 from poettering/journal-hash-fix

journal file hash table hardening + zstd support

5 years agohwdb: update for v246
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 13:44:06 +0000 (15:44 +0200)] 
hwdb: update for v246

As usual, it seems that there are mostly additions with a smaller amount
of corrections, no big removals.

5 years agoupdate TODO 16282/head
Lennart Poettering [Thu, 25 Jun 2020 16:52:43 +0000 (18:52 +0200)] 
update TODO

5 years agorepart: add new CopyBlocks= setting
Lennart Poettering [Thu, 25 Jun 2020 16:51:16 +0000 (18:51 +0200)] 
repart: add new CopyBlocks= setting

This allows copying in arbitrary file systems on the block level into
newly created partitions.

Usecase: simple replicating OS installers or OS image builders.

5 years agoMerge pull request #16275 from yuwata/network-deprecate-netdevsim
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 16:41:49 +0000 (18:41 +0200)] 
Merge pull request #16275 from yuwata/network-deprecate-netdevsim

network: deprecate netdevsim support

5 years agoudev: split attribute assignment for MMC cards
Łukasz Stelmach [Wed, 24 Jun 2020 17:24:13 +0000 (19:24 +0200)] 
udev: split attribute assignment for MMC cards

Some cards have names consisting only of whitespace characters which
prevents the original rule from matching and assigning ID_SERIAL
properly. With the split rules ID_SERIAL and ID_NAME are assigned
independently and the symlink is created only if both are available the
same way it has worked for partitions.

5 years agoportabled: create temp file for unit, not directory
Luca Boccassi [Tue, 23 Jun 2020 14:56:33 +0000 (15:56 +0100)] 
portabled: create temp file for unit, not directory

open_tmpfile_linkable is used to create a temporary file in the same
directory as the target, but portabled uses the name of the parent
directory instead of the file it intends to create.
In other words, it creats a tmp for /etc/systemd/system.attached instead
of /etc/systemd/system.attached/foo.service.
It still works because it's later moved in the right place.
But as a side effect, it tries the create the file in the parent directory
which is /etc/systemd, and it case of read-only filesystems it fails.

5 years agoselinux: check mac_selinux_init() in tests
Christian Göttsche [Thu, 25 Jun 2020 12:36:49 +0000 (14:36 +0200)] 
selinux: check mac_selinux_init() in tests

Since bc8d57f2903d mac_selinux_init() is checked and considered fatal
tree-wide.

Coverity complains about it not being checked in the test code.

Follow-up of: #16223
Fixes: CID 1429975
5 years agoMerge pull request #16278 from keszybz/fix-man-links
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 16:38:37 +0000 (18:38 +0200)] 
Merge pull request #16278 from keszybz/fix-man-links

Fix html links

5 years agoMerge pull request #15624 from poettering/hostnamed-instant
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 16:36:56 +0000 (18:36 +0200)] 
Merge pull request #15624 from poettering/hostnamed-instant

hostnamed: stop caching so much

5 years agoMerge pull request #15697 from OhNoMoreGit/fix-path-units
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 16:23:47 +0000 (18:23 +0200)] 
Merge pull request #15697 from OhNoMoreGit/fix-path-units

Recheck PathExists=, PathExistsGlob=, DirectoryNotEmpty= when triggered unit terminates

5 years agoupdate TODO 16096/head
Lennart Poettering [Tue, 2 Jun 2020 08:39:19 +0000 (10:39 +0200)] 
update TODO

5 years agocompress: do something roughly reasonable when building without compressor
Lennart Poettering [Wed, 24 Jun 2020 14:35:10 +0000 (16:35 +0200)] 
compress: do something roughly reasonable when building without compressor

5 years agocoredump: use log_error_errno() where appropriate
Lennart Poettering [Wed, 24 Jun 2020 14:34:36 +0000 (16:34 +0200)] 
coredump: use log_error_errno() where appropriate

5 years agotree-wide: add new HAVE_COMPRESSION compile time flag
Lennart Poettering [Wed, 24 Jun 2020 14:33:41 +0000 (16:33 +0200)] 
tree-wide: add new HAVE_COMPRESSION compile time flag

let's simplify the checks for ZSTD/LZ4/XZ

As suggested:

https://github.com/systemd/systemd/pull/16096#discussion_r440705585

5 years agodocs: document the new journal file format additions
Lennart Poettering [Mon, 1 Jun 2020 22:13:42 +0000 (00:13 +0200)] 
docs: document the new journal file format additions

5 years agodocs: import journal file format docs from fdo wiki
Lennart Poettering [Mon, 1 Jun 2020 20:56:02 +0000 (22:56 +0200)] 
docs: import journal file format docs from fdo wiki

Just an import, with no textual changes (some fixed URLs however)

5 years agojournal: support zstd compression for large objects in journal files
Lennart Poettering [Mon, 1 Jun 2020 21:26:55 +0000 (23:26 +0200)] 
journal: support zstd compression for large objects in journal files

5 years agojournal-file: when individual hash chains grow too large, rotate
Lennart Poettering [Mon, 1 Jun 2020 17:40:30 +0000 (19:40 +0200)] 
journal-file: when individual hash chains grow too large, rotate

Even with the new keyed hash table journal feature: if an attacker
manages to get access to the journal file id it could synthesize records
that result in hash collisions. Let's rotate automatically when we
notice that, so that a new journal file ID is generated, our performance
is restored and the attacker has to guess a new file ID before being
able to trigger the issue again.

That said, untrusted peers should never get access to journal files in
the first case...

5 years agojournal: use a different hash function for each journal file
Lennart Poettering [Fri, 29 May 2020 22:00:50 +0000 (00:00 +0200)] 
journal: use a different hash function for each journal file

This adds a new (incompatible) feature to journal files: if enabled the
hash function used for the hash tables is no longer jenkins hash with a
zero key, but siphash keyed by the file uuid that is included in the
file header anyway. This should make our hash tables more robust against
collision attacks, as long as the attacker has no read access to the
journal files. We switch from jenkins to siphash simply because it's
more well-known and we standardize for the rest of our codebase onto it.

This is hardening in order to make collision attacks harder for clients
that can forge log messages but have no read access to the logs. It has
no effect on clients that have read access.

5 years agojournal: make signature arrays const
Lennart Poettering [Mon, 1 Jun 2020 16:50:33 +0000 (18:50 +0200)] 
journal: make signature arrays const

5 years agojournal: rename hash64() to jenkins_hash64()
Lennart Poettering [Mon, 1 Jun 2020 16:20:41 +0000 (18:20 +0200)] 
journal: rename hash64() to jenkins_hash64()

Let's prefix this with "jenkins_" since it wraps the jenkins hash. We
want to add support for other hash functions to journald soon, hence
better be clear with what this is. In particular as all other symbols
defined by lookup3.h actually are prefixed "jenkins_".

5 years agojournal-file: rename return parameters to ret_xyz
Lennart Poettering [Mon, 1 Jun 2020 16:15:40 +0000 (18:15 +0200)] 
journal-file: rename return parameters to ret_xyz

Let's clean this up a bit, following our usual nomenclature to name
return parameters ret-xyz.

This is mostly a bit of renaming, but there's also some minor other
changes: if we return a pointer to a mmap'ed object plus its offset, in
almost all cases we are happy if either parameter is NULL in case the
caller is not interested in it. Let's fix the remaining case to do this
too, to minimize surprises.

5 years agojournal-file: also show field hash table size in debug output
Lennart Poettering [Fri, 29 May 2020 23:29:37 +0000 (01:29 +0200)] 
journal-file: also show field hash table size in debug output

5 years agojournal-file: simplify boot ID acquiring
Lennart Poettering [Fri, 29 May 2020 22:32:31 +0000 (00:32 +0200)] 
journal-file: simplify boot ID acquiring

5 years agojournal: store NE hash instead of LE hash in Match object
Lennart Poettering [Mon, 1 Jun 2020 16:06:16 +0000 (18:06 +0200)] 
journal: store NE hash instead of LE hash in Match object

We keep converting forth and back though we never need it in LE. Let's
stop doing those conversions hence.

5 years agojournal-file: use FLAGS_SET where appropriate
Lennart Poettering [Fri, 29 May 2020 21:35:25 +0000 (23:35 +0200)] 
journal-file: use FLAGS_SET where appropriate

5 years agojournal: fix definition of _OBJECT_COMPRESSED_MAX
Lennart Poettering [Mon, 1 Jun 2020 22:26:34 +0000 (00:26 +0200)] 
journal: fix definition of _OBJECT_COMPRESSED_MAX

The object flags field is a bitmask, hence don't sloppily define
_OBJECT_COMPRESSED_MAX as one mor than the previous flag. That worked OK
as long as we only had two flags, but will fall apart as soon as we have
three. Let's fix this.

(It's kinda sloppy how the string table is built here, as it will be
quite sparse as soon as we have more enum entries, but let's keep it for
now.)

5 years agomacro: add CONST_MIN() similar to CONST_MAX()
Lennart Poettering [Fri, 29 May 2020 21:27:59 +0000 (23:27 +0200)] 
macro: add CONST_MIN() similar to CONST_MAX()

5 years agoman: reword awkward sentence 16278/head
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 12:41:05 +0000 (14:41 +0200)] 
man: reword awkward sentence

5 years agoman: fix various internal references
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 12:38:21 +0000 (14:38 +0200)] 
man: fix various internal references

Found with linkchecker.

5 years agoman: fix links to various external man pages
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jun 2020 12:37:24 +0000 (14:37 +0200)] 
man: fix links to various external man pages

In cases where we used both die-net and man-pages for the same reference,
I switched to use man-pages everywhere.

5 years agoMerge pull request #16257 from keszybz/two-fuzzer-issues
Lennart Poettering [Thu, 25 Jun 2020 12:40:35 +0000 (14:40 +0200)] 
Merge pull request #16257 from keszybz/two-fuzzer-issues

Two fuzzer issues

5 years agoMerge pull request #16249 from bluca/root_verity_sig
Lennart Poettering [Thu, 25 Jun 2020 11:53:17 +0000 (13:53 +0200)] 
Merge pull request #16249 from bluca/root_verity_sig

Verity: add support for root hash signature

5 years agohostnamed: minimize caching of /etc/hostname, /etc/os-release and /etc/machine-info 15624/head
Lennart Poettering [Tue, 28 Apr 2020 15:42:46 +0000 (17:42 +0200)] 
hostnamed: minimize caching of /etc/hostname, /etc/os-release and /etc/machine-info

Instead of reading these files at startup and never again, let's read
them when we need them. As an optimization (in particular as some of
these files contain the data for many fields at once) let's cache the
results as long as the stat data (i.e. mtime) remains stable.

Also, while we are at it, if we can't read any of these props, let's not
fail everything, but continue without the data.

5 years agohostnamed: don't cache local hostname either
Lennart Poettering [Tue, 28 Apr 2020 15:34:38 +0000 (17:34 +0200)] 
hostnamed: don't cache local hostname either

Querying the current hostname is cheap, hence let's not cache it. That
way it is much less likely we'll return out-of-date data.

5 years agoci: free up some resources on Pipelines
Evgeny Vereshchagin [Thu, 25 Jun 2020 00:46:21 +0000 (02:46 +0200)] 
ci: free up some resources on Pipelines

Now that CIFuzz supports all the sanitizers we use and ALLOWED_BROKEN_TARGETS_PERCENTAGE
we no longer need that bash script.

5 years agoci: switch to Ubuntu Bionic on Semaphore
Evgeny Vereshchagin [Wed, 24 Jun 2020 22:32:00 +0000 (00:32 +0200)] 
ci: switch to Ubuntu Bionic on Semaphore

To judge from the settings page where I was kind of nudged into switching to
Ubuntu 18.04 it looks like Ubuntu Xenial is deprecated there.

5 years agotest-network: remove unused config 16275/head
Yu Watanabe [Thu, 25 Jun 2020 08:30:19 +0000 (17:30 +0900)] 
test-network: remove unused config

5 years agonetwork: deprecate netdevsim support in .netdev config
Yu Watanabe [Thu, 25 Jun 2020 08:26:36 +0000 (17:26 +0900)] 
network: deprecate netdevsim support in .netdev config

Since kernel 5.2, netdevsim creation/destruction via netlink is removed.
So, let's remove the netdevsim support from our documents.

See below commit for more details.
https://github.com/torvalds/linux/commit/e05b2d141fef22cfac1928cf0eb6890e5dae4216