]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agomkosi: Add zsh to Arch packages 20521/head
Daan De Meyer [Mon, 23 Aug 2021 15:44:58 +0000 (16:44 +0100)] 
mkosi: Add zsh to Arch packages

Useful for testing zsh completion changes.

2 years agomkosi: Install bash-completion in Arch image
Daan De Meyer [Mon, 23 Aug 2021 15:26:46 +0000 (16:26 +0100)] 
mkosi: Install bash-completion in Arch image

Useful for testing bash completion changes.

2 years agomkosi: Add man-db to arch packages
Daan De Meyer [Mon, 23 Aug 2021 13:31:56 +0000 (14:31 +0100)] 
mkosi: Add man-db to arch packages

Required to test systemd-analyze verify.

2 years agopo: Translated using Weblate (Finnish)
Jan Kuparinen [Tue, 31 Aug 2021 20:04:56 +0000 (22:04 +0200)] 
po: Translated using Weblate (Finnish)

Currently translated at 48.6% (92 of 189 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main

2 years agoMerge pull request #20525 from maanyagoenka/custom-security
Luca Boccassi [Tue, 31 Aug 2021 20:15:41 +0000 (21:15 +0100)] 
Merge pull request #20525 from maanyagoenka/custom-security

systemd-analyze: add option to enable users to custom define security requirements in the form of a .json file

2 years agoupdate TODO
Lennart Poettering [Tue, 31 Aug 2021 15:11:10 +0000 (17:11 +0200)] 
update TODO

2 years agonetwork: print Ethernet Link-Layer DHCP client ID with leading 0's
Alvin Šipraga [Tue, 31 Aug 2021 12:17:33 +0000 (14:17 +0200)] 
network: print Ethernet Link-Layer DHCP client ID with leading 0's

This is a small cosmetic change.

Before:

   Offered DHCP leases: 192.168.0.183 (to 0:9:a7:36:bc:89)

After:

   Offered DHCP leases: 192.168.0.183 (to 00:09:a7:36:bc:89)

2 years agotest: add integration tests for systemd-analyze 20525/head
Maanya Goenka [Wed, 25 Aug 2021 16:44:26 +0000 (09:44 -0700)] 
test: add integration tests for systemd-analyze

2 years agosystemd-analyze: allow parsing of JSON file to obtain custom security requirements...
Maanya Goenka [Mon, 23 Aug 2021 21:21:50 +0000 (14:21 -0700)] 
systemd-analyze: allow parsing of JSON file to obtain custom security requirements for comparison

The 'security' verb of systemd-analyze needs to be able to parse JSON files to be able to read in
the user-defined requirements and use them to determine the overall exposure level of the specified unit
file(s). The JSON files are expected to have a specific format where the keys in the file are the
unit ids consisting of only alphanumeric characters and underscores and the values are JSON objects
again consisting of key value pairs. The keys in these objects may include one or more of the following
properties: description_na, description_good, description_bad, weight, and range. The first three of these
are expected to be strings and the latter two are expected to be unsigned integer values. If one or more
of these properties is missing from the JSON object, then the default values of the properties as specified
in the hard coded set of security directives is used. The other properties that assess() needs to determine
overall exposure levels for a unit file for example, the assess function and parameter type among others,
are not to be included in the JSON files defined by the user because the values assigned to these fields
are expected to be consistent across unit files for each id.

2 years agosystemd-analyze: add new 'security' option to allow user to choose custom requirements
Maanya Goenka [Mon, 23 Aug 2021 21:20:10 +0000 (14:20 -0700)] 
systemd-analyze: add new 'security' option to allow user to choose custom requirements

A new option --security-policy= is added to work with the 'security' verb in order to enable
users to create and pass in a JSON file consisting of user defined requirements
against which to compare the specified unit file(s). These requirements then serve
as the measure of security threats for the file instead of the initial hard coded set of
requirements that the 'security' verb of systemd-analyze relied on.

Example Run:

A snapshot of the user defined testfile.json file is shown below instead of the complete file
for readability purposes.

{
"PrivateDevices":
    {"description_good": "Service has no access to hardware devices",
    "description_bad": "Service potentially has access to hardware devices",
    "weight": 1000,
    "range": 1
    },
"PrivateMounts":
    {"description_good": "Service cannot install system mounts",
    "description_bad": "Service may install system mounts",
    "weight": 1000,
    "range": 1
    },
"PrivateNetwork":
    {"description_good": "Service has no access to the host's network",
    "description_bad": "Service has access to the host's network",
    "weight": 2500,
    "range": 1
    },
"PrivateTmp":
    {"description_good": "Service has no access to other software's temporary files",
    "description_bad": "Service has access to other software's temporary files",
    "weight": 1000,
    "range": 1
    },
"PrivateUsers":
    {"description_good": "Service does not have access to other users",
    "description_bad": "Service has access to other users",
    "weight": 1000,
    "range": 1
    }
}

1. I created the jsontest.service file in order to test the --security-policy= option as follows:

maanya-goenka@debian:~/systemd (custom-security)$ cat<<EOF>jsontest.service
> [Service]
> ExecStart = echo hello
> PrivateNetwork = yes
> PrivateDevices = yes
> PrivateMounts = yes
> EOF

The security analysis table outputted below has been truncated to include only the first few lines for readability.

maanya-goenka@debian:~/systemd (custom-security)$ sudo build/systemd-analyze security --root= --offline=true
--security-policy=src/analyze/testfile.json jsontest.service
/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's
process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'.
Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your
unit file, and consider removing the setting altogether.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating
/var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.

  NAME                                                         DESCRIPTION
✓ PrivateNetwork                                               Service has no access to the host's network
✗ UserOrDynamicUser                                            Service runs as root user
✗ CapabilityBoundingSet_CAP_SET_UID_GID_PCAP                   Service may change UID/GID identities/capabilities
✓ PrivateMounts                                                Service cannot install system mounts
✓ PrivateDevices                                               Service has no access to hardware devices

→ Overall exposure level for jsontest.service: 8.3 EXPOSED 🙁

maanya-goenka@debian:~/systemd (custom-security)$ echo $? 0

2. In order to ensure that the JSON data was actually being correctly parsed, I made some changes to the JSON
file, specifically to the id "PrivateNetwork" as follows:

Before:
--------

"PrivateNetwork":
    {"description_good": "Service has no access to the host's network",
    "description_bad": "Service has access to the host's network",
    "weight": 2500,
    "range": 1
    }

After:
--------

"PrivateNetwork":
    {"description_good": "Service runs without access to host network",
    "description_bad": "Service has access to the host's network",
    "weight": 6000,
    "range": 1
    }

As expected, the new description for the description_good field of the Private Network id was updated in
the analysis table outputted below and the overall exposure level of the unit file decreased because
the weight assigned to 'Private Network' (which is set to yes) increased from 2500 to 6000.

maanya-goenka@debian:~/systemd (custom-security)$ sudo build/systemd-analyze security --root= --offline=true
--security-policy=src/analyze/testfile.json jsontest.service

/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's
process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'.
Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your
unit file, and consider removing the setting altogether.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating
/var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.

  NAME                                                         DESCRIPTION
✓ PrivateNetwork                                               Service runs without access to the host's network
✗ UserOrDynamicUser                                            Service runs as root user
✗ CapabilityBoundingSet_CAP_SET_UID_GID_PCAP                   Service may change UID/GID identities/capabilities
✓ PrivateMounts                                                Service cannot install system mounts
✓ PrivateDevices                                               Service has no access to hardware devices

→ Overall exposure level for jsontest.service: 7.8 EXPOSED 🙁

maanya-goenka@debian:~/systemd (custom-security)$ echo $? 0

3. When paired with security's --threshold= option, systemd-analyze exits with a non-zero error status indicating
that the overall exposure level for the unit file (=78) is greater than the set threshold (=70). The same
jsontest.service file is used for the demo run below:

maanya-goenka@debian:~/systemd (custom-security)$ sudo build/systemd-analyze security --root= --offline=true
--security-policy=src/analyze/testfile.json --threshold=70 jsontest.service

/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's
process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'.
Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your
unit file, and consider removing the setting altogether.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating
/var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.

  NAME                                                         DESCRIPTION
✓ PrivateNetwork                                               Service runs without access to host network
✗ UserOrDynamicUser                                            Service runs as root user
✗ CapabilityBoundingSet_CAP_SET_UID_GID_PCAP                   Service may change UID/GID identities/capabilities
✓ PrivateMounts                                                Service cannot install system mounts
✓ PrivateDevices                                               Service has no access to hardware devices

→ Overall exposure level for jsontest.service: 7.8 EXPOSED 🙁

maanya-goenka@debian:~/systemd (custom-security)$ echo $? 1

new option

2 years agoMerge pull request #20592 from poettering/homed-fix-smb
Lennart Poettering [Tue, 31 Aug 2021 12:20:53 +0000 (14:20 +0200)] 
Merge pull request #20592 from poettering/homed-fix-smb

various fixes to make homed's smb backend work correctly again

2 years agotmpfiles.d: remove .Test-unix, it's obsolete
Peter Hutterer [Tue, 31 Aug 2021 05:20:12 +0000 (15:20 +1000)] 
tmpfiles.d: remove .Test-unix, it's obsolete

See libxtrans commit 0794b1b712a90b40e2b019c9edc6f96874493c52. The code
to generate this socket was removed 5 years ago and even before it was
conditional on #define TEST_t. There is no reference to that #define in
either the X server nor libX11's git history, or in any of the current
libX*.

Let's assume this is well and truly obsolete.

2 years agohomed: remove misplaced assert() 20592/head
Lennart Poettering [Tue, 31 Aug 2021 08:47:40 +0000 (10:47 +0200)] 
homed: remove misplaced assert()

2 years agohomed: add missing SYNTHETIC_ERRNO()
Lennart Poettering [Tue, 31 Aug 2021 08:47:29 +0000 (10:47 +0200)] 
homed: add missing SYNTHETIC_ERRNO()

2 years agohomed: fix log message referring to fsck, when we actually mean mount
Lennart Poettering [Tue, 31 Aug 2021 08:47:02 +0000 (10:47 +0200)] 
homed: fix log message referring to fsck, when we actually mean mount

2 years agohomed: make sure to use right asssesors for GID + access mode
Lennart Poettering [Tue, 31 Aug 2021 08:46:06 +0000 (10:46 +0200)] 
homed: make sure to use right asssesors for GID + access mode

Don't reach directly into the UserRecord struct, but use the right
assessors, so that the "unspecified" case is covered.

2 years agohomed: add missing capabilities for SMB/CIFS backend
Lennart Poettering [Tue, 31 Aug 2021 08:04:06 +0000 (10:04 +0200)] 
homed: add missing capabilities for SMB/CIFS backend

In 2020 mount.cifs started to require a bunch for caps to work. let's
add them to the capability bounding set.

Also, SMB support obviously needs network access, hence open that up.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1962920
2 years agoMerge pull request #20257 from bluca/seqno
Luca Boccassi [Tue, 31 Aug 2021 08:06:33 +0000 (09:06 +0100)] 
Merge pull request #20257 from bluca/seqno

Use new diskseq block device property

2 years agoMerge pull request #20567 from yuwata/socket-additional-cmsg-buffer
Yu Watanabe [Tue, 31 Aug 2021 04:54:18 +0000 (13:54 +0900)] 
Merge pull request #20567 from yuwata/socket-additional-cmsg-buffer

socket-util: add additional cmsg buffer for 64bit timeval or timespec

2 years agogpt-auto-generator: Use volatile-root by default and automatic logic as fallback
Kristian Klausen [Mon, 30 Aug 2021 07:55:41 +0000 (09:55 +0200)] 
gpt-auto-generator: Use volatile-root by default and automatic logic as fallback

Previously volatile-root was only checked if "/" wasn't backed by a
block device, but the block device isn't necessarily original root block
device (ex: if the rootfs is copied to a ext4 fs backed by zram in the
initramfs), so we always want volatile-root checked.

So shuffle the code around so volatile-root is checked first and
fallback to the automatic logic.

Fix #20557

2 years agoMerge pull request #20583 from poettering/pk-no-tty
Yu Watanabe [Tue, 31 Aug 2021 04:45:04 +0000 (13:45 +0900)] 
Merge pull request #20583 from poettering/pk-no-tty

some polkit agent tweaks

2 years agoman: Don't leak memory in path-documents example
Thomas Mühlbacher [Mon, 30 Aug 2021 14:16:30 +0000 (16:16 +0200)] 
man: Don't leak memory in path-documents example

The `sd_path_lookup(3)` man page states that the returned string shall be
`free(3)`'d but then doesn't do so in the example code.

Also add basic error handling as well.

2 years agocore: fix typo: they -> the
Yu Watanabe [Mon, 30 Aug 2021 11:34:48 +0000 (20:34 +0900)] 
core: fix typo: they -> the

2 years agohwdb: remove double empty line in --help text
Lennart Poettering [Mon, 30 Aug 2021 11:20:59 +0000 (13:20 +0200)] 
hwdb: remove double empty line in --help text

2 years agoexec-util: handle gracefully if we want to fork an agent but have no controlling tty 20583/head
Lennart Poettering [Mon, 30 Aug 2021 11:28:02 +0000 (13:28 +0200)] 
exec-util: handle gracefully if we want to fork an agent but have no controlling tty

Fixes: #20576
2 years agorun/mount/systemctl: don't fork off PolicyKit/ask-pw agent when in --user mode
Lennart Poettering [Mon, 30 Aug 2021 11:21:55 +0000 (13:21 +0200)] 
run/mount/systemctl: don't fork off PolicyKit/ask-pw agent when in --user mode

When we are in --user mode there's no point in doing PolicyKit/ask-pw
because both of these systems are only used by system-level services.
Let's disable the two agents for that automaticlly hence.

Prompted by: #20576

2 years agotimesync: check cmsg length 20567/head
Yu Watanabe [Sun, 29 Aug 2021 11:55:44 +0000 (20:55 +0900)] 
timesync: check cmsg length

2 years agosocket-util: introduce CMSG_SPACE_TIMEVAL/TIMESPEC macro to support additional 64bit...
Yu Watanabe [Sun, 29 Aug 2021 11:50:49 +0000 (20:50 +0900)] 
socket-util: introduce CMSG_SPACE_TIMEVAL/TIMESPEC macro to support additional 64bit timeval or timespec

Fixes #20482 and #20564.

2 years agoAdd matrix for the Chuwi SurBook Mini (CWI540)
jlempen [Sun, 29 Aug 2021 18:49:20 +0000 (20:49 +0200)] 
Add matrix for the Chuwi SurBook Mini (CWI540)

2 years agohwdb: add a generic rule for trackpoints (#20543)
José Expósito [Mon, 30 Aug 2021 08:30:42 +0000 (10:30 +0200)] 
hwdb: add a generic rule for trackpoints (#20543)

Check for "TrackPoint" in the device name and add the
ID_INPUT_POINTINGSTICK property.

In reference to libinput issue:
https://gitlab.freedesktop.org/libinput/libinput/-/issues/651

2 years agoMerge pull request #20057 from yuwata/sd-netlink-genl-cleanups
Yu Watanabe [Sun, 29 Aug 2021 13:37:31 +0000 (22:37 +0900)] 
Merge pull request #20057 from yuwata/sd-netlink-genl-cleanups

sd-netlink: cleanups for generic netlink

2 years agosd-netlink: make type_system_get_*() and friends return value directly 20057/head
Yu Watanabe [Sun, 29 Aug 2021 08:59:17 +0000 (17:59 +0900)] 
sd-netlink: make type_system_get_*() and friends return value directly

2 years agosd-netlink: introduce sd_genl_add_match()
Yu Watanabe [Tue, 29 Jun 2021 16:16:45 +0000 (01:16 +0900)] 
sd-netlink: introduce sd_genl_add_match()

By using this, we can listen multicast messages for generic netlink.

2 years agosd-netlink: split sd_netlink_add_match() into two parts
Yu Watanabe [Tue, 29 Jun 2021 16:11:07 +0000 (01:11 +0900)] 
sd-netlink: split sd_netlink_add_match() into two parts

This also makes netlink_slot_disconnect() correctly unref multicast
groups.

2 years agosd-netlink: introduce sd_genl_message_get_command()
Yu Watanabe [Fri, 2 Jul 2021 21:21:45 +0000 (06:21 +0900)] 
sd-netlink: introduce sd_genl_message_get_command()

2 years agosd-netlink: determine header size of genl message by using CTRL_ATTR_HDRSIZE attribute
Yu Watanabe [Fri, 2 Jul 2021 21:53:08 +0000 (06:53 +0900)] 
sd-netlink: determine header size of genl message by using CTRL_ATTR_HDRSIZE attribute

Fortunately, all genl families we currently use do not require additional
header size.

2 years agosd-netlink: read protocol version of each genl family
Yu Watanabe [Sun, 4 Jul 2021 11:05:35 +0000 (20:05 +0900)] 
sd-netlink: read protocol version of each genl family

2 years agosd-netlink: drop sd_genl_family_t and introduce GenericNetlinkFamily
Yu Watanabe [Tue, 24 Aug 2021 09:11:20 +0000 (18:11 +0900)] 
sd-netlink: drop sd_genl_family_t and introduce GenericNetlinkFamily

Kernel manages each genl family by its name, e.g. "nlctrl" or WG_GENL_NAME,
and its ID (used for nlmsg_type) is determined dynamically when the
corresponding module is loaded.

This commit makes sd-netlink follow the same way; now, sd_genl_family_t
is dropped, and sd_genl_message_new() takes a genl family name. Each
genl family is resolved when it is used first time, and its information
is stored in GenericNetlinkFamily.

2 years agosd-netlink: split message_new() into two parts and introduces message_new_full()
Yu Watanabe [Tue, 24 Aug 2021 08:41:14 +0000 (17:41 +0900)] 
sd-netlink: split message_new() into two parts and introduces message_new_full()

2 years agosd-netlink: introduce several macros to define type system
Yu Watanabe [Tue, 24 Aug 2021 08:06:41 +0000 (17:06 +0900)] 
sd-netlink: introduce several macros to define type system

2 years agosd-netlink: drop redundant string table lookup functions to handle type system union
Yu Watanabe [Tue, 24 Aug 2021 07:39:38 +0000 (16:39 +0900)] 
sd-netlink: drop redundant string table lookup functions to handle type system union

2 years agosd-netlink: split type system for nfnl
Yu Watanabe [Tue, 24 Aug 2021 07:10:49 +0000 (16:10 +0900)] 
sd-netlink: split type system for nfnl

This makes the root type system for nfnl indexed by subsystem, and
itroduces a next level type system for each subsystem. The second
level type systems are indexed by message types correspond to each
subsystem.

2 years agosd-netlink: drop 'flags' argument from sd_nfnl_nft_message_new_table()
Yu Watanabe [Sat, 3 Jul 2021 03:42:08 +0000 (12:42 +0900)] 
sd-netlink: drop 'flags' argument from sd_nfnl_nft_message_new_table()

2 years agosd-netlink: wrap long function declarations
Yu Watanabe [Sat, 3 Jul 2021 03:38:52 +0000 (12:38 +0900)] 
sd-netlink: wrap long function declarations

2 years agosd-netlink: add several missing attributes
Yu Watanabe [Tue, 24 Aug 2021 06:51:33 +0000 (15:51 +0900)] 
sd-netlink: add several missing attributes

2 years agobasic: copy genetlink.h to repository
Yu Watanabe [Tue, 29 Jun 2021 08:26:19 +0000 (17:26 +0900)] 
basic: copy genetlink.h to repository

2 years agosd-netlink: introduce basic_type_system
Yu Watanabe [Tue, 24 Aug 2021 06:40:17 +0000 (15:40 +0900)] 
sd-netlink: introduce basic_type_system

Preparation for later commits.

2 years agosd-netlink: unify two spurious type system root for genl
Yu Watanabe [Tue, 24 Aug 2021 06:27:56 +0000 (15:27 +0900)] 
sd-netlink: unify two spurious type system root for genl

2 years agosd-netlink: drop genl type system indexed by command
Yu Watanabe [Tue, 24 Aug 2021 06:11:02 +0000 (15:11 +0900)] 
sd-netlink: drop genl type system indexed by command

All type systems of currently supported genl families do not depend on
commands. Hence, at least tentatively, let's drop the tables.

Note that type system for genl ethtool depends on commands. Let's
reintroduce a mechanism to support the deps when we support ethtool on
netlink.

2 years agosd-netlink: rename several type systems for generic netlink
Yu Watanabe [Tue, 24 Aug 2021 05:55:16 +0000 (14:55 +0900)] 
sd-netlink: rename several type systems for generic netlink

2 years agosd-netlink: split netlink-types.[ch] into small files
Yu Watanabe [Wed, 7 Jul 2021 04:42:04 +0000 (13:42 +0900)] 
sd-netlink: split netlink-types.[ch] into small files

Also renames several files.

2 years agosd-netlink: make several type systems static
Yu Watanabe [Tue, 29 Jun 2021 07:07:21 +0000 (16:07 +0900)] 
sd-netlink: make several type systems static

2 years agosd-netlink: move type systems
Yu Watanabe [Tue, 29 Jun 2021 07:06:04 +0000 (16:06 +0900)] 
sd-netlink: move type systems

2 years agosd-netlink: introduce two helper functions for type system union
Yu Watanabe [Sun, 4 Jul 2021 06:11:08 +0000 (15:11 +0900)] 
sd-netlink: introduce two helper functions for type system union

2 years agosd-netlink: rename functions
Yu Watanabe [Sun, 4 Jul 2021 05:58:20 +0000 (14:58 +0900)] 
sd-netlink: rename functions

2 years agosd-netlink: make type_get_type_system{,_union}() return value directly
Yu Watanabe [Sun, 4 Jul 2021 05:33:02 +0000 (14:33 +0900)] 
sd-netlink: make type_get_type_system{,_union}() return value directly

2 years agosd-netlink: make message_seal() accept already sealed messages
Yu Watanabe [Wed, 7 Jul 2021 01:05:08 +0000 (10:05 +0900)] 
sd-netlink: make message_seal() accept already sealed messages

The function can be idempotent. It is not necessary to refuse already
sealed messages.

2 years agosd-netlink: rename variables, arguments, and functions
Yu Watanabe [Wed, 7 Jul 2021 00:42:41 +0000 (09:42 +0900)] 
sd-netlink: rename variables, arguments, and functions

Most changes are 'rtnl' -> 'nl' where the function is not only for rtnl.

2 years agotest: add usual log messages in test-netlink
Yu Watanabe [Tue, 29 Jun 2021 06:33:58 +0000 (15:33 +0900)] 
test: add usual log messages in test-netlink

2 years agosd-netlink: drop unused type
Yu Watanabe [Tue, 29 Jun 2021 06:26:25 +0000 (15:26 +0900)] 
sd-netlink: drop unused type

2 years agoupdate TODO
Lennart Poettering [Sat, 28 Aug 2021 05:15:12 +0000 (07:15 +0200)] 
update TODO

2 years agocore: Add information on which condition failed to the job done message
Daan De Meyer [Thu, 26 Aug 2021 15:44:37 +0000 (16:44 +0100)] 
core: Add information on which condition failed to the job done message

When a job is skipped, it's useful to know exactly which condition failed so
let's add this information to the error message.

To avoid having to dynamically generate a format string, we special case the
formatting of condition failed messages.

2 years agocore: Unit's condition_result field is a boolean
Lennart Poettering [Fri, 27 Aug 2021 14:49:12 +0000 (16:49 +0200)] 
core: Unit's condition_result field is a boolean

Let's only assign boolean values to a boolean variable.

Unit's condition_result is not of type ConditionResult, slightly
confusingly. Let's hence not assign one of ConditionResult's values to
it, but simple booleans.

This effectively doesn't make a difference, since CONDITION_ERROR is
true when cast to bool. But it's still ugly to rely on that. And
confusing.

2 years agoFix another crash due to missing NHDR
Kevin Orr [Thu, 26 Aug 2021 21:04:53 +0000 (17:04 -0400)] 
Fix another crash due to missing NHDR

2 years agoMerge pull request #20547 from poettering/home-4k
Lennart Poettering [Fri, 27 Aug 2021 07:59:44 +0000 (09:59 +0200)] 
Merge pull request #20547 from poettering/home-4k

homed: round fs offset and sizes to multiples of 4K

2 years agoMerge pull request #20553 from weblate/weblate-systemd-master
Yu Watanabe [Thu, 26 Aug 2021 18:09:29 +0000 (03:09 +0900)] 
Merge pull request #20553 from weblate/weblate-systemd-master

Translations update from Weblate

2 years agopo: Translated using Weblate (Finnish) 20553/head
Jan Kuparinen [Thu, 26 Aug 2021 18:05:20 +0000 (20:05 +0200)] 
po: Translated using Weblate (Finnish)

Currently translated at 9.5% (18 of 189 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main

2 years agopo: Translated using Weblate (Spanish)
Adolfo Jayme Barrientos [Thu, 26 Aug 2021 18:05:20 +0000 (20:05 +0200)] 
po: Translated using Weblate (Spanish)

Currently translated at 89.4% (169 of 189 strings)

Co-authored-by: Adolfo Jayme Barrientos <fitoschido@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/es/
Translation: systemd/main

2 years agoRevert "core: Add information on which condition failed to job skipped format string"
Lennart Poettering [Thu, 26 Aug 2021 14:50:35 +0000 (16:50 +0200)] 
Revert "core: Add information on which condition failed to job skipped format string"

This reverts commit c97bef458b6e59079c9613ec755c1c6513c1c655.

2 years agocryptsetup: drop an unused variable
Frantisek Sumsal [Thu, 26 Aug 2021 08:38:46 +0000 (10:38 +0200)] 
cryptsetup: drop an unused variable

This fixes compilation with new-enough libcryptsetup (2.4.0+) & clang:

```
$ CC=clang CXX=clang++ meson build --werror -Dlibcryptsetup-plugins=true
...
$ ninja -C build
...
../src/cryptsetup/cryptsetup-tokens/luks2-fido2.c:23:53: error: unused variable 'v' [-Werror,-Wunused-variable]
        _cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
...
```

2 years agohwdb: Add sensor rule for Hometech Wi101
Wind/owZ [Sun, 22 Aug 2021 00:19:18 +0000 (03:19 +0300)] 
hwdb: Add sensor rule for Hometech Wi101

This commit was done to add sensor rule for Hometech Wi101. Note that this rule might be too general and need fixes. I couldn't test this on any other device since this one is the only one I have.

Co-authored-by: Simeonlps <Simeonlps@users.noreply.github.com>
Signed-off-by: Wind/owZ <windowz414@gnuweeb.org>
2 years agohwdb: Add force-release for HP Omen 15 calculator key. (#20538)
I-dont-need-name [Thu, 26 Aug 2021 09:25:32 +0000 (12:25 +0300)] 
hwdb: Add force-release for HP Omen 15 calculator key. (#20538)

* Add force-release for HP Omen 15 calculator key.

The key doesn't create release event so I have come up with this fix to make it work properly.

2 years agocore: Add information on which condition failed to job skipped format string
Daan De Meyer [Fri, 20 Aug 2021 10:02:25 +0000 (11:02 +0100)] 
core: Add information on which condition failed to job skipped format string

When a job is skipped, it's useful to know exactly which condition failed so
let's add this information to the error message. Because we now return an
allocated string from job_done_message_format(), make sure we strdup() the
other formats as well so the caller can safely free the string returned by
job_done_message_format().

2 years agonetwork: default LinkLocalAddresssing= to no for link stacked with a passthru mode...
Tom Yan [Wed, 25 Aug 2021 09:50:01 +0000 (17:50 +0800)] 
network: default LinkLocalAddresssing= to no for link stacked with a passthru mode MACVLAN/MACVTAP

For similar reason to the case of a bridge slave: we don't want any IP configuration for it.

2 years agoMerge pull request #20541 from yuwata/udev-coalesce-follow-up
Yu Watanabe [Wed, 25 Aug 2021 21:05:29 +0000 (06:05 +0900)] 
Merge pull request #20541 from yuwata/udev-coalesce-follow-up

udev: follow-ups for coalesce feature support

2 years agoMerge pull request #20515 from yuwata/pid1-mount-apivfs-no
Yu Watanabe [Wed, 25 Aug 2021 21:05:03 +0000 (06:05 +0900)] 
Merge pull request #20515 from yuwata/pid1-mount-apivfs-no

pid1: make find_executable() work with MountAPIVFS=no

2 years agoMerge pull request #20531 from DaanDeMeyer/fix-17433
Yu Watanabe [Wed, 25 Aug 2021 21:04:40 +0000 (06:04 +0900)] 
Merge pull request #20531 from DaanDeMeyer/fix-17433

core: Check unit start rate limiting earlier

2 years agoupdate TODO 20547/head
Lennart Poettering [Tue, 24 Aug 2021 15:45:10 +0000 (17:45 +0200)] 
update TODO

2 years agohomed: always align home file systems to 4K boundaries
Lennart Poettering [Fri, 20 Aug 2021 16:40:53 +0000 (18:40 +0200)] 
homed: always align home file systems to 4K boundaries

Let's carefully align all home file systems to 4K sector boundaries.
It's the safest thing to do, to ensure good perfomance on 4K sector
drives, i.e. today's hardware.

Yes, this means we'll waste 3.5K when resizing home dirs, but I think we
can live with that.

This ensures both the offsets where we start and the sizes of the file
systems/partitions/disk images are multiples of 4K always, both when
creating a new image and when resizing things.

Note that previously we aligned everything to 1024, but weren't quite as
careful.

2 years agoudev/net: initialize coalesce tristate variables 20541/head
Yu Watanabe [Wed, 25 Aug 2021 18:34:23 +0000 (03:34 +0900)] 
udev/net: initialize coalesce tristate variables

Otherwise, 99-default.link may introduce something like the
following warnings:
----
Aug 26 03:23:59 systemd-udevd[519]: wlan0: Could not set coalesce settings, ignoring: Operation not supported
Aug 26 03:24:00 systemd-udevd[547]: wlp59s0: Could not set coalesce settings, ignoring: Operation not supported
----

Follow-up for 6c35ea5ef0231d519ff24d43a57a72cebab6a121.

2 years agoethtool: move function
Yu Watanabe [Wed, 25 Aug 2021 18:31:05 +0000 (03:31 +0900)] 
ethtool: move function

I'd like to locate all conf parsers at end of file.

2 years agotest-execute: add a testcase for MountAPIVFS=no 20515/head
Yu Watanabe [Sun, 22 Aug 2021 21:45:33 +0000 (06:45 +0900)] 
test-execute: add a testcase for MountAPIVFS=no

2 years agocore: Check unit start rate limiting earlier 20531/head
Daan De Meyer [Tue, 24 Aug 2021 15:46:47 +0000 (16:46 +0100)] 
core: Check unit start rate limiting earlier

Fixes #17433. Currently, if any of the validations we do before we
check start rate limiting fail, we can still enter a busy loop as
no rate limiting gets applied. A common occurence of this scenario
is path units triggering a service that fails a condition check.

To fix the issue, we simply move up start rate limiting checks to
be the first thing we do when starting a unit. To achieve this,
we add a new method to the unit vtable and implement it for the
relevant unit types so that we can do the start rate limit checks
earlier on.

2 years agoNEWS: net.ipv4.tcp_ecn = 1 was reverted at v240
Sho Iizuka [Wed, 25 Aug 2021 04:00:03 +0000 (13:00 +0900)] 
NEWS: net.ipv4.tcp_ecn = 1 was reverted at v240

Turning on ECN was reverted by 1e190df.

2 years agoMerge pull request #20530 from keszybz/typos-and-meson
Luca Boccassi [Tue, 24 Aug 2021 20:54:22 +0000 (21:54 +0100)] 
Merge pull request #20530 from keszybz/typos-and-meson

Typos and meson

2 years agocore: Remove circular include
Daan De Meyer [Tue, 24 Aug 2021 15:19:03 +0000 (16:19 +0100)] 
core: Remove circular include

service.h includes socket.h and socket.h includes service.h. Move
service.h include from socket.h to socket.c to remove the circular
dependency.

2 years agomeson: capitalize the last instance of "efi" 20530/head
Zbigniew Jędrzejewski-Szmek [Tue, 24 Aug 2021 12:54:50 +0000 (14:54 +0200)] 
meson: capitalize the last instance of "efi"

All the others in this section use "EFI"…

2 years agoman: adjust the description of extension-release.*
Zbigniew Jędrzejewski-Szmek [Sat, 21 Aug 2021 14:02:09 +0000 (16:02 +0200)] 
man: adjust the description of extension-release.*

2 years agodocs: adjust sentece, fix minor typo
Zbigniew Jędrzejewski-Szmek [Wed, 4 Aug 2021 07:19:13 +0000 (09:19 +0200)] 
docs: adjust sentece, fix minor typo

The verity partition types are per-architecture already, and they contain the
hash data independently of whether we are on a given architecture. (Or in other
words, we would make *use* this partition on some architecture, but the
contents always *exists*.)

2 years agoman: fix minor grammar issue
Zbigniew Jędrzejewski-Szmek [Sat, 7 Aug 2021 06:40:51 +0000 (08:40 +0200)] 
man: fix minor grammar issue

The usual: "searched" vs. "searched for".

2 years agoMerge pull request #20524 from weblate/weblate-systemd-master
Yu Watanabe [Mon, 23 Aug 2021 18:28:06 +0000 (03:28 +0900)] 
Merge pull request #20524 from weblate/weblate-systemd-master

Translations update from Weblate

2 years agopo: Translated using Weblate (Finnish) 20524/head
Jan Kuparinen [Mon, 23 Aug 2021 18:04:54 +0000 (20:04 +0200)] 
po: Translated using Weblate (Finnish)

Currently translated at 1.5% (3 of 189 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main

2 years agopo: Translated using Weblate (German)
Ettore Atalan [Mon, 23 Aug 2021 18:04:54 +0000 (20:04 +0200)] 
po: Translated using Weblate (German)

Currently translated at 70.3% (133 of 189 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/de/
Translation: systemd/main

2 years agotest-execute: logs can_share flag
Yu Watanabe [Sun, 22 Aug 2021 22:13:14 +0000 (07:13 +0900)] 
test-execute: logs can_share flag

2 years agopath-util: make find_executable() work without /proc mounted
Yu Watanabe [Sun, 22 Aug 2021 21:16:48 +0000 (06:16 +0900)] 
path-util: make find_executable() work without /proc mounted

Follow-up for 888f65ace6296ed61285d31db846babf1c11885e.

Hopefully fixes #20514.

2 years agopath-util: split out common part in find_executable_full()
Yu Watanabe [Sun, 22 Aug 2021 21:09:14 +0000 (06:09 +0900)] 
path-util: split out common part in find_executable_full()

2 years agoMerge pull request #20513 from yuwata/network-allow-deny-list-take-prefix-length
Yu Watanabe [Mon, 23 Aug 2021 17:01:51 +0000 (02:01 +0900)] 
Merge pull request #20513 from yuwata/network-allow-deny-list-take-prefix-length

network: dhcp4,ndisc: make addresses in Allow/DenyList= optionally take prefix length

2 years agojson: rework JSON_BUILD_XYZ() macros to use compound literals instead of compound...
Lennart Poettering [Mon, 23 Aug 2021 08:48:56 +0000 (10:48 +0200)] 
json: rework JSON_BUILD_XYZ() macros to use compound literals instead of compound statements

Compound statements is this stuff: ({ … })

Compound literals is this stuff: (type) { … }

We use compound statements a lot in macro definitions: they have one
drawback though: they define a code block of their own, hence if macro
invocations are nested within them that use compound literals their
lifetime is limited to the code block, which might be unexpected.

Thankfully, we can rework things from compound statements to compund
literals in the case of json.h: they don't open a new codeblack, and
hence do not suffer by the problem explained above.

The interesting thing about compound statements is that they also work
for simple types, not just for structs/unions/arrays. We can use this
here for a typechecked implicit conversion: we want to superficially
typecheck arguments to the json_build() varargs function, and we do that
by assigning the specified arguments to our compound literals, which
does the minimal amount of typechecks and ensures that types are
propagated on correctly.

We need one special tweak for this: sd_id128_t is not a simple type but
a union. Using compound literals for initialzing that would mean
specifiying the components of the union, not a complete sd_id128_t. Our
hack around that: instead of passing the object directly via the stack
we now take a pointer (and thus a simple type) instead.

Nice side-effect of all this: compound literals is C99, while compound
statements are a GCC extension, hence we move closer to standard C.

Fixes: #20501
Replaces: #20512

2 years agotest-network: add more testcases for *Allow/DenyList= 20513/head
Yu Watanabe [Mon, 23 Aug 2021 11:37:36 +0000 (20:37 +0900)] 
test-network: add more testcases for *Allow/DenyList=

2 years agonetwork: dhcp4,ndisc: make addresses in Allow/DenyList= optionally take prefix length
Yu Watanabe [Sun, 22 Aug 2021 16:36:21 +0000 (01:36 +0900)] 
network: dhcp4,ndisc: make addresses in Allow/DenyList= optionally take prefix length

Closes #20505.