]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agohostname: introduce gethostname_full() and use it in various gethostname() variants 20418/head
Yu Watanabe [Tue, 10 Aug 2021 18:44:24 +0000 (03:44 +0900)] 
hostname: introduce gethostname_full() and use it in various gethostname() variants

4 years agohostname: fix off-by-one issue in gethostname()
Yu Watanabe [Tue, 10 Aug 2021 15:12:40 +0000 (00:12 +0900)] 
hostname: fix off-by-one issue in gethostname()

gethostname() returns null-terminated hostname.

Fixes #20309 and #20417.

4 years agoMerge pull request #20423 from yuwata/dhcp-server-static-lease-outside-pool
Luca Boccassi [Wed, 11 Aug 2021 17:40:00 +0000 (18:40 +0100)] 
Merge pull request #20423 from yuwata/dhcp-server-static-lease-outside-pool

sd-dhcp-server: support static lease outside of pool

4 years agoshared/copy: add a new flag COPY_ALL_XATTRS
Andrej Lajovic [Sun, 8 Aug 2021 23:43:54 +0000 (01:43 +0200)] 
shared/copy: add a new flag COPY_ALL_XATTRS

When the flag COPY_ALL_XATTRS is set, it causes the complete set of xattrs
to be copied. If the flag is unset, only xattrs from the "user" namespace
are copied.

Fixes #17178.

4 years agoMerge pull request #20419 from keszybz/setenv-no-value
Lennart Poettering [Wed, 11 Aug 2021 15:47:45 +0000 (17:47 +0200)] 
Merge pull request #20419 from keszybz/setenv-no-value

Allow --setenv=FOO in various programs

4 years agoactivate: simplify/rework implementation of --setenv 20419/head
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 15:58:17 +0000 (17:58 +0200)] 
activate: simplify/rework implementation of --setenv

Previous implementation is simplified by using the new helper. The new code
does more looping, but considering that it's unlikely that people set more
than a handful of variables through commandline options, this should be OK.

If a variable is specified on the command line, it overrides any automatically
set variable. Effective behaviour was already were like this, because we would
specify two variables, both would be set, and since glibc will return
the first matching entry.
('systemd-socket-activate -E TERM=FOO -l 2000 --inetd -a env' would give
'TERM=FOO TERM=xterm-256color PATH=...', and getenv("TERM") returns "FOO".)
But it's nicer to filter out any duplicate entries and only pass the intended
variable to the child process.

4 years agoMerge pull request #20079 from maanyagoenka/img-support
Lennart Poettering [Wed, 11 Aug 2021 08:02:46 +0000 (10:02 +0200)] 
Merge pull request #20079 from maanyagoenka/img-support

systemd-analyze: root validation and verify support for root arg and discrete images

4 years agotest-network: test static lease outside of pool 20423/head
Yu Watanabe [Wed, 11 Aug 2021 07:42:06 +0000 (16:42 +0900)] 
test-network: test static lease outside of pool

4 years agosd-dhcp-server: support static lease outside of address pool
Yu Watanabe [Wed, 11 Aug 2021 07:18:45 +0000 (16:18 +0900)] 
sd-dhcp-server: support static lease outside of address pool

Closes #20341.

4 years agosd-dhcp-server: fix possible double-free or use-after-free
Yu Watanabe [Wed, 11 Aug 2021 07:20:35 +0000 (16:20 +0900)] 
sd-dhcp-server: fix possible double-free or use-after-free

4 years agosd-dhcp-server: use hashmap_ensure_put()
Yu Watanabe [Wed, 11 Aug 2021 06:25:20 +0000 (15:25 +0900)] 
sd-dhcp-server: use hashmap_ensure_put()

4 years agoGet rid of dangling setutxent()
MertsA [Wed, 11 Aug 2021 03:54:50 +0000 (20:54 -0700)] 
Get rid of dangling setutxent()

utmp_wall() and utmp_put_dead_process() called setutxent() directly instead of the stub in utmp-wtmp.h and never called endutxent(). This would leave /run/utmp left open by PID 1 or journald. This can be reproduced by e.g. lsof /run/utmp and systemd-cat -p 0 echo test. For utmp_put_dead_process() it would only leave it open if it returned early before calling write_utmp_wtmp()

4 years agoactivate: use global variable instead of passing char **envp around
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 15:34:07 +0000 (17:34 +0200)] 
activate: use global variable instead of passing char **envp around

The effect should be the same, but the code is less verbose.
In particular, the variable was called envp in parts of the code,
but in other parts, we had a local envp variable, and envp was called
env.

4 years agomachinectl: allow --setenv=FOO
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 15:28:47 +0000 (17:28 +0200)] 
machinectl: allow --setenv=FOO

4 years agorun: allow --setenv=FOO
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 15:25:47 +0000 (17:25 +0200)] 
run: allow --setenv=FOO

4 years agohomectl: allow --setenv=FOO
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 15:19:31 +0000 (17:19 +0200)] 
homectl: allow --setenv=FOO

4 years agonspawn: allow --setenv=FOO as equivalent to --setenv=FOO=$FOO
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 15:11:56 +0000 (17:11 +0200)] 
nspawn: allow --setenv=FOO as equivalent to --setenv=FOO=$FOO

systemd-socket-activate has supported such a mode since
5e65c93a433447b15180249166f7b3944c3e6156. '--setenv=FOO=$FOO' is a fairly
common use in scripts, and it's nicer to do this automatically without worrying
about quoting and whatnot.

https://github.com/systemd/mkosi/pull/765 added the same to 'mkosi --environment='.

4 years agobasic/env-util: add a mode where we pull in the variable value from environment
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 15:03:12 +0000 (17:03 +0200)] 
basic/env-util: add a mode where we pull in the variable value from environment

4 years agotest-env-util: extend the test for strv_env_merge() a bit
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 14:53:00 +0000 (16:53 +0200)] 
test-env-util: extend the test for strv_env_merge() a bit

4 years agoAdd implicit sentinel to strv_env_merge()
Zbigniew Jędrzejewski-Szmek [Sat, 7 Aug 2021 08:16:19 +0000 (10:16 +0200)] 
Add implicit sentinel to strv_env_merge()

Just to make it a tiny bit nicer to use.

4 years agoalloc-util: make mfree() typesafe
Lennart Poettering [Tue, 10 Aug 2021 12:36:00 +0000 (14:36 +0200)] 
alloc-util: make mfree() typesafe

Make sure we return the same type as we accept.

One incorrect use of mfree() is discovered and fixed this way.

4 years agoMerge pull request #20414 from yuwata/sd-dhcp6-client-trivial-fixes
Luca Boccassi [Tue, 10 Aug 2021 19:32:29 +0000 (20:32 +0100)] 
Merge pull request #20414 from yuwata/sd-dhcp6-client-trivial-fixes

sd-dhcp6-client: several fixes and cleanups

4 years agoMerge pull request #20413 from poettering/mempmen
Luca Boccassi [Tue, 10 Aug 2021 19:31:36 +0000 (20:31 +0100)] 
Merge pull request #20413 from poettering/mempmen

add and use mempmem_safe()

4 years agocore: don't go to disk for masked unit state if we know it anyway
Lennart Poettering [Tue, 10 Aug 2021 12:50:54 +0000 (14:50 +0200)] 
core: don't go to disk for masked unit state if we know it anyway

This should speed up our selinux checks a bit, since in most cases we
already know if a unit is masked, so use that info.

4 years agosystemd-analyze: add root to find and verify executable 20079/head
Maanya Goenka [Wed, 4 Aug 2021 19:00:31 +0000 (12:00 -0700)] 
systemd-analyze: add root to find and verify executable

4 years agopath-util: teach find_executable_full how to look into the root directory
Maanya Goenka [Wed, 4 Aug 2021 18:59:45 +0000 (11:59 -0700)] 
path-util: teach find_executable_full how to look into the root directory

When the root parameter in find_executable_full is set, chase_symlinks prefixes this root
to every check of the path name to find the complete path of the execuatble in case the
path provided is not absolute. This is only done for the non NULL root because otherwise
the chase_symlinks function would alter the behavior of some of the callers which would
in turn alter the outputs in a way that is undesirable. The find_execuatble_full function is
invoked by the verify_executable function in analyze-verify.

4 years agounits: added factory-reset.target
Yegor Alexeyev [Sun, 25 Jul 2021 02:20:27 +0000 (05:20 +0300)] 
units: added factory-reset.target

4 years agoresolved: Don't omit AD bit in reply if DO is set in the query
Jack Dähn [Tue, 3 Aug 2021 06:07:05 +0000 (08:07 +0200)] 
resolved: Don't omit AD bit in reply if DO is set in the query

Set the AD bit in the response if the data is authenticated and AD or DO is set in the query, as suggested by section 5.8 of RFC6840.

Fixes #20332

4 years agotest: fix TEST-10-ISSUE-2467
Michael Biebl [Mon, 9 Aug 2021 17:45:48 +0000 (19:45 +0200)] 
test: fix TEST-10-ISSUE-2467

Depending on the timing, socat will either get ECONNREFUSED oder EPIPE
from systemd. The latter will cause it to exit(1) and subsequently the
test to fail.
We are not actually interested in the return code of socat though. The
test is supposed to check, whether rate limiting of a socket unit works
properly.

So ignore any failures from the socat invocation and instead check, if
test10.socket is in state "failed" with result "trigger-limit-hit" after
it has been triggered.

TriggerLimitIntervalSec= by default is set to 2s. A "sleep 10" should
give systemd enough time even on slower machines, to reach the trigger
limit.

For better readability, break the test into separate ExecStart lines.

Fixes #19154.

4 years agoupdate TODO
Lennart Poettering [Tue, 10 Aug 2021 12:35:42 +0000 (14:35 +0200)] 
update TODO

4 years agosd-dhcp6-client: use SYNTHETIC_ERRNO() 20414/head
Yu Watanabe [Tue, 10 Aug 2021 12:57:42 +0000 (21:57 +0900)] 
sd-dhcp6-client: use SYNTHETIC_ERRNO()

4 years agotree-wide: use memmem_safe() 20413/head
Lennart Poettering [Tue, 10 Aug 2021 12:39:57 +0000 (14:39 +0200)] 
tree-wide: use memmem_safe()

Let's be paranoid and do something useful if we operate with empty
haystack/needle. This doesn't actually fix anything, as the places as
far as I can see check for non-emptyness already beforehand, but I will
sleep safer at night, if we don't even allow the trap to be fallen in,
ever, even if the code is changed sooner or later.

4 years agomemory-util: add mempmem_safe()
Lennart Poettering [Tue, 10 Aug 2021 12:37:00 +0000 (14:37 +0200)] 
memory-util: add mempmem_safe()

This is like memmem_safe() but returns a pointer after the needle,
instead to the beginning of the needle.

This is then used at one place. Not much, but it makes me sleep safer at
night, as it avoids the manual counting done so far.

4 years agosd-dhcp6-client: cirtainly adjust T1 and T2
Yu Watanabe [Tue, 10 Aug 2021 12:39:27 +0000 (21:39 +0900)] 
sd-dhcp6-client: cirtainly adjust T1 and T2

This fixes a bug introduced by 99f1d3fc5043b33dea5faa88f7015a487965333f.
Note that in the information requesting mode, the lease has neither
addresses nor PD prefixes.

4 years agosd-dhcp6-client: fix copy-and-paste mistake
Yu Watanabe [Tue, 10 Aug 2021 12:36:04 +0000 (21:36 +0900)] 
sd-dhcp6-client: fix copy-and-paste mistake

Fix bug introduced by b47fb949b338a8e77be789542fffb8c86da79284.

4 years agofstab-generator: put What= before Where=
Zbigniew Jędrzejewski-Szmek [Tue, 10 Aug 2021 06:37:50 +0000 (08:37 +0200)] 
fstab-generator: put What= before Where=

All units in units/ follow this pattern, as do all other generators that we
provide. The question of the order was raised in
https://github.com/systemd/zram-generator/pull/90#discussion_r684965984,
and I think it's nice to make it consistent everywhere
(What= before Where= matches mount(8) and fstab(5)).

4 years agoMerge pull request #19959 from yuwata/udev-reduce-loop
Lennart Poettering [Tue, 10 Aug 2021 11:28:48 +0000 (13:28 +0200)] 
Merge pull request #19959 from yuwata/udev-reduce-loop

udev: reduce number of times checking event dependency

4 years agoMerge pull request #20410 from yuwata/network-ndisc-cleanups
Yu Watanabe [Tue, 10 Aug 2021 10:44:39 +0000 (19:44 +0900)] 
Merge pull request #20410 from yuwata/network-ndisc-cleanups

network: several NDisc cleanups

4 years agoMerge pull request #19939 from yuwata/network-dhcp-client-use-request-queue
Yu Watanabe [Tue, 10 Aug 2021 10:44:14 +0000 (19:44 +0900)] 
Merge pull request #19939 from yuwata/network-dhcp-client-use-request-queue

network: use request queue to configure DHCP clients

4 years agoMerge pull request #19901 from yuwata/network-reconfigure-after-sleep
Yu Watanabe [Tue, 10 Aug 2021 10:43:54 +0000 (19:43 +0900)] 
Merge pull request #19901 from yuwata/network-reconfigure-after-sleep

network: reconfigure interface after coming back from sleep

4 years agosystemd-analyze: support discrete images for 'verify' verb
Maanya Goenka [Wed, 30 Jun 2021 17:02:51 +0000 (10:02 -0700)] 
systemd-analyze: support discrete images for 'verify' verb

Adding --image parameter for verify verb using the dissect image functionality

-----------------------------------------------------------------------------------
Example Run:

I created a unit service file testrun.service with an invalid key-value pairing
(foo = bar) and a squashfs image run.raw to test the code.

maanya-goenka@debian:~/systemd (img-support)$ cat <<EOF>img/usr/lib/systemd/system/testrun.service
> [Unit]
> foo = bar
>
> [Service]
> ExecStart = /opt/script0.sh
> EOF

maanya-goenka@debian:~/systemd (img-support)$ mksquashfs img/ run.raw
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on run.raw, block size 131072.
[==============================================================================================================================|] 6/6 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
        compressed data, compressed metadata, compressed fragments, compressed xattrs
        duplicates are removed
Filesystem size 0.60 Kbytes (0.00 Mbytes)
        52.32% of uncompressed filesystem size (1.14 Kbytes)
Inode table size 166 bytes (0.16 Kbytes)
        43.01% of uncompressed inode table size (386 bytes)
Directory table size 153 bytes (0.15 Kbytes)
        58.40% of uncompressed directory table size (262 bytes)
Number of duplicate files found 1
Number of inodes 12
Number of files 6
Number of fragments 1
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 6
Number of ids (unique uids + gids) 1
Number of uids 1
        maanya-goenka (1000)
Number of gids 1
        maanya-goenka (1000)
maanya-goenka@debian:~/systemd (img-support)$ sudo build/systemd-analyze verify --image=run.raw testrun.service
/tmp/.#systemd-analyzec71c7297a936b91c/usr/lib/systemd/system/testrun.service:2: Unknown key name 'foo' in section 'Unit', ignoring.
testrun.service: Failed to create testrun.service/start: Unit sysinit.target not found.

The 'Unit sysinit.target not found' error that we see here is due to recursive dependency searching during
unit loading and has been addressed in a different PR:
systemd-analyze: add option to return an error value when unit verification fails #20233

4 years agosystemd-analyze: add --root option for 'verify' verb and allow path parsing
Maanya Goenka [Wed, 30 Jun 2021 16:57:54 +0000 (09:57 -0700)] 
systemd-analyze: add --root option for 'verify' verb and allow path parsing

-------------------------------------------------------------------------------
Example Run:

foobar.service created below is a service unit file that has a non-existing key-value
pairing (foo = bar) and is thus, syntactically invalid.

maanya-goenka@debian:~/systemd (img-support)$ cat <<EOF>img/usr/lib/systemd/system/foobar.service
> [Unit]
> foo = bar
>
> [Service]
> ExecStart = /opt/script0.sh
> EOF

The failure to create foobar.service because of the recursive dependency searching and verification has been addressed
in a different PR: systemd-analyze: add option to return an error value when unit verification fails #20233

maanya-goenka@debian:~/systemd (img-support)$ sudo build/systemd-analyze verify --root=img/ foobar.service
/home/maanya-goenka/systemd/img/usr/lib/systemd/system/foobar.service:2: Unknown key name 'foo' in section 'Unit', ignoring.
foobar.service: Failed to create foobar.service/start: Unit sysinit.target not found.

4 years agosystemd-analyze: validate root argument
Maanya Goenka [Wed, 30 Jun 2021 16:28:19 +0000 (09:28 -0700)] 
systemd-analyze: validate root argument

4 years agoudev: skip event when its dependency cannot be checked 19959/head
Yu Watanabe [Thu, 17 Jun 2021 08:14:10 +0000 (17:14 +0900)] 
udev: skip event when its dependency cannot be checked

4 years agoudev: do not try to find blocker again when no blocker found previously
Yu Watanabe [Thu, 17 Jun 2021 07:57:32 +0000 (16:57 +0900)] 
udev: do not try to find blocker again when no blocker found previously

4 years agolist: introduce LIST_FOREACH_BACKWARDS() macro and drop LIST_FOREACH_AFTER/BEFORE()
Yu Watanabe [Thu, 17 Jun 2021 07:12:06 +0000 (16:12 +0900)] 
list: introduce LIST_FOREACH_BACKWARDS() macro and drop LIST_FOREACH_AFTER/BEFORE()

4 years agoudev: rename is_device_busy() -> event_is_blocked()
Yu Watanabe [Thu, 17 Jun 2021 07:14:01 +0000 (16:14 +0900)] 
udev: rename is_device_busy() -> event_is_blocked()

Also this rename delaying_seqnum -> blocker_seqnum.

4 years agoudev: do not try to process events if there is no free worker
Yu Watanabe [Thu, 17 Jun 2021 06:51:34 +0000 (15:51 +0900)] 
udev: do not try to process events if there is no free worker

4 years agoudev: propagate error on spawning a worker
Yu Watanabe [Thu, 17 Jun 2021 06:47:34 +0000 (15:47 +0900)] 
udev: propagate error on spawning a worker

4 years agoudev: add usec_add() at one more place
Yu Watanabe [Thu, 17 Jun 2021 06:41:20 +0000 (15:41 +0900)] 
udev: add usec_add() at one more place

4 years agoudev: make event_queue_start() return negative errno on error
Yu Watanabe [Thu, 17 Jun 2021 06:29:02 +0000 (15:29 +0900)] 
udev: make event_queue_start() return negative errno on error

4 years agoudev: make event_free() return NULL
Yu Watanabe [Thu, 17 Jun 2021 06:21:27 +0000 (15:21 +0900)] 
udev: make event_free() return NULL

4 years agoudev: update log message to clarify that the error is ignored
Yu Watanabe [Wed, 16 Jun 2021 12:02:01 +0000 (21:02 +0900)] 
udev: update log message to clarify that the error is ignored

4 years agoudev: move several functions
Yu Watanabe [Thu, 17 Jun 2021 06:14:59 +0000 (15:14 +0900)] 
udev: move several functions

No functional chage.

4 years agoudev: also rename struct udev_ctrl -> UdevCtrl
Yu Watanabe [Wed, 16 Jun 2021 10:18:56 +0000 (19:18 +0900)] 
udev: also rename struct udev_ctrl -> UdevCtrl

4 years agoudev: rename type name e.g. struct worker -> Worker
Yu Watanabe [Wed, 16 Jun 2021 10:05:39 +0000 (19:05 +0900)] 
udev: rename type name e.g. struct worker -> Worker

4 years agonetwork: use usec_add() at several more places 20410/head
Yu Watanabe [Wed, 30 Jun 2021 21:42:55 +0000 (06:42 +0900)] 
network: use usec_add() at several more places

4 years agonetwork: make IPv6Token private, and ipv6token_new() static
Yu Watanabe [Wed, 30 Jun 2021 21:37:44 +0000 (06:37 +0900)] 
network: make IPv6Token private, and ipv6token_new() static

4 years agonetwork: ndisc: update a log message
Yu Watanabe [Wed, 30 Jun 2021 19:12:20 +0000 (04:12 +0900)] 
network: ndisc: update a log message

Also slightly rename functions.

4 years agonetwork: adjust log messages 19939/head
Yu Watanabe [Tue, 10 Aug 2021 06:04:01 +0000 (15:04 +0900)] 
network: adjust log messages

Follow-up for #19944.

4 years agonetwork: DHCP[46] -> DHCPv[46] in log messages
Yu Watanabe [Tue, 10 Aug 2021 06:02:35 +0000 (15:02 +0900)] 
network: DHCP[46] -> DHCPv[46] in log messages

4 years agonetwork: use request queue to configure DHCP{4,6} clients
Yu Watanabe [Tue, 15 Jun 2021 14:24:46 +0000 (23:24 +0900)] 
network: use request queue to configure DHCP{4,6} clients

Previously, when UUID is requested for DUID, then the clients are
configured in callback of bus methods.
But now, 'request queue' was implemented, so we can use it to wait until
the product UUID is obtained.

4 years agonetwork: do not request UUID frequently on failure
Yu Watanabe [Tue, 15 Jun 2021 13:20:16 +0000 (22:20 +0900)] 
network: do not request UUID frequently on failure

If many interfaces request UUID, and networkd cannot get it for some
reasons, then previously we call the DBus method so frequently.

4 years agonetwork: downgrade log level in dhcp6_configure()
Yu Watanabe [Tue, 15 Jun 2021 13:16:51 +0000 (22:16 +0900)] 
network: downgrade log level in dhcp6_configure()

And make the callers warn about failures.

4 years agonetwork: downgrade log level in dhcp4_configure()
Yu Watanabe [Tue, 15 Jun 2021 13:07:42 +0000 (22:07 +0900)] 
network: downgrade log level in dhcp4_configure()

And make the callers warn about failures.

4 years agotest-network: add a testcase to enter unmanaged state on reconfiguring 19901/head
Yu Watanabe [Tue, 15 Jun 2021 02:57:40 +0000 (11:57 +0900)] 
test-network: add a testcase to enter unmanaged state on reconfiguring

4 years agonetwork: drop configurations in the previous .network file when entering unmanaged...
Yu Watanabe [Sun, 13 Jun 2021 21:58:06 +0000 (06:58 +0900)] 
network: drop configurations in the previous .network file when entering unmanaged state

When reconfiguring an interface and it will enter unmanaged state,
let's drop configurations from the previously assigned .network file.

4 years agonetwork: do not drop foreign configs for loopback and critical interfaces on carrier...
Yu Watanabe [Sun, 13 Jun 2021 22:13:58 +0000 (07:13 +0900)] 
network: do not drop foreign configs for loopback and critical interfaces on carrier lost

4 years agonetwork: do not drop foreign configs based on the previous .network file
Yu Watanabe [Sun, 13 Jun 2021 22:04:18 +0000 (07:04 +0900)] 
network: do not drop foreign configs based on the previous .network file

`link_drop_foreign_config()` will be called later in link_configure().

4 years agonetwork: start/stop LLDP client on carrier gained/lost
Yu Watanabe [Sat, 12 Jun 2021 03:26:37 +0000 (12:26 +0900)] 
network: start/stop LLDP client on carrier gained/lost

Then, link_acquire_dynamic_conf() matches link_stop_engines().
Previously, LLDP client is started on interface is up, and stopped
on both down and carrier loss.

4 years agonetwork: reconfigure link after coming back from sleep
Yu Watanabe [Sat, 12 Jun 2021 03:01:42 +0000 (12:01 +0900)] 
network: reconfigure link after coming back from sleep

Previously, link was reconfigured with `link_carrier_reset()`, but it
just re-request to configure static addresses, routes, etc, and restart
engines (e.g. DHCP client).
However, after coming back from sleep, several link information may be
changed, especially the wifi access point may be different. So, we may
need to reconfigure the interface.

4 years agoUpdate traditional Chinese Translation
Tianlu Shao [Tue, 10 Aug 2021 05:21:51 +0000 (13:21 +0800)] 
Update traditional Chinese Translation

Fix the wrong translation and fill in the new translation.

4 years agohwdb: Add Lenovo Thinkpad P14s Gen1/2 rule
svonohr [Mon, 9 Aug 2021 16:35:07 +0000 (18:35 +0200)] 
hwdb: Add Lenovo Thinkpad P14s Gen1/2 rule

4 years agotest: use a correct kernel binary on ppc64le machines
Frantisek Sumsal [Mon, 9 Aug 2021 12:32:43 +0000 (14:32 +0200)] 
test: use a correct kernel binary on ppc64le machines

Ubuntu calls the kernel binary as `vmlinux-*`, but RHEL/CentOS uses
the "standard" `vmlinuz-` prefix.

Follow-up to eaa602cb14217f2623c9c8c44b6f3012dc4d0b24.

4 years agotimesync: add option to periodically save time
Dimitry Ishenko [Wed, 7 Jul 2021 17:54:47 +0000 (13:54 -0400)] 
timesync: add option to periodically save time

4 years agopid1: add support for cgroup.kill
Albert Brox [Tue, 20 Jul 2021 22:24:20 +0000 (18:24 -0400)] 
pid1: add support for cgroup.kill

4 years agoFix the "Failed to open random seed ..." message.
longpanda [Thu, 5 Aug 2021 01:31:44 +0000 (09:31 +0800)] 
Fix the "Failed to open random seed ..." message.

When boot ArchLinux from Ventoy, it always print `Failed to open random seed file: write protected.`
As Ventoy emulate the ISO file as a read-only CDROM, I didn't test with a real physical CDROM drive, but maybe it also has such problem.
As we use `EFI_FILE_MODE_WRITE`  to open the `loader\random-seed` file, so I think it's better to check the result with both  `EFI_WRITE_PROTECTED` and `EFI_NOT_FOUND`.

4 years agonetwork: use monotonic instead of boot time to handle address creation/update timestamp
Yu Watanabe [Fri, 6 Aug 2021 10:37:16 +0000 (19:37 +0900)] 
network: use monotonic instead of boot time to handle address creation/update timestamp

Follow-up for 25db3aeaf32ba95bad5e765720ebc23c8ef77a99 and 899034ba8167bd16e802cfbea29a9ee85dee5be5.

Fixes another issue in #20244.

4 years agoUpdate 60-autosuspend-fingerprint-reader.hwdb to libfprint-1.92.1
StefanBruens [Fri, 6 Aug 2021 18:56:58 +0000 (20:56 +0200)] 
Update 60-autosuspend-fingerprint-reader.hwdb to libfprint-1.92.1

4 years agoman systemd-sysusers: fix password to passwd
GnunuX [Fri, 6 Aug 2021 18:05:18 +0000 (20:05 +0200)] 
man systemd-sysusers: fix password to passwd

4 years agoMerge pull request #20395 from takaswie/topic/correct-ieee1394-hwdb-entries
Zbigniew Jędrzejewski-Szmek [Mon, 9 Aug 2021 08:12:11 +0000 (10:12 +0200)] 
Merge pull request #20395 from takaswie/topic/correct-ieee1394-hwdb-entries

hwdb: ieee1394-unit-function: correct entries for some models

4 years agoMerge pull request #20399 from mrc0mmand/test-tweaks
Zbigniew Jędrzejewski-Szmek [Mon, 9 Aug 2021 08:06:23 +0000 (10:06 +0200)] 
Merge pull request #20399 from mrc0mmand/test-tweaks

test: yet another fix for ASan detection

4 years agotest: skip a harmless ldd error when installing test libs
Frantisek Sumsal [Sun, 8 Aug 2021 21:47:31 +0000 (23:47 +0200)] 
test: skip a harmless ldd error when installing test libs

Skip a harmless error when running the tests on a system with a significantly
older systemd version (ldd tries to resolve the unprefixed RPATH for libsystemd.so.0,
which is in this case older than the already installed libsystemd.so.0 in $initdir).
The issue is triggered by installing test dependencies in install_missing_libraries().

Spotted on CentOS 8.

```
$ ldd /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread
/var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread: /lib64/libsystemd.so.0: version `LIBSYSTEMD_240' not found (required by /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread)
        linux-vdso64.so.1 (0x00007fffb79d0000)
        libclang_rt.asan-powerpc64le.so => /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.asan-powerpc64le.so (0x00007fffb6ef0000)
        libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fffb6d20000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fffb6cd0000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fffb6ab0000)

$ LD_LIBRARY_PATH=/var/tmp/systemd-test.nZO11F/root/lib64/ ldd /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread
        linux-vdso64.so.1 (0x00007fffaba80000)
        libclang_rt.asan-powerpc64le.so => /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.asan-powerpc64le.so (0x00007fffaafa0000)
        libsystemd.so.0 => /var/tmp/systemd-test.nZO11F/root/lib64/libsystemd.so.0 (0x00007fffaa5f0000)
        libpthread.so.0 => /var/tmp/systemd-test.nZO11F/root/lib64/libpthread.so.0 (0x00007fffaa5a0000)
        libc.so.6 => /var/tmp/systemd-test.nZO11F/root/lib64/libc.so.6 (0x00007fffaa380000)

```

4 years agotest: make busybox TEST-13-only dependency 20399/head
Frantisek Sumsal [Sun, 8 Aug 2021 17:42:25 +0000 (19:42 +0200)] 
test: make busybox TEST-13-only dependency

to make running other tests a bit easier on distributions which don't have
busybox in repositories (CentOS).

4 years agotest: yet another fix for ASan detection
Frantisek Sumsal [Sun, 8 Aug 2021 17:33:10 +0000 (19:33 +0200)] 
test: yet another fix for ASan detection

This time for ppc64le:

```
100737c4: 5d 55 f9 4b  bl      10008d20 <00000024.plt_call.__asan_report_load8>
100737f4: 4d 55 f9 4b  bl      10008d40 <00000024.plt_call.__asan_handle_no_return>
10073884: 5d 50 f9 4b  bl      100088e0 <00000024.plt_call.__asan_init>
1007388c: 75 54 f9 4b  bl      10008d00 <00000024.plt_call.__asan_version_mismatch_check_v8>
100738a0: 41 36 f9 4b  bl      10006ee0 <00000024.plt_call.__asan_register_globals>
100738f0: 71 4c f9 4b  bl      10008560 <00000024.plt_call.__asan_unregister_globals>
```

4 years agotest: attempt to install only kernel modules for each subsystem
Frantisek Sumsal [Sun, 8 Aug 2021 11:18:18 +0000 (13:18 +0200)] 
test: attempt to install only kernel modules for each subsystem

When `linux-headers` is installed on Arch Linux, it stores the module
source tree in the kernel module directory, which is then picked up by
`find` and we get a lot of harmless but annoying errors:

```
...
modprobe: FATAL: Module Kconfig.iosched not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module Kconfig not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module Kconfig not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module dm-mpath.h not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module dm-bio-prison-v2.h not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module raid0.h not found in directory /lib/modules/5.13.7-arch1-1
...
```

Let's fix this by trying to install only kernel modules (*.ko files with
an optional compression).

4 years agohwdb: ieee1394-unit-function: correct entries for eAR Master One and Terratec Aureon... 20395/head
Takashi Sakamoto [Sat, 7 Aug 2021 23:37:46 +0000 (08:37 +0900)] 
hwdb: ieee1394-unit-function: correct entries for eAR Master One and Terratec Aureon 7.1 FireWire

The configuration ROM of Acoustic Reality eAR Master One, Eroica, Figaro,
and Ciaccona has OUI for TerraTec Electronic GmbH in its vendor ID field.
As a result, modalias for the unit is the same as Terratec Electronic
Aureon 7.1 FireWire.

Linux FireWire subsystem adds the same modalias for units of the models.
ALSA bebob driver had duplicated entries for them and was changed at
Linux kernel v5.14 to remove the duplicated entries.

It's better to improve corresponding entries in systemd hwdb, while
it's impossible to distinguish the models by modalias and force to use
the same entry for them. As last resort, this commit selects more
popular model, Aureon 7.1 FireWire for ID_VENDOR_FROM_DATABASE and
ID_MODEL_FROM_DATABASE.

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a07ebc7e050ccdfec508449b2ef8f2b2aa90927b
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 years agohwdb: ieee1394-unit-function: correct comment for Mackie d.2 and d.2 Pro
Takashi Sakamoto [Sat, 7 Aug 2021 23:37:46 +0000 (08:37 +0900)] 
hwdb: ieee1394-unit-function: correct comment for Mackie d.2 and d.2 Pro

I had misunderstanding that BridgeCo ASIC would be used for extension
option for Mackie d.2 and OXFW971 would be used for Mackie d.2 Pro like
Mackie d.4 Pro. However, it's clear that the latter is model with
pre-installed option.

This commit fixes commit to entry for Mackie d.2. I note that the modalias
of unit of Mackie d.4 Pro is still unidentified.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 years agohwdb: ieee1394-unit-function: correct comment for Mackie Onyx-i series
Takashi Sakamoto [Sat, 7 Aug 2021 23:37:46 +0000 (08:37 +0900)] 
hwdb: ieee1394-unit-function: correct comment for Mackie Onyx-i series

Some Mackie Onyx-i models are known to have two revisions at least, which
use different ASICS; Oxford Semiconductor FW971 and TC Applied
Technologies TCD2210. I misunderstand that Onyx 1640i had not such
revisions.

This commit fixes comment to entry for the model.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 years agohwdb: ieee1394-unit-function: correct entries for Phonic products
Takashi Sakamoto [Sat, 7 Aug 2021 23:37:46 +0000 (08:37 +0900)] 
hwdb: ieee1394-unit-function: correct entries for Phonic products

Some of Phonic Firefly series and Helix Board series have the same
combination of vendor ID, model ID, specifier ID, and software
version in their configuration ROM. On the other hand, the other models
have unique combination.

ALSA bebob driver in Linux kernel v5.14 was changed in its modalias table
for the models.

This commit fixes systemd hwdb for the models.

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1586d461f641b60040438275e14c7dbcec5907d6
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 years agoMerge pull request #20384 from keszybz/udev-code-modernization
Luca Boccassi [Sat, 7 Aug 2021 11:06:00 +0000 (12:06 +0100)] 
Merge pull request #20384 from keszybz/udev-code-modernization

Various minor refactorings (basic/log, udev, cryptsetup-tokens)

4 years agoudev/builtins: make skip_subsystem() and skip_virtio() alike 20384/head
Zbigniew Jędrzejewski-Szmek [Tue, 3 Aug 2021 14:49:05 +0000 (16:49 +0200)] 
udev/builtins: make skip_subsystem() and skip_virtio() alike

The two functions do not implement identical logic, so they shouldn't
have identical structure, but let's make them both a bit simpler and
more alike.

4 years agoudev/builtins: inline iterator variables and other small modernizations
Zbigniew Jędrzejewski-Szmek [Tue, 3 Aug 2021 14:47:37 +0000 (16:47 +0200)] 
udev/builtins: inline iterator variables and other small modernizations

4 years agoudev-builtin-input_ic: simplify loop in test_key()
Zbigniew Jędrzejewski-Szmek [Mon, 2 Aug 2021 13:44:56 +0000 (15:44 +0200)] 
udev-builtin-input_ic: simplify loop in test_key()

We would update 'found' using bit operations, but studiously ignore the actual
value and treat it as boolean. So just use a boolean variable instead. Because
there is a double loop, we would break the inner loop, but repeat the outer
loop, even though the boolean was already set. Add '&& !found' in the loop
conditions to break iteration immediately.

4 years agotest-log: move logging call where we can still see it
Zbigniew Jędrzejewski-Szmek [Tue, 3 Aug 2021 14:09:52 +0000 (16:09 +0200)] 
test-log: move logging call where we can still see it

We crank the level up in the loop, so we wouldn't see message
from log_info_errno().

Also move the loop iterator declaration inline.

4 years agocryptsetup-tokens: inline one interator variable declaration
Zbigniew Jędrzejewski-Szmek [Mon, 26 Jul 2021 12:57:09 +0000 (14:57 +0200)] 
cryptsetup-tokens: inline one interator variable declaration

4 years agobasic/log: invert loop to avoid repeated evaluation of condition
Zbigniew Jędrzejewski-Szmek [Tue, 3 Aug 2021 14:14:51 +0000 (16:14 +0200)] 
basic/log: invert loop to avoid repeated evaluation of condition

4 years agobasic/log: use structured initialization, drop unused initialization
Zbigniew Jędrzejewski-Szmek [Mon, 26 Jul 2021 12:56:34 +0000 (14:56 +0200)] 
basic/log: use structured initialization, drop unused initialization

We had 'msghdr' and 'mh' in various places. Now 'const struct msghdr msghdr' is
used consistently. With structured init the variable is only used in the call
to sendmsg(), so let's make it a bit more descriptive.

4 years agosd-boot: time measurements for the ARM64
Max Resch [Wed, 4 Aug 2021 15:23:27 +0000 (17:23 +0200)] 
sd-boot: time measurements for the ARM64
This adds assembly to read the platform timer from the CP15 coprocessor
register `cntpct_el0` and the frequency from `cntfrq_el0`

4 years agocryptsetup: validate optional tpm2 pcr bank field in token.
Ondrej Kozina [Wed, 4 Aug 2021 09:38:20 +0000 (11:38 +0200)] 
cryptsetup: validate optional tpm2 pcr bank field in token.