]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agotest: add testcases of filtering on dumping addresses 19716/head
Yu Watanabe [Mon, 24 May 2021 23:15:36 +0000 (08:15 +0900)] 
test: add testcases of filtering on dumping addresses

4 years agolocal-addresses: set ifindex when dump addresses on an interface
Yu Watanabe [Mon, 24 May 2021 21:54:15 +0000 (06:54 +0900)] 
local-addresses: set ifindex when dump addresses on an interface

4 years agonetwork: set ifindex when dump addresses on an interface
Yu Watanabe [Sun, 23 May 2021 14:21:30 +0000 (23:21 +0900)] 
network: set ifindex when dump addresses on an interface

4 years agosd-netlink: set NETLINK_GET_STRICT_CHK socket option
Yu Watanabe [Fri, 21 May 2021 21:03:40 +0000 (06:03 +0900)] 
sd-netlink: set NETLINK_GET_STRICT_CHK socket option

Then kernel filters out unnecessary info on dumping, e.g. RTM_GETADDR.

4 years agosd-netlink: do not set route type and table by default for RTM_GETROUTE or friends
Yu Watanabe [Mon, 24 May 2021 21:49:51 +0000 (06:49 +0900)] 
sd-netlink: do not set route type and table by default for RTM_GETROUTE or friends

4 years agosd-netlink: do not set action for RTM_GETRULE message
Yu Watanabe [Mon, 24 May 2021 13:32:00 +0000 (22:32 +0900)] 
sd-netlink: do not set action for RTM_GETRULE message

Otherwise, when NETLINK_GET_STRICT_CHK socket option is enabled, no rule
will be dumped.

4 years agosd-netlink: do not enable dump flag by default for RTM_GETADDR message
Yu Watanabe [Mon, 24 May 2021 13:47:01 +0000 (22:47 +0900)] 
sd-netlink: do not enable dump flag by default for RTM_GETADDR message

4 years agosd-netlink: do not append prefixlen by default
Yu Watanabe [Mon, 24 May 2021 13:30:44 +0000 (22:30 +0900)] 
sd-netlink: do not append prefixlen by default

Otherwise, when NETLINK_GET_STRICT_CHK socket option is enabled, no
address will be dumped.

4 years agorules.d: Properly quote $env{MODALIAS}
Roshan Shariff [Mon, 24 May 2021 07:30:38 +0000 (01:30 -0600)] 
rules.d: Properly quote $env{MODALIAS}

 Add quotes around use of $env{MODALIAS} in rules.d/80-drivers.rules. The
 modalias can contain whitespace, for example when it is dynamically generated
 using device or vendor IDs.

4 years agoTypo in service.c
Vincent Dechenaux [Mon, 24 May 2021 12:31:06 +0000 (14:31 +0200)] 
Typo in service.c

use => user

4 years agoman: we is OK too -> which is OK too (#19708)
наб [Mon, 24 May 2021 09:39:38 +0000 (11:39 +0200)] 
man: we is OK too -> which is OK too (#19708)

4 years agoMerge pull request #19701 from yuwata/network-udev-do-not-manage-loopback-interfaces
Zbigniew Jędrzejewski-Szmek [Mon, 24 May 2021 05:26:18 +0000 (07:26 +0200)] 
Merge pull request #19701 from yuwata/network-udev-do-not-manage-loopback-interfaces

udev: do not manage loopback interfaces

4 years agoMerge pull request #19704 from yuwata/network-small-fixes
Yu Watanabe [Sun, 23 May 2021 14:02:07 +0000 (23:02 +0900)] 
Merge pull request #19704 from yuwata/network-small-fixes

network: several tiny cleanups

4 years agoudev/net: do not manage loopback interfaces 19701/head
Yu Watanabe [Sun, 23 May 2021 07:59:40 +0000 (16:59 +0900)] 
udev/net: do not manage loopback interfaces

There are nothing we can configure in udevd for loopback interfaces;
no ethertool configs can be applied, MAC address, interface name should
not be touched.

4 years agosd-netlink: rename rtnl_get_link_iftype() -> rtnl_get_link_info() and make it optiona...
Yu Watanabe [Sun, 23 May 2021 07:56:47 +0000 (16:56 +0900)] 
sd-netlink: rename rtnl_get_link_iftype() -> rtnl_get_link_info() and make it optionally return link flags

4 years agoudev/net: rename link_config -> LinkConfig
Yu Watanabe [Sun, 23 May 2021 07:44:03 +0000 (16:44 +0900)] 
udev/net: rename link_config -> LinkConfig

4 years agoudev/net: rename link_config_ctx -> LinkConfigContext
Yu Watanabe [Sun, 23 May 2021 07:37:28 +0000 (16:37 +0900)] 
udev/net: rename link_config_ctx -> LinkConfigContext

4 years agonetwork: IPv6LinkLocalAddressGenerationMode=none disables IPv6LL addressing 19704/head
Yu Watanabe [Fri, 21 May 2021 23:15:00 +0000 (08:15 +0900)] 
network: IPv6LinkLocalAddressGenerationMode=none disables IPv6LL addressing

4 years agonetwork: make link_configure() static
Yu Watanabe [Thu, 20 May 2021 19:02:01 +0000 (04:02 +0900)] 
network: make link_configure() static

4 years agoordered-set: introduce ordered_set_get()
Yu Watanabe [Thu, 20 May 2021 19:01:24 +0000 (04:01 +0900)] 
ordered-set: introduce ordered_set_get()

4 years agoMerge pull request #19681 from yuwata/ethtool-util-log
Yu Watanabe [Sun, 23 May 2021 06:24:46 +0000 (15:24 +0900)] 
Merge pull request #19681 from yuwata/ethtool-util-log

ethtool-util: several cleanups

4 years agoethtool-util: drop unused function 19681/head
Yu Watanabe [Fri, 21 May 2021 19:37:54 +0000 (04:37 +0900)] 
ethtool-util: drop unused function

4 years agoudev/net: drop unnecessary conditions
Yu Watanabe [Fri, 21 May 2021 19:23:51 +0000 (04:23 +0900)] 
udev/net: drop unnecessary conditions

4 years agoudev/net: drop fallback logic to set speed
Yu Watanabe [Thu, 20 May 2021 21:22:37 +0000 (06:22 +0900)] 
udev/net: drop fallback logic to set speed

ethtool_set_glinksettings() already fallback to use ETHTOOL_GSET/ETHTOOL_SSET
commands when ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS are not
supported.

4 years agoethtool-util: do not touch anything if nothing is requested
Yu Watanabe [Fri, 21 May 2021 18:15:16 +0000 (03:15 +0900)] 
ethtool-util: do not touch anything if nothing is requested

And update settings only when it is necessary.

4 years agoethtool-util: disable autonegotiation when speed, duplex, or port is specified
Yu Watanabe [Thu, 20 May 2021 21:03:14 +0000 (06:03 +0900)] 
ethtool-util: disable autonegotiation when speed, duplex, or port is specified

And if autonegotiation is enabled, speed, duplex, and port are ignored.

Fixes #19625.

4 years agoethtool-util: move and rebreak comments
Yu Watanabe [Thu, 20 May 2021 20:32:17 +0000 (05:32 +0900)] 
ethtool-util: move and rebreak comments

4 years agoethtool-util: make ethtool_connect() open fd only when it is not opened
Yu Watanabe [Fri, 21 May 2021 19:07:01 +0000 (04:07 +0900)] 
ethtool-util: make ethtool_connect() open fd only when it is not opened

4 years agoMerge pull request #19697 from jwrdegoede/hwdb-more-accel-quirks
Luca Boccassi [Sat, 22 May 2021 22:57:18 +0000 (23:57 +0100)] 
Merge pull request #19697 from jwrdegoede/hwdb-more-accel-quirks

Hwdb more accel quirks

4 years agoMerge pull request #19700 from keszybz/check-os-release-fixups
Luca Boccassi [Sat, 22 May 2021 22:56:59 +0000 (23:56 +0100)] 
Merge pull request #19700 from keszybz/check-os-release-fixups

Fixups for man/check-os-release.*

4 years agohwdb: keyboard: Ignore duplicate atkbd keypresses on touchpad on/off toggle
Hans de Goede [Sat, 22 May 2021 17:42:21 +0000 (19:42 +0200)] 
hwdb: keyboard: Ignore duplicate atkbd keypresses on touchpad on/off toggle

The atkbd device on the Lenovo Yoga 300-11IBR 2-in-1 sends unknown
keycodes when the touchpad is toggled on/off:

[ 1918.995562] atkbd serio0: Unknown key pressed (translated set 2, code 0x63 on isa0060/serio0).
[ 1918.995610] atkbd serio0: Use 'setkeycodes 63 <keycode>' to make it known.
[ 1919.032121] atkbd serio0: Unknown key released (translated set 2, code 0x63 on isa0060/serio0).
[ 1919.032135] atkbd serio0: Use 'setkeycodes 63 <keycode>' to make it known.
[ 1926.098414] atkbd serio0: Unknown key pressed (translated set 2, code 0x62 on isa0060/serio0).
[ 1926.098461] atkbd serio0: Use 'setkeycodes 62 <keycode>' to make it known.
[ 1926.146537] atkbd serio0: Unknown key released (translated set 2, code 0x62 on isa0060/serio0).
[ 1926.146583] atkbd serio0: Use 'setkeycodes 62 <keycode>' to make it known.

The "Ideapad extra buttons" driver alreadys sends f22 / f23 key-events
when the touchpad is toggles off, so map the keycodes for the duplicate
atkbd events to unknown to silence these kernel warnings.

4 years agoman/check-os-release.*: allow ID_LIKE to have multiple values 19700/head
Zbigniew Jędrzejewski-Szmek [Sat, 22 May 2021 18:29:03 +0000 (20:29 +0200)] 
man/check-os-release.*: allow ID_LIKE to have multiple values

I missed the fact that it is documented to be a space-separated list.

4 years agoman/check-os-release.py: ignore comment and empty lines
Zbigniew Jędrzejewski-Szmek [Sat, 22 May 2021 18:23:02 +0000 (20:23 +0200)] 
man/check-os-release.py: ignore comment and empty lines

Plus fix off-by-one in error printing.

4 years agohwdb: Add accel orientation quirk for the Lenovo Yoga 300-11IBR 2-in-1 19697/head
Hans de Goede [Sat, 22 May 2021 14:22:36 +0000 (16:22 +0200)] 
hwdb: Add accel orientation quirk for the Lenovo Yoga 300-11IBR 2-in-1

Add a quirk for the accelerometer orientation and location for the
2 accelerometers inside the Lenovo Yoga 300-11IBR 2-in-1.

4 years agoMerge pull request #19686 from keszybz/os-release-modernization-and-examples
Lennart Poettering [Sat, 22 May 2021 12:44:50 +0000 (14:44 +0200)] 
Merge pull request #19686 from keszybz/os-release-modernization-and-examples

os-release modernization and examples

4 years agoMerge pull request #19693 from poettering/sleep-tweaks
Lennart Poettering [Sat, 22 May 2021 12:35:26 +0000 (14:35 +0200)] 
Merge pull request #19693 from poettering/sleep-tweaks

sleep code refactoring + automatic fallback from hybrid sleep to suspend

4 years agoman/check-os-release.py: strip trailing whitespace 19686/head
Zbigniew Jędrzejewski-Szmek [Fri, 21 May 2021 13:02:23 +0000 (15:02 +0200)] 
man/check-os-release.py: strip trailing whitespace

The shell parser would do that, so so should we.

4 years agoman: say that initrd-release is like os-release
Zbigniew Jędrzejewski-Szmek [Fri, 21 May 2021 09:11:01 +0000 (11:11 +0200)] 
man: say that initrd-release is like os-release

4 years agohwdb: Add accel orientation quirk for the KD Kurio Smart C15200 tablet
Hans de Goede [Wed, 12 May 2021 17:05:18 +0000 (19:05 +0200)] 
hwdb: Add accel orientation quirk for the KD Kurio Smart C15200 tablet

Add a quirk to fix the accelerometer orientation on the
KD Kurio Smart C15200 tablet.

4 years agosleep: clarify that failure setting env var is not fatal 19693/head
Lennart Poettering [Fri, 21 May 2021 18:24:54 +0000 (20:24 +0200)] 
sleep: clarify that failure setting env var is not fatal

4 years agosleep: if hybrid sleep fails, do regular suspend
Lennart Poettering [Fri, 21 May 2021 16:39:38 +0000 (18:39 +0200)] 
sleep: if hybrid sleep fails, do regular suspend

Fixes #19550

4 years agosleep: remove duplicate logging
Lennart Poettering [Fri, 21 May 2021 16:39:06 +0000 (18:39 +0200)] 
sleep: remove duplicate logging

execute() logs about all errors, hence only log about what's new, i.e.
what we'll do as consequence, and don't mention the error cause again.

4 years agosleep: don't check for EADV
Lennart Poettering [Fri, 21 May 2021 16:27:04 +0000 (18:27 +0200)] 
sleep: don't check for EADV

EADV is not generated anymore since
6d176522f5480ea9e9a83de5ef5ea5e0d95b79cb, let's hence not check for it
anymore.

4 years agosleep: can_sleep_state() + can_sleep_disk() don#t return plain booleans
Lennart Poettering [Fri, 21 May 2021 16:26:48 +0000 (18:26 +0200)] 
sleep: can_sleep_state() + can_sleep_disk() don#t return plain booleans

4 years agosleep: use SleepOperation enum everywhere and drop sleep_settings()
Lennart Poettering [Fri, 21 May 2021 16:23:42 +0000 (18:23 +0200)] 
sleep: use SleepOperation enum everywhere and drop sleep_settings()

Instead of comparing strings everywhere, let's use the new enum. This
allows us to drop sleep_settings(), since the operation enum can be
directly used as index into the config settings.

Some minor other refactoring is done, but mostly just shifting thing
around a bit, no actual change in behaviour.

4 years agosleep: introduce high-level SleepOperation enum
Lennart Poettering [Thu, 20 May 2021 20:31:17 +0000 (22:31 +0200)] 
sleep: introduce high-level SleepOperation enum

4 years agounits: make sure importd has CAP_LINUX_IMMUTABLE flag
Lennart Poettering [Fri, 21 May 2021 20:04:33 +0000 (22:04 +0200)] 
units: make sure importd has CAP_LINUX_IMMUTABLE flag

Since d8f9686c0f1f276c0a687d9bd69f3adf33f15a95 we use the chattr +i flag
for marking containers in directories as reead-only. But to do so we
need the cap for it, hence grant it.

Fixes: #19115
4 years agoMerge pull request #19594 from yuwata/network-nexthop-group
Yu Watanabe [Sat, 22 May 2021 07:01:13 +0000 (16:01 +0900)] 
Merge pull request #19594 from yuwata/network-nexthop-group

network: nexthop: add Group= setting to configure multipath route with group nexthop

4 years agoMerge pull request #19691 from poettering/read-virtual-file-tweaks
Yu Watanabe [Sat, 22 May 2021 06:59:17 +0000 (15:59 +0900)] 
Merge pull request #19691 from poettering/read-virtual-file-tweaks

tweaks to read_virtual_file()

4 years agounits: skip some units in the initrd
Zbigniew Jędrzejewski-Szmek [Fri, 21 May 2021 08:53:25 +0000 (10:53 +0200)] 
units: skip some units in the initrd

I'm working on building initramfs images directly from normal packages, and it
doesn't make sense for those units to be started. Pristine system rpms need to
behave correctly as much as possible also in the initrd, and those units are
enabled by the rpms. There usually isn't enough time for the timer to actually
fire, but starting it gives a line on the console and generally looks confusing
and sloppy. Flushing the journal means that its actually lost, since the real
/var is not available yet.

Another approach would be not enable those units, but right now they are
statically enabled, and changing that would be more work, and doesn't really
seem necessary, since the condition checks are very quick.

Checking for /etc/initrd-release is the standard condition that the initrd
units use, so let's do the same here.

4 years agotest-network: add a test case for nexthop Group= setting 19594/head
Yu Watanabe [Thu, 13 May 2021 02:11:48 +0000 (11:11 +0900)] 
test-network: add a test case for nexthop Group= setting

4 years agonetwork: nexthop: add Group= setting to configure multipath route with group nexthop
Yu Watanabe [Fri, 14 May 2021 01:15:23 +0000 (10:15 +0900)] 
network: nexthop: add Group= setting to configure multipath route with group nexthop

4 years agonetwork: nexthop: IFF_UP flag is required for nexthops which attached to a link
Yu Watanabe [Tue, 18 May 2021 03:20:46 +0000 (12:20 +0900)] 
network: nexthop: IFF_UP flag is required for nexthops which attached to a link

4 years agonetwork: make nexthop_add(), nexthop_configure() and friends return 0 on success
Yu Watanabe [Wed, 12 May 2021 19:59:56 +0000 (04:59 +0900)] 
network: make nexthop_add(), nexthop_configure() and friends return 0 on success

After request queue is introduced, the return value on success is unused.

4 years agofileio: read_virtual_file(): on last attempt ignore file size 19691/head
Lennart Poettering [Fri, 21 May 2021 15:40:19 +0000 (17:40 +0200)] 
fileio: read_virtual_file(): on last attempt ignore file size

Apparently the reported file size was misleading on this file, hence
ignore it on our last loop attempt and just pretend it wasn't reported
at all.

4 years agotest-fileio: run read_virtual_file() for a couple of more interesting sizes
Lennart Poettering [Fri, 21 May 2021 15:36:40 +0000 (17:36 +0200)] 
test-fileio: run read_virtual_file() for a couple of more interesting sizes

4 years agotest-fileio: fix confusing log output
Lennart Poettering [Fri, 21 May 2021 15:35:12 +0000 (17:35 +0200)] 
test-fileio: fix confusing log output

Previously we'd pass all return values of read_virtual_file() to
log_info_errno() as error, but that makes no sense, given that we
sometimes return positive one with means "not truncated" but we'd show
as "Permission denied. Let's fix this, and log differently for sucess
and error.

4 years agofileio: read_virtual_file() don't tweak buffer for returning it when we aren't return...
Lennart Poettering [Fri, 21 May 2021 15:33:32 +0000 (17:33 +0200)] 
fileio: read_virtual_file() don't tweak buffer for returning it when we aren't returning it

Let's avoid some redundant work.

Moreover, let' not check for NUL bytes in the buffer if we don't return
the buffer.

4 years agofileio: fix typo in comment
Lennart Poettering [Fri, 21 May 2021 14:32:37 +0000 (16:32 +0200)] 
fileio: fix typo in comment

4 years agofileio: read_virtual_file(): exit once the max_size limit is reached
Lennart Poettering [Fri, 21 May 2021 14:31:52 +0000 (16:31 +0200)] 
fileio: read_virtual_file(): exit once the max_size limit is reached

Alternative to: #19682

4 years agofileio: if we try to read a file larger than SIZE_MAX this is not a problem if a...
Lennart Poettering [Fri, 21 May 2021 14:30:52 +0000 (16:30 +0200)] 
fileio: if we try to read a file larger than SIZE_MAX this is not a problem if a max_size is specified

i.e. 32bit userspace reading /proc/kcore on a 64bit kernel with max_size
should not needlessly fail.

4 years agonetwork: route: make stored multipath route weight equivalent to hop of nexthop
Yu Watanabe [Thu, 13 May 2021 06:07:35 +0000 (15:07 +0900)] 
network: route: make stored multipath route weight equivalent to hop of nexthop

4 years agoethtool-util: downgrade log level
Yu Watanabe [Thu, 20 May 2021 20:30:28 +0000 (05:30 +0900)] 
ethtool-util: downgrade log level

This just hides issue #19625. It will be fixed in later commits.

4 years agotest-env-util: use streq_ptr when comparing directly the result of getenv
Luca Boccassi [Fri, 21 May 2021 12:39:24 +0000 (13:39 +0100)] 
test-env-util: use streq_ptr when comparing directly the result of getenv

It might return NULL.

Fixes CID #1453247

4 years agosd-device: use strjoina() more again in sd_device_new_from_subsystem_sysname()
Lennart Poettering [Mon, 10 May 2021 14:41:46 +0000 (16:41 +0200)] 
sd-device: use strjoina() more again in sd_device_new_from_subsystem_sysname()

This reverts a major part of: e17c95af8e450caacde692875b30675cea75211f

Using format strings for concatenating strings is pretty unefficient,
and using PATH_MAX buffers unpretty as well. Let's revert to using
strjoina() as before.

However, to fix the fuzz issue at hand, let's explicitly verify the two
input strings ensuring they are valid path names. This includes a length
check (to 2K each), thus making things prettier, faster and using less
memory again.

4 years agoMerge pull request #19676 from bluca/coverity
Lennart Poettering [Fri, 21 May 2021 15:52:36 +0000 (17:52 +0200)] 
Merge pull request #19676 from bluca/coverity

Fix two new coverity issues

4 years agoMerge pull request #19672 from yuwata/strextend
Lennart Poettering [Fri, 21 May 2021 15:52:14 +0000 (17:52 +0200)] 
Merge pull request #19672 from yuwata/strextend

tree-wide: introduce strextendf_with_separator() and use strextend() or freinds

4 years agoman: reword description of BUILD_ID in os-release
Zbigniew Jędrzejewski-Szmek [Thu, 20 May 2021 18:37:55 +0000 (20:37 +0200)] 
man: reword description of BUILD_ID in os-release

Our description was pretty hard to parse. Let's replace it with a description
loosely based on a fairly clear description written by a distro that actually
uses BUILD_ID:
https://developer.rigado.com/docsets/Working-with-the-Rigado-Vesta-Gateway/latest/production/versioning-images.html#the-rigos-scheme.

4 years agoMerge pull request #19647 from ddstreet/test-oomd-failure
Lennart Poettering [Fri, 21 May 2021 14:35:16 +0000 (16:35 +0200)] 
Merge pull request #19647 from ddstreet/test-oomd-failure

handle lack of kernel support for some cgroup files

4 years agoman: add example os-release mangling in python
Zbigniew Jędrzejewski-Szmek [Thu, 20 May 2021 18:00:18 +0000 (20:00 +0200)] 
man: add example os-release mangling in python

This is also not entirely obvious. I think the code I came
up with is pretty elegant ;] The final part of of the code that makes
use of the parsed data is kept very similar to the shell code on purpose,
even though it could be written a bit more idiomatically.

4 years agoman: add an example how to correctly read os-release in shell
Zbigniew Jędrzejewski-Szmek [Thu, 20 May 2021 17:47:55 +0000 (19:47 +0200)] 
man: add an example how to correctly read os-release in shell

This is not entirely obvious.

The logic of how to interpret the fields applies in any language, so drop the
pointless mention of C or shell.

4 years agoman: reorder fields in os-release
Zbigniew Jędrzejewski-Szmek [Thu, 20 May 2021 12:57:06 +0000 (14:57 +0200)] 
man: reorder fields in os-release

Let's order the fields from the most general to least: os name, os variant, os
version, machine-parseable version details, metadata, special settings. I added
section headers to roughly group the settings. The division is not strict,
because for example CPE_NAME also includes the version, and PRETTY_NAME may
too, but it still makes it easier to find the right name.

Also split out Examples to separate paragraphs:
almost all descriptions had "Example:" at the end, where multiple
examples were listed. Splitting this out to separate paragraphs
makes the whole thing much easier to read.

Add missing markup and punctuation while at it.

About
- If not set, defaults to <literal>NAME=Linux</literal>.
+ If not set, a default of <literal>NAME=Linux</literal> may be used.
and similar changes: in many circumstances, if this is not set, no value should
be used. The fallback mostly make sense when we need to present something to the
user. So let's reword this to not imply that the default is necessary.

4 years agonetwork: fix an infinite loop
Yu Watanabe [Thu, 20 May 2021 07:14:17 +0000 (16:14 +0900)] 
network: fix an infinite loop

Fixes #19467.

4 years agoman: prevent race condition when generating systemd.directives.xml
asavah [Wed, 19 May 2021 20:58:02 +0000 (23:58 +0300)] 
man: prevent race condition when generating systemd.directives.xml

4 years agooom: log one-time warning if kernel doesn't provide memory.swap.current 19647/head
Dan Streetman [Fri, 14 May 2021 12:08:33 +0000 (08:08 -0400)] 
oom: log one-time warning if kernel doesn't provide memory.swap.current

The kernel can be compiled without support for any memory.swap.* files, or
it can be disabled at boot time with the 'swapaccount=0' boot parameter,
so if the file doesn't exist log warning indicating the kernel doesn't
support the file and the user may need to try using the 'swapaccount=1'
boot param.

Note that the actual error from the call to fopen() is ENOENT, but
that is translated into ENODATA in cg_get_attribute_as_uint64()

4 years agopsi: update is_pressure_supported to read file
Dan Streetman [Wed, 19 May 2021 18:22:28 +0000 (14:22 -0400)] 
psi: update is_pressure_supported to read file

The kernel still provides the /proc and cgroup pressure files even
if its psi support is disabled, so we need to actually read the files
to verify they don't return -EOPNOTSUPP

4 years agolog: add log_once() and log_once_errno() macros
Dan Streetman [Wed, 19 May 2021 14:22:21 +0000 (10:22 -0400)] 
log: add log_once() and log_once_errno() macros

These macros will log a message at the specified level only the first time
they are called. On all later calls, if the specified level is debug, the
logs will be suppressed; otherwise the message will be logged at debug.

4 years agomacro: add ONCE macro that evaluates to 1 one time
Dan Streetman [Wed, 19 May 2021 14:01:59 +0000 (10:01 -0400)] 
macro: add ONCE macro that evaluates to 1 one time

Every location that this macro is used, it will be true the first
time it's checked, then false each time after that.

This can be useful for things such as one-time logging.

4 years agofileio: make return parameters of read_virtual_file() optional
Lennart Poettering [Thu, 20 May 2021 19:26:56 +0000 (21:26 +0200)] 
fileio: make return parameters of read_virtual_file() optional

Prompted by: #19647

4 years agoMerge pull request #19551 from cgzones/fix_reload
Lennart Poettering [Thu, 20 May 2021 19:37:59 +0000 (21:37 +0200)] 
Merge pull request #19551 from cgzones/fix_reload

selinux: reload label db on policy load with libselinux 3.2

4 years agoMerge pull request #19605 from yuwata/network-fdb-outgoing-interface
Lennart Poettering [Thu, 20 May 2021 19:33:14 +0000 (21:33 +0200)] 
Merge pull request #19605 from yuwata/network-fdb-outgoing-interface

network: bridge-fdb: add support to specify outgoing interface

4 years agoman: mention that drop-in files are merged in alphanumeric order
Yu Watanabe [Thu, 20 May 2021 06:55:06 +0000 (15:55 +0900)] 
man: mention that drop-in files are merged in alphanumeric order

This addresses the request in https://github.com/systemd/systemd/issues/19467#issuecomment-829332877.

4 years agosysv-generator: use strextend_with_separator() 19672/head
Yu Watanabe [Thu, 20 May 2021 05:54:32 +0000 (14:54 +0900)] 
sysv-generator: use strextend_with_separator()

4 years agosystemctl: use strextend_with_separator()
Yu Watanabe [Thu, 20 May 2021 05:58:12 +0000 (14:58 +0900)] 
systemctl: use strextend_with_separator()

4 years agorun: use strextend_with_separator()
Yu Watanabe [Thu, 20 May 2021 05:41:48 +0000 (14:41 +0900)] 
run: use strextend_with_separator()

4 years agonspawn: use strextendf_with_separator()
Yu Watanabe [Thu, 20 May 2021 05:36:14 +0000 (14:36 +0900)] 
nspawn: use strextendf_with_separator()

4 years agoresolved: check return value of gcrypt APIs 19676/head
Luca Boccassi [Thu, 20 May 2021 09:36:18 +0000 (10:36 +0100)] 
resolved: check return value of gcrypt APIs

Coverity complains about missing error check.

CID #1453234

4 years agojournal: fix uninitialized variable use
Luca Boccassi [Thu, 20 May 2021 09:35:36 +0000 (10:35 +0100)] 
journal: fix uninitialized variable use

If the journal file being processed is archivied, seqnum_id will not be
initialized before being passed on, and coverity complains.
Initialize it to zero.

CID #1453235

4 years agotest-network: add a testcase for OutgoingInterface= in [BridgeFDB] 19605/head
Yu Watanabe [Fri, 14 May 2021 05:52:32 +0000 (14:52 +0900)] 
test-network: add a testcase for OutgoingInterface= in [BridgeFDB]

4 years agonetwork: bridge-fdb: add support to specify outgoing interface
Susant Sahani [Fri, 14 May 2021 05:28:18 +0000 (14:28 +0900)] 
network: bridge-fdb: add support to specify outgoing interface

4 years agonetwork: use queue to configure bridge FDB
Yu Watanabe [Fri, 14 May 2021 05:05:00 +0000 (14:05 +0900)] 
network: use queue to configure bridge FDB

4 years agonetwork: bridgeFDB: rename FdbEntry -> BridgeFDB
Yu Watanabe [Fri, 14 May 2021 04:24:48 +0000 (13:24 +0900)] 
network: bridgeFDB: rename FdbEntry -> BridgeFDB

4 years agonetworkctl: use strextend()
Yu Watanabe [Thu, 20 May 2021 05:28:20 +0000 (14:28 +0900)] 
networkctl: use strextend()

4 years agosd-bus: use strextend()
Yu Watanabe [Thu, 20 May 2021 05:24:57 +0000 (14:24 +0900)] 
sd-bus: use strextend()

4 years agoescape: use strextend()
Yu Watanabe [Thu, 20 May 2021 05:22:58 +0000 (14:22 +0900)] 
escape: use strextend()

4 years agopid1: use strextend_with_separator()
Yu Watanabe [Thu, 20 May 2021 05:19:22 +0000 (14:19 +0900)] 
pid1: use strextend_with_separator()

4 years agoenv-util: use strextend()
Yu Watanabe [Thu, 20 May 2021 05:15:34 +0000 (14:15 +0900)] 
env-util: use strextend()

4 years agonetwork: route: make log_route_debug() show weight for multipath route
Yu Watanabe [Thu, 20 May 2021 05:07:34 +0000 (14:07 +0900)] 
network: route: make log_route_debug() show weight for multipath route

4 years agostring-util: introduce strextendf_with_separator()
Yu Watanabe [Thu, 20 May 2021 04:56:37 +0000 (13:56 +0900)] 
string-util: introduce strextendf_with_separator()

4 years agoMerge pull request #19669 from mrc0mmand/ci-mkosi-arch
Luca Boccassi [Thu, 20 May 2021 09:14:30 +0000 (10:14 +0100)] 
Merge pull request #19669 from mrc0mmand/ci-mkosi-arch

ci: work around #19442 to make CI happy again