]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agobootctl: Add set-timeout verb 20776/head
Jan Janssen [Mon, 4 Oct 2021 09:25:50 +0000 (11:25 +0200)] 
bootctl: Add set-timeout verb

Fixes: #18766
4 years agosd-boot: Allow disabling timeout
Jan Janssen [Thu, 16 Sep 2021 08:25:10 +0000 (10:25 +0200)] 
sd-boot: Allow disabling timeout

4 years agotest: make OpenSSL checks optional in TEST-50-DISSECT
Luca Boccassi [Wed, 6 Oct 2021 23:26:26 +0000 (00:26 +0100)] 
test: make OpenSSL checks optional in TEST-50-DISSECT

If the packages are built without libssl simply skip the signature
checks.

Oct 06 21:21:32 H systemd[1]: systemd 249.1249.gcc4df1f787.0 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL
...
Oct 06 21:22:21 H systemd[459]: Activation of signed Verity volume worked neither via the kernel nor in userspace, can't activate.

Follow-up for #20691

4 years agoMerge pull request #20926 from yuwata/udev-net-wol-sopass
Luca Boccassi [Wed, 6 Oct 2021 22:36:05 +0000 (23:36 +0100)] 
Merge pull request #20926 from yuwata/udev-net-wol-sopass

udev/net: introduce WakeOnLanPassword=

4 years agotest: test udev with a _very_ long device name
Frantisek Sumsal [Fri, 1 Oct 2021 11:56:25 +0000 (13:56 +0200)] 
test: test udev with a _very_ long device name

Let's attempt to provide some coverage for #16161, #6867, and similar.

4 years agocoredump: Don't log an error if D-Bus isn't running
Daan De Meyer [Wed, 6 Oct 2021 12:20:36 +0000 (13:20 +0100)] 
coredump: Don't log an error if D-Bus isn't running

coredumpctl could be used in a chroot where D-Bus isn't running. If
that's the case, we shouldn't consider it an error if we can't connect
to the D-Bus daemon so let's reduce the severity of the error we log
when we can't connect to D-Bus because the socket doesn't exist.

4 years agoMerge pull request #20935 from unusual-thoughts/fix-empty-argv
Yu Watanabe [Wed, 6 Oct 2021 16:53:51 +0000 (01:53 +0900)] 
Merge pull request #20935 from unusual-thoughts/fix-empty-argv

Fix #20933

4 years agoudev/net: introduce WakeOnLanPassword= 20926/head
Yu Watanabe [Wed, 6 Oct 2021 12:49:58 +0000 (21:49 +0900)] 
udev/net: introduce WakeOnLanPassword=

Closes #20913.

4 years agoMerge pull request #18145 from kinvolk/iaguis/lsm-bpf
Lennart Poettering [Wed, 6 Oct 2021 14:23:27 +0000 (16:23 +0200)] 
Merge pull request #18145 from kinvolk/iaguis/lsm-bpf

Add RestrictFileSystems= property using LSM BPF

4 years agouser-record: disable two pbkdf fields that don't apply for pkbdf2
Lennart Poettering [Tue, 5 Oct 2021 16:24:05 +0000 (18:24 +0200)] 
user-record: disable two pbkdf fields that don't apply for pkbdf2

Fixes: #20830
4 years agoethtool-util: make ethtool_set_wol() take password
Yu Watanabe [Wed, 6 Oct 2021 12:49:39 +0000 (21:49 +0900)] 
ethtool-util: make ethtool_set_wol() take password

4 years agoethtool-util: do not try to enable unsupported WoL options
Yu Watanabe [Wed, 6 Oct 2021 12:44:02 +0000 (21:44 +0900)] 
ethtool-util: do not try to enable unsupported WoL options

4 years agoethtool-util: make wol_options_to_string() not return all flag strings
Yu Watanabe [Tue, 5 Oct 2021 05:59:26 +0000 (14:59 +0900)] 
ethtool-util: make wol_options_to_string() not return all flag strings

4 years agoUpdate 60-sensor.hwdb
chlorophyll-zz [Tue, 5 Oct 2021 03:24:20 +0000 (05:24 +0200)] 
Update 60-sensor.hwdb

#20287 was wrong.
Y Axis was only reversed on Arch Linux because of a problem with iio-sensor-proxy
This restores before the patch.

4 years agocore/service: also check path in exec commands 20935/head
Yu Watanabe [Tue, 5 Oct 2021 15:19:41 +0000 (00:19 +0900)] 
core/service: also check path in exec commands

4 years agoman: add discussion of read-only filesystem support in daemons
Zbigniew Jędrzejewski-Szmek [Sun, 3 Oct 2021 08:49:40 +0000 (10:49 +0200)] 
man: add discussion of read-only filesystem support in daemons

This is inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1853293.  Let's
mention that applications should be prepared for /var being read-only.

4 years agoman: document systemd-analyze filesystems 18145/head
Iago López Galeiras [Mon, 8 Feb 2021 14:10:13 +0000 (15:10 +0100)] 
man: document systemd-analyze filesystems

4 years agoanalyze: add filesystems command
Iago López Galeiras [Mon, 8 Feb 2021 14:07:19 +0000 (15:07 +0100)] 
analyze: add filesystems command

4 years agoREADME: document LSM BPF requirements
Iago López Galeiras [Tue, 22 Dec 2020 19:27:50 +0000 (20:27 +0100)] 
README: document LSM BPF requirements

4 years agotest: add test-bpf-lsm
Iago López Galeiras [Fri, 11 Dec 2020 16:32:54 +0000 (17:32 +0100)] 
test: add test-bpf-lsm

4 years agoman: document EXIT_BPF status
Iago López Galeiras [Mon, 8 Feb 2021 14:06:29 +0000 (15:06 +0100)] 
man: document EXIT_BPF status

4 years agoman: add RestrictFileSystems= documentation
Iago López Galeiras [Mon, 8 Feb 2021 14:06:22 +0000 (15:06 +0100)] 
man: add RestrictFileSystems= documentation

4 years agomkosi: add libbpf dependency
Iago López Galeiras [Fri, 11 Dec 2020 12:03:54 +0000 (13:03 +0100)] 
mkosi: add libbpf dependency

For distros that ship libbpf >=0.2.0.

4 years agocore: add dbus RestrictFileSystems= properties
Iago López Galeiras [Fri, 11 Dec 2020 12:20:23 +0000 (13:20 +0100)] 
core: add dbus RestrictFileSystems= properties

4 years agocore: add RestrictFileSystems= fragment parser
Iago López Galeiras [Thu, 11 Feb 2021 15:59:30 +0000 (16:59 +0100)] 
core: add RestrictFileSystems= fragment parser

It takes an allow or deny list of filesystems services should have
access to.

4 years agocore: use LSM BPF functions to implement RestrictFileSystems=
Iago Lopez Galeiras [Tue, 5 Oct 2021 11:18:49 +0000 (13:18 +0200)] 
core: use LSM BPF functions to implement RestrictFileSystems=

It attaches the LSM BPF program when the system manager starts up.

It populates the hash of maps BPF map when services that have
RestrictFileSystems= set start.

It cleans up the hash of maps when the unit cgroup is pruned.

To pass the file descriptor of the BPF map we add it to the keep_fds
array.

4 years agocore: add BPF LSM functions
Iago Lopez Galeiras [Tue, 13 Jul 2021 07:51:06 +0000 (09:51 +0200)] 
core: add BPF LSM functions

This adds 6 functions to implement RestrictFileSystems=

* lsm_bpf_supported() checks if LSM BPF is supported. It checks that
  cgroupv2 is used, that BPF LSM is enabled, and tries to load the BPF
  LSM program which makes sure BTF and hash of maps are supported, and
  BPF LSM programs can be loaded.
* lsm_bpf_setup() loads and attaches the LSM BPF program.
* lsm_bpf_unit_restrict_filesystems() populates the hash of maps BPF map with the
  cgroupID and the set of allowed or denied filesystems.
* lsm_bpf_cleanup() removes a cgroupID entry from the hash of maps.
* lsm_bpf_map_restrict_fs_fd() is a helper function to get the file
  descriptor of the BPF map.
* lsm_bpf_destroy() is a wrapper around the destroy function of the BPF
  skeleton file.

4 years agoshared/bpf-dlopen: expose more libbpf functions
Iago López Galeiras [Mon, 12 Jul 2021 10:18:31 +0000 (12:18 +0200)] 
shared/bpf-dlopen: expose more libbpf functions

They're needed for the LSM BPF feature.

4 years agoexit-status: add EXIT_BPF
Iago López Galeiras [Fri, 11 Dec 2020 12:24:13 +0000 (13:24 +0100)] 
exit-status: add EXIT_BPF

It will be used later.

4 years agocgroup-util: add cg_path_get_cgroupid()
Iago López Galeiras [Fri, 11 Dec 2020 12:15:25 +0000 (13:15 +0100)] 
cgroup-util: add cg_path_get_cgroupid()

It returns the cgroupID from a cgroup path.

4 years agobpf: add restrict_fs BPF program
Iago López Galeiras [Fri, 11 Dec 2020 11:40:33 +0000 (12:40 +0100)] 
bpf: add restrict_fs BPF program

It hooks into the file_open LSM hook and allows only when the filesystem
where the open will take place is present in a BPF map for a particular
cgroup.

The BPF map used is a hash of maps with the following structure:

    cgroupID -> (s_magic -> uint32)

The inner map is effectively a set.

The entry at key 0 in the inner map encodes whether the program behaves
as an allow list or a deny list: if its value is 0 it is a deny list,
otherwise it is an allow list.

When the cgroupID is present in the map, the program checks the inner
map for the magic number of the filesystem associated with the file
that's being opened. When the program behaves as an allow list, if that
magic number is present it allows the open to succeed, when the program
behaves as a deny list, it only allows access if the that magic number
is NOT present. When access is denied the program returns -EPERM.

The BPF program uses CO-RE (Compile-Once Run-Everywhere) to access
internal kernel structures without needing kernel headers present at
runtime.

4 years agobasic: use filesystem database
Iago López Galeiras [Mon, 8 Feb 2021 14:14:20 +0000 (15:14 +0100)] 
basic: use filesystem database

4 years agobasic: add filesystem database
Iago López Galeiras [Mon, 8 Feb 2021 18:54:24 +0000 (19:54 +0100)] 
basic: add filesystem database

Stores filesystem_name -> magic_number(s).

4 years agomissing_magic: add several filesystems
Iago López Galeiras [Mon, 8 Feb 2021 17:32:22 +0000 (18:32 +0100)] 
missing_magic: add several filesystems

They were failing on CI.

4 years agobasic: move CIFS magic number to missing_magic.h
Iago Lopez Galeiras [Thu, 19 Aug 2021 09:26:49 +0000 (11:26 +0200)] 
basic: move CIFS magic number to missing_magic.h

It fits better there.

4 years agounit-file: tighten unit file discovery checks
Lennart Poettering [Wed, 29 Sep 2021 13:21:38 +0000 (15:21 +0200)] 
unit-file: tighten unit file discovery checks

Only accept DT_REG/DT_LNK/DT_DIR entries, ignore all others.

Only accpet DT_REG/DT_LNK for file names that are valid unit file names.

Only accept DT_DIR for filenames that are valid unit file names which
are suffixed by .d, .wants, .requires

This doesn't really fix any bugs, but tightens what we insert into the
lookup tables.

4 years agoMerge pull request #20937 from poettering/sync-split
Yu Watanabe [Wed, 6 Oct 2021 03:27:27 +0000 (12:27 +0900)] 
Merge pull request #20937 from poettering/sync-split

split up a few files in src/basic/

4 years agobasic/env-util: correctly parse extended vars after non-extended vars (#20941)
Andrew Soutar [Wed, 6 Oct 2021 02:55:27 +0000 (22:55 -0400)] 
basic/env-util: correctly parse extended vars after non-extended vars (#20941)

4 years agorepart: use right error variable
Lennart Poettering [Tue, 5 Oct 2021 12:10:27 +0000 (14:10 +0200)] 
repart: use right error variable

4 years agobasic: move chase_symlinks_and_fopen_unlocked() → chase-symlinks.[ch] 20937/head
Lennart Poettering [Tue, 5 Oct 2021 13:23:29 +0000 (15:23 +0200)] 
basic: move chase_symlinks_and_fopen_unlocked() → chase-symlinks.[ch]

4 years agocore: fix SIGABRT on empty exec command argv
Henri Chain [Tue, 5 Oct 2021 11:10:31 +0000 (13:10 +0200)] 
core: fix SIGABRT on empty exec command argv

This verifies that the argv part of any exec_command parameters that
are sent through dbus is not empty at deserialization time.

There is an additional check in service.c service_verify() that again
checks if all exec_commands are correctly populated, after the service
has been loaded, whether through dbus or otherwise.

Fixes #20933.

4 years agobasic: spit out chase_symlinks() from fs-util.[ch] → chase-symlinks.[ch]
Lennart Poettering [Tue, 5 Oct 2021 13:12:27 +0000 (15:12 +0200)] 
basic: spit out chase_symlinks() from fs-util.[ch] → chase-symlinks.[ch]

4 years agobasic: split out inotify-related calls from fs-util.h → inotify-util.h
Lennart Poettering [Tue, 5 Oct 2021 12:44:17 +0000 (14:44 +0200)] 
basic: split out inotify-related calls from fs-util.h → inotify-util.h

4 years agobasic: split out glyph/emoji related calls from locale-util.[ch] into glyph-util...
Lennart Poettering [Tue, 5 Oct 2021 12:21:57 +0000 (14:21 +0200)] 
basic: split out glyph/emoji related calls from locale-util.[ch] into glyph-util.[ch]

These functions are used pretty much independently of locale, i.e. the
only info relevant is whether th locale is UTF-8 or not. Hence let's
give this its own pair of .c/.h files.

4 years agobasic: split out sync() family of calls from fs-util.[ch] into new c/h file
Lennart Poettering [Tue, 5 Oct 2021 12:03:26 +0000 (14:03 +0200)] 
basic: split out sync() family of calls from fs-util.[ch] into new c/h file

No changes in code, just some splitting out.

4 years agoMerge pull request #20893 from poettering/per-user-oom-score
Luca Boccassi [Tue, 5 Oct 2021 08:54:24 +0000 (09:54 +0100)] 
Merge pull request #20893 from poettering/per-user-oom-score

default to higher oom scores for user sessions

4 years agoMerge pull request #20892 from yuwata/test-network-preferred-lifetime-zero
Anita Zhang [Tue, 5 Oct 2021 01:40:59 +0000 (18:40 -0700)] 
Merge pull request #20892 from yuwata/test-network-preferred-lifetime-zero

network: drop and warn duplicated address settings

4 years agotest: create and merge code coverage reports in integration tests
Luca Boccassi [Sun, 3 Oct 2021 15:50:38 +0000 (16:50 +0100)] 
test: create and merge code coverage reports in integration tests

If -Db_coverage=true is used at build time, then ARTIFACT_DIRECTORY/TEST-XX-FOO.coverage-info
files are created with code coverage data, and run-integration-test.sh also
merges them into ARTIFACT_DIRECTORY/merged.coverage-info since the coveralls.io
helpers accept only a single file.

4 years agoman: document the new DefaultOOMScoreAdjust= setting 20893/head
Lennart Poettering [Thu, 30 Sep 2021 09:32:43 +0000 (11:32 +0200)] 
man: document the new DefaultOOMScoreAdjust= setting

4 years agounits: run user service managers at OOM score adjustment 100
Lennart Poettering [Thu, 30 Sep 2021 09:23:32 +0000 (11:23 +0200)] 
units: run user service managers at OOM score adjustment 100

Let's make it slightly more likely that a per-user service manager is
killed than any system service. We use a conservative 100 (from a range
that goes all the way to 1000).

Replaces: #17426

Together with the previous commit this means: system manager and system
services are placed at OOM score adjustment 0 (specifically: they
inherit kernel default of 0). User service manager (both for root and
non-root) are placed at 100. User services for non-root are placed at
200, those for root inherit 100.

Note that processes forked off the user *sessions* (i.e. not forked off
the per-user service manager) remain at 0 (e.g. the shell process
created by a tty or ssh login). This probably should be
addressed too one day (maybe in pam_systemd?), but is not covered here.

4 years agocore: add a new setting DefaultOOMScoreAdjust= and set it to 100 above service manage...
Lennart Poettering [Thu, 30 Sep 2021 09:21:18 +0000 (11:21 +0200)] 
core: add a new setting DefaultOOMScoreAdjust= and set it to 100 above service manager's by default

Let's make our service managers slightly less likely to be killed by the
OOM killer by adjusting our services' OOM score adjustment to 100 above
ours. Do this conservatively, i.e. only for regular user sessions.

4 years agotest: add test case for {get,set}_oom_score_adjust()
Lennart Poettering [Thu, 30 Sep 2021 09:19:34 +0000 (11:19 +0200)] 
test: add test case for {get,set}_oom_score_adjust()

4 years agoprocess-util: add helper for querying oom score adjustment value
Lennart Poettering [Thu, 30 Sep 2021 09:19:11 +0000 (11:19 +0200)] 
process-util: add helper for querying oom score adjustment value

4 years agotest-network: add tests for duplicated address setting 20892/head
Yu Watanabe [Thu, 30 Sep 2021 10:22:22 +0000 (19:22 +0900)] 
test-network: add tests for duplicated address setting

Also, add more tests for PreferredLifetime=0

C.f. #20891.

4 years agonetwork: do not ignore critical errors like OOM
Yu Watanabe [Mon, 4 Oct 2021 09:26:24 +0000 (18:26 +0900)] 
network: do not ignore critical errors like OOM

4 years agonetwork: downgrade log level for non-critical errors
Yu Watanabe [Mon, 4 Oct 2021 09:22:49 +0000 (18:22 +0900)] 
network: downgrade log level for non-critical errors

4 years agonetwork: drop and warn duplicated Address= settings
Yu Watanabe [Fri, 1 Oct 2021 00:22:18 +0000 (09:22 +0900)] 
network: drop and warn duplicated Address= settings

Fixes #20891.

4 years agoman/glib-event-glue example: relicense to CC0-1.0
Luca Boccassi [Sat, 2 Oct 2021 10:48:13 +0000 (11:48 +0100)] 
man/glib-event-glue example: relicense to CC0-1.0

All other examples were relicensed to CC0-1.0 since they are intended
to be copied and pasted anywhere without any restrictions.
Relicense the last one too.

4 years agonetwork: rename address_hash_ops -> address_hash_ops_free
Yu Watanabe [Fri, 1 Oct 2021 00:09:48 +0000 (09:09 +0900)] 
network: rename address_hash_ops -> address_hash_ops_free

Preparation for later commits.

4 years agonetwork: make several hash_ops static
Yu Watanabe [Fri, 1 Oct 2021 00:03:18 +0000 (09:03 +0900)] 
network: make several hash_ops static

4 years agonetwork: address: fix flags and lifetime in debugging logs
Yu Watanabe [Fri, 1 Oct 2021 00:41:02 +0000 (09:41 +0900)] 
network: address: fix flags and lifetime in debugging logs

Prompted by #20891.

4 years agosleep: don't skip resume device with low priority/available space
Egor [Sun, 3 Oct 2021 00:42:50 +0000 (03:42 +0300)] 
sleep: don't skip resume device with low priority/available space

this fixes hibernation when there's a higher priority swap preceding
the resume swap in /proc/swaps.

fixes #19486

4 years agoMerge pull request #20924 from weblate/weblate-systemd-master
Frantisek Sumsal [Sun, 3 Oct 2021 16:08:50 +0000 (16:08 +0000)] 
Merge pull request #20924 from weblate/weblate-systemd-master

Translations update from Weblate

4 years agopo: Translated using Weblate (Kabyle) 20924/head
Slimane Selyan Amiri [Sun, 3 Oct 2021 16:05:00 +0000 (18:05 +0200)] 
po: Translated using Weblate (Kabyle)

Currently translated at 2.1% (4 of 189 strings)

Co-authored-by: Slimane Selyan Amiri <selyan.kab@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/kab/
Translation: systemd/main

4 years agopo: Translated using Weblate (Croatian)
Gogo Gogsi [Sun, 3 Oct 2021 16:05:00 +0000 (18:05 +0200)] 
po: Translated using Weblate (Croatian)

Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Gogo Gogsi <linux.hr@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/hr/
Translation: systemd/main

4 years agoMerge pull request #20886 from bluca/license
Luca Boccassi [Fri, 1 Oct 2021 21:57:11 +0000 (22:57 +0100)] 
Merge pull request #20886 from bluca/license

SPDX: add README and license texts

4 years agopo: Update translation files
Weblate [Fri, 1 Oct 2021 16:26:17 +0000 (18:26 +0200)] 
po: Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/
Translation: systemd/main

4 years agoAdd all other applicable licenses under LICENSES/ 20886/head
Luca Boccassi [Wed, 29 Sep 2021 21:10:34 +0000 (22:10 +0100)] 
Add all other applicable licenses under LICENSES/

License texts copied from:

https://github.com/spdx/license-list-data/blob/master/text/

4 years agoadd LICENSES/README.md explaining the license situation
Luca Boccassi [Wed, 29 Sep 2021 17:42:57 +0000 (18:42 +0100)] 
add LICENSES/README.md explaining the license situation

4 years agoman: add licenses to all files that lack one
Luca Boccassi [Fri, 1 Oct 2021 10:44:33 +0000 (11:44 +0100)] 
man: add licenses to all files that lack one

Documentation is licensed under LGPL-2.1-or-later.
Scripts are MIT to facilitate reuse.
Examples are relicensed to CC0-1.0 to maximise copy-and-paste
for users, with permission from authors.

4 years agotree-wide: fix SPDX short identifier for LGPL-2.1-or-later
Luca Boccassi [Wed, 29 Sep 2021 17:16:09 +0000 (18:16 +0100)] 
tree-wide: fix SPDX short identifier for LGPL-2.1-or-later

https://spdx.dev/ids/#:~:text=Allowing%20later%20versions%20of%20a%20license
https://spdx.org/licenses/LGPL-2.1-or-later.html

4 years agoMerge pull request #20907 from keszybz/licensing-cleanup
Luca Boccassi [Fri, 1 Oct 2021 16:26:08 +0000 (17:26 +0100)] 
Merge pull request #20907 from keszybz/licensing-cleanup

Licensing cleanup

4 years agoxorg/50-systemd-user: add a full license header 20907/head
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 11:05:51 +0000 (13:05 +0200)] 
xorg/50-systemd-user: add a full license header

This file is installed onto user systems, so it should have the full
header that says where it came from.

4 years agolicensing: add forgotten spdx headers
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 11:04:32 +0000 (13:04 +0200)] 
licensing: add forgotten spdx headers

Those are all "our" files, but we forgot to add the headers,
most likely because of non-standard file extensions.

4 years agolicensing: add missing header to one .network file
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:54:06 +0000 (12:54 +0200)] 
licensing: add missing header to one .network file

It should have the full header because it will be installed onto
user systems like the other .network files.

4 years agolicensing: add spdx header to chromiumos helper, move license file
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:49:36 +0000 (12:49 +0200)] 
licensing: add spdx header to chromiumos helper, move license file

It makes it easier to process the license automatically like other files.
The text of the license in tools/chromiumos/LICENSE matches
https://spdx.org/licenses/BSD-3-Clause.html exactly.

4 years agolicensing: add spdx to our .cocci files
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:28:36 +0000 (12:28 +0200)] 
licensing: add spdx to our .cocci files

Since those are chunks of code based on our codebase, it's easiest to use the
same license.

4 years agolicensing: add header to POTFILES.in
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:21:09 +0000 (12:21 +0200)] 
licensing: add header to POTFILES.in

This is just a stupid file list, but without the header the file shows
up on the list of files without a header. I checked that 'systemd-update-po'
still works, so I think it's OK to add this.

4 years agolicensing: add missing license headers on translation files
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:19:43 +0000 (12:19 +0200)] 
licensing: add missing license headers on translation files

Also make the headers more alike for consistency.

4 years agoci: use LGPLv2+ for all our ci configuration
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:10:22 +0000 (12:10 +0200)] 
ci: use LGPLv2+ for all our ci configuration

4 years agogithub: use the same headers on yaml files
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:09:20 +0000 (12:09 +0200)] 
github: use the same headers on yaml files

Also adjust the mention of location of mkosi files,
follow-up for d55ad7fe96eb1edf438a7a41a465723bd29d4b10.

4 years agolicensing: say that our github docs are LGPLv2.1+
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 10:02:07 +0000 (12:02 +0200)] 
licensing: say that our github docs are LGPLv2.1+

This mirros what 0aff7b7584 did for docs/.

4 years agomount-util: fix fd_is_mount_point() when both the parent and directory are network fs
Franck Bui [Thu, 30 Sep 2021 12:05:36 +0000 (14:05 +0200)] 
mount-util: fix fd_is_mount_point() when both the parent and directory are network fs

The second call to name_to_handle_at_loop() didn't check for the specific
errors that can happen when the parent dir is mounted by nfs and instead of
falling back like it's done for the child dir, fd_is_mount_point() failed in
this case.

4 years agoMerge pull request #20894 from andir/editorconfig
Zbigniew Jędrzejewski-Szmek [Fri, 1 Oct 2021 08:51:48 +0000 (10:51 +0200)] 
Merge pull request #20894 from andir/editorconfig

Set maximum line length in editorconfig for C and XML files

4 years agoreduce the fuzz values in evdev hwdb for Asus UX362FA
Lukas Senionis [Thu, 30 Sep 2021 18:31:26 +0000 (21:31 +0300)] 
reduce the fuzz values in evdev hwdb for Asus UX362FA

4 years agoMerge pull request #20777 from benzea/benzea/fix-seccomp-filter
Yu Watanabe [Fri, 1 Oct 2021 06:12:55 +0000 (15:12 +0900)] 
Merge pull request #20777 from benzea/benzea/fix-seccomp-filter

seccomp: Always install filters for native architecture

4 years agonetworkd-test: fix resolved_domain_restricted_dns
Michael Biebl [Thu, 30 Sep 2021 23:00:28 +0000 (01:00 +0200)] 
networkd-test: fix resolved_domain_restricted_dns

megasearch.net was meant to be a non-existing bogus domain, and had been
for a long time. But it seems some domain grabber recently registered
it, and it's an actual thing now:

  $ host megasearch.net
  megasearch.net has address 207.148.248.143

This causes the test to fail randomly.

Use search.example.com instead which yields

  $ host search.example.com
  Host search.example.com not found: 3(NXDOMAIN)

Fixes: #18357
4 years agoMerge pull request #20884 from mrc0mmand/to-shellcheck-or-not-to-shellcheck
Luca Boccassi [Thu, 30 Sep 2021 19:53:00 +0000 (20:53 +0100)] 
Merge pull request #20884 from mrc0mmand/to-shellcheck-or-not-to-shellcheck

tree-wide: the last batch of shellcheck shenanigans

4 years agotest: use a less restrictive portable profile when running w/ sanitizers 20777/head
Frantisek Sumsal [Thu, 30 Sep 2021 12:14:19 +0000 (14:14 +0200)] 
test: use a less restrictive portable profile when running w/ sanitizers

Since f833df3 we now actually use the seccomp rules defined in portable
profiles. However, the default one is too restrictive for sanitizers, as
it blocks certain syscall required by LSan. Mitigate this by using the
'trusted' profile when running TEST-29-PORTABLE under sanitizers.

4 years agoeditorconfig: set maximum line length to 109 for man/*.xml files 20894/head
Andreas Rammhold [Thu, 30 Sep 2021 11:44:26 +0000 (13:44 +0200)] 
editorconfig: set maximum line length to 109 for man/*.xml files

4 years agoeditorconfig: enforce maximum line length in .c and .h files
Andreas Rammhold [Thu, 30 Sep 2021 11:40:51 +0000 (13:40 +0200)] 
editorconfig: enforce maximum line length in .c and .h files

4 years agoci: introduce Super-Linter for shell scripts 20884/head
Frantisek Sumsal [Wed, 29 Sep 2021 20:08:51 +0000 (22:08 +0200)] 
ci: introduce Super-Linter for shell scripts

See: https://github.com/marketplace/actions/super-linter

4 years agotools: shellcheck-ify tool scripts
Frantisek Sumsal [Wed, 29 Sep 2021 19:28:55 +0000 (21:28 +0200)] 
tools: shellcheck-ify tool scripts

4 years agotest: shellcheck-ify test scripts
Frantisek Sumsal [Wed, 29 Sep 2021 18:30:08 +0000 (20:30 +0200)] 
test: shellcheck-ify test scripts

4 years agotest: drop an unused file
Frantisek Sumsal [Thu, 30 Sep 2021 10:11:27 +0000 (12:11 +0200)] 
test: drop an unused file

4 years agotest: Add failing/non-failing syscall filter test setting architecture
Benjamin Berg [Fri, 24 Sep 2021 11:35:34 +0000 (13:35 +0200)] 
test: Add failing/non-failing syscall filter test setting architecture

This adds a high level test verifying that syscall filtering in
combination with a simple architecture filter for the "native"
architecture works fine.

4 years agotest: Check that "native" architecture is always filtered
Benjamin Berg [Fri, 17 Sep 2021 12:00:39 +0000 (14:00 +0200)] 
test: Check that "native" architecture is always filtered

4 years agoseccomp: Always install filters for native architecture
Benjamin Berg [Fri, 17 Sep 2021 11:05:32 +0000 (13:05 +0200)] 
seccomp: Always install filters for native architecture

The commit 6597686865ff ("seccomp: don't install filters for archs that
can't use syscalls") introduced a regression where filters may not be
installed for the "native" architecture. This means that setting
SystemCallArchitectures=native for a unit effectively disables the
SystemCallFilter= and SystemCallLog= options.

Conceptually, we have two filter stages:
 1. architecture used for syscall (SystemCallArchitectures=)
 2. syscall + architecture combination (SystemCallFilter=)

The above commit tried to optimize the filter generation by skipping the
second level filtering when it is not required.

However, systemd will never fully block the "native" architecture using
the first level filter. This makes the code a lot simpler, as systemd
can execve() the target binary using its own architecture. And, it
should be perfectly fine as the "native" architecture will always be the
one with the most restrictive seccomp filtering.

Said differently, the bug arises because (on x86_64):
 1. x86_64 is permitted by libseccomp already
 2. native != x86_64
 3. the loop wants to block x86_64 because the permitted set only
    contains "native" (i.e. "native" != "x86_64")
 4. x86_64 is marked as blocked in seccomp_local_archs

Thereby we have an inconsistency, where it is marked as blocked in the
seccomp_local_archs array but it is allowed by libseccomp. i.e. we will
skip generating filter stage 2 without having stage 1 in place.

The fix is simple, we just skip the native architecture when looping
seccomp_local_archs. This way the inconsistency cannot happen.

4 years agodocs: Fixing typo in systemd.device man page and README.
alexlzhu [Wed, 29 Sep 2021 20:41:23 +0000 (13:41 -0700)] 
docs: Fixing typo in systemd.device man page and README.

systemd-udevd.service listens to kernel uevents and is needed for device
units to be available.

systemd-udevd.service is misspelled as systemd-udev.service in a couple places.

Fixing typo.

4 years agoci: shellcheck-ify CI scripts
Frantisek Sumsal [Wed, 29 Sep 2021 17:55:24 +0000 (19:55 +0200)] 
ci: shellcheck-ify CI scripts