]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoNEWS: add blurbs about -Dmode= and oomd/oomctl 17363/head
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:56:05 +0000 (15:56 +0200)] 
NEWS: add blurbs about -Dmode= and oomd/oomctl

3 years agomeson: enable oomd by default in developer mode
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:53:57 +0000 (15:53 +0200)] 
meson: enable oomd by default in developer mode

We want to compile the new code in CI without having to explicitly specify
-Doomd=true everywhere. Let's enable it by default, and rely on distros
setting -Dmode=release to not have it enabled by default.

3 years agoMerge pull request #15206 from anitazha/systoomd-v0
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 12:16:52 +0000 (14:16 +0200)] 
Merge pull request #15206 from anitazha/systoomd-v0

systemd-oomd

3 years agoMerge pull request #17359 from poettering/lesssecuresecure
Lennart Poettering [Thu, 15 Oct 2020 11:55:57 +0000 (13:55 +0200)] 
Merge pull request #17359 from poettering/lesssecuresecure

paranoia: getenv_bool_secure("SYSTEMD_PAGERSECURE")

3 years agosystemctl: fix tabs indentations 17359/head
Lennart Poettering [Thu, 15 Oct 2020 08:56:01 +0000 (10:56 +0200)] 
systemctl: fix tabs indentations

3 years agopager: lets check SYSTEMD_PAGERSECURE with secure_getenv()
Lennart Poettering [Thu, 15 Oct 2020 08:54:48 +0000 (10:54 +0200)] 
pager: lets check SYSTEMD_PAGERSECURE with secure_getenv()

I can't think of any real vulnerability about this, but it still feels
better to check a variable with "secure" in its name with
secure_getenv() rather than plain getenv().

Paranoia FTW!

3 years agoupdate NEWS
Lennart Poettering [Thu, 15 Oct 2020 08:52:40 +0000 (10:52 +0200)] 
update NEWS

3 years agohwdb: mount matrix for Chuwi Hi8 (CWI509) (#17355)
Máté Pozsgay [Thu, 15 Oct 2020 06:17:31 +0000 (08:17 +0200)] 
hwdb: mount matrix for Chuwi Hi8 (CWI509) (#17355)

3 years agomeson: disable systemd-oomd by default 15206/head
Anita Zhang [Thu, 15 Oct 2020 06:14:15 +0000 (23:14 -0700)] 
meson: disable systemd-oomd by default

systemd-oomd can be enabled when in developer mode (-Dmode=developer)

3 years agoMerge pull request #17354 from dtardon/udev-cleanup
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 06:01:01 +0000 (08:01 +0200)] 
Merge pull request #17354 from dtardon/udev-cleanup

some udev cleanup

3 years agosd-bus: break the loop in bus_ensure_running() if the bus is not connecting
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2020 12:03:13 +0000 (14:03 +0200)] 
sd-bus: break the loop in bus_ensure_running() if the bus is not connecting

This might fix #17025:
> the call trace is
> bus_ensure_running -> sd_bus_process -> bus_process_internal -> process_closeing --> sd_bus_close
>                                                                                  |
>                                                                                  \-> process_match

We ended doing callouts to the Disconnected matches from bus_ensure_running()
and shouldn't. bus_ensure_running() should never do callouts. This change
should fix this however: once we notice that the connection is going down we
will now fail instantly with ENOTOCONN instead of calling any callbacks.

3 years agoMerge pull request #17317 from yuwata/network-gateway-dhcp4-ra
Yu Watanabe [Thu, 15 Oct 2020 00:11:59 +0000 (09:11 +0900)] 
Merge pull request #17317 from yuwata/network-gateway-dhcp4-ra

network: about Gateway=_dhcp4 or _ipv6ra

3 years agotest-network: do not use deprecated value 17317/head
Yu Watanabe [Mon, 12 Oct 2020 08:06:35 +0000 (17:06 +0900)] 
test-network: do not use deprecated value

3 years agonetwork: warn if dynamic gateway is specified but corresponding protocol is disabled
Yu Watanabe [Mon, 12 Oct 2020 08:04:04 +0000 (17:04 +0900)] 
network: warn if dynamic gateway is specified but corresponding protocol is disabled

3 years agonetwork: introduce network_adjust_dhcp()
Yu Watanabe [Mon, 12 Oct 2020 07:52:33 +0000 (16:52 +0900)] 
network: introduce network_adjust_dhcp()

3 years agonetwork: introduce network_adjust_ipv6_accept_ra()
Yu Watanabe [Mon, 12 Oct 2020 07:36:54 +0000 (16:36 +0900)] 
network: introduce network_adjust_ipv6_accept_ra()

3 years agonetwork: when Gateway=_dhcp4, set several properties based on lease if they are not...
Yu Watanabe [Mon, 12 Oct 2020 06:52:02 +0000 (15:52 +0900)] 
network: when Gateway=_dhcp4, set several properties based on lease if they are not explicitly specified

Before this commit, event when Gateway=_dhcp4 or _ra is set, the
route was configured with 'protocol static', and other properties
specified by RouteTable=, RouteMTU=, or etc, were ignored.

This commit makes set the route protocol based on the protocol the
gateway address is obtained, and apply other settings if it is not
explicitly specified in the [Route] section.

3 years agonetwork: determine a [Route] section will be used or not by gateway family instead...
Yu Watanabe [Mon, 12 Oct 2020 06:12:55 +0000 (15:12 +0900)] 
network: determine a [Route] section will be used or not by gateway family instead of route family

By this commit, user can configure dynamic IPv6 Gateway with IPv4
destination.

3 years agonetwork: when Gateway=_dhcp, assume gateway family based on other settings
Yu Watanabe [Mon, 12 Oct 2020 06:07:49 +0000 (15:07 +0900)] 
network: when Gateway=_dhcp, assume gateway family based on other settings

3 years agonetwork: rename Gateway=_dhcp6 -> Gateway=_ipv6ra
Yu Watanabe [Mon, 12 Oct 2020 05:52:11 +0000 (14:52 +0900)] 
network: rename Gateway=_dhcp6 -> Gateway=_ipv6ra

3 years agonetwork: rename gateway_from_dhcp -> gateway_from_dhcp_or_ra
Yu Watanabe [Mon, 12 Oct 2020 05:44:04 +0000 (14:44 +0900)] 
network: rename gateway_from_dhcp -> gateway_from_dhcp_or_ra

As for IPv6 case gateway is given by RA.

3 years agoMerge pull request #17351 from poettering/exec-rt-typo-fix
Lennart Poettering [Wed, 14 Oct 2020 17:41:27 +0000 (19:41 +0200)] 
Merge pull request #17351 from poettering/exec-rt-typo-fix

fix one character typo in execute.c

3 years agoMerge pull request #17350 from poettering/bus-read-array
Lennart Poettering [Wed, 14 Oct 2020 17:41:01 +0000 (19:41 +0200)] 
Merge pull request #17350 from poettering/bus-read-array

sd-bus: initialize return values on success in sd_bus_message_read_ar…

3 years agobootctl: separate boot loader specific commands in man and --help
Lennart Poettering [Tue, 13 Oct 2020 11:40:21 +0000 (13:40 +0200)] 
bootctl: separate boot loader specific commands in man and --help

bootctl implements three types of operation: those that work with an EFI
boot loader, those which work with any EFI boot loader that implements
the boot loader spec + interface, and finally those specific to sd-boot.
Previously the --help text and the man page mixed them all up. Let's put
them clearly in three separate sections however, to communicate clearly
what is supposed to work everywhere, and what is specific to
systemd-boot or boot loaders implementing the two specs.

This adjusts wording here and there, but is mostly just about
re-ordering existing docs, and putting them under new sections.

3 years agoudev-rules: drop pointless cast 17354/head
David Tardon [Thu, 10 Sep 2020 14:22:12 +0000 (16:22 +0200)] 
udev-rules: drop pointless cast

3 years agoudev-ctrl: drop workaround for old kernel bug
David Tardon [Thu, 10 Sep 2020 13:50:15 +0000 (15:50 +0200)] 
udev-ctrl: drop workaround for old kernel bug

It's been 7 years. That should be long enough :-)

This reverts commit b97caef538ae37bd2dc04fc15b448c12a2c9422b.

3 years agoMerge pull request #17270 from keszybz/less-secure-mode
Lennart Poettering [Wed, 14 Oct 2020 16:33:10 +0000 (18:33 +0200)] 
Merge pull request #17270 from keszybz/less-secure-mode

Use less in "secure" mode when under sudo

3 years agoMerge pull request #17188 from keszybz/envvars-posix
Lennart Poettering [Wed, 14 Oct 2020 16:32:22 +0000 (18:32 +0200)] 
Merge pull request #17188 from keszybz/envvars-posix

Follow (mostly) POSIX rules for environment variables

3 years agoMerge pull request #16968 from yuwata/remove-old-device-on-move-event
Lennart Poettering [Wed, 14 Oct 2020 15:49:37 +0000 (17:49 +0200)] 
Merge pull request #16968 from yuwata/remove-old-device-on-move-event

core, udev: remove old device on move event

3 years agoman: update sd_bus_message_read_array() docs to clarify return value 0 vs. 1 17350/head
Lennart Poettering [Wed, 14 Oct 2020 15:08:26 +0000 (17:08 +0200)] 
man: update sd_bus_message_read_array() docs to clarify return value 0 vs. 1

3 years agosd-bus: initialize return values on success in sd_bus_message_read_array()
Lennart Poettering [Wed, 14 Oct 2020 14:35:55 +0000 (16:35 +0200)] 
sd-bus: initialize return values on success in sd_bus_message_read_array()

Fixes: #17346
3 years agoMerge pull request #17338 from poettering/close-range
Lennart Poettering [Wed, 14 Oct 2020 15:22:15 +0000 (17:22 +0200)] 
Merge pull request #17338 from poettering/close-range

make use of new kernel 5.9 close_range() syscall in close_all_fds()

3 years agocore: debug log about received fds 17351/head
Lennart Poettering [Wed, 14 Oct 2020 14:35:37 +0000 (16:35 +0200)] 
core: debug log about received fds

3 years agoexecute: make sure some more functions follow coding style
Lennart Poettering [Wed, 14 Oct 2020 14:33:33 +0000 (16:33 +0200)] 
execute: make sure some more functions follow coding style

Initialize all return values on success, as our usual coding style
suggests.

3 years agoexecute: fix single character typo
Lennart Poettering [Wed, 14 Oct 2020 14:21:04 +0000 (16:21 +0200)] 
execute: fix single character typo

Corrects: c413bb28df0996be99fd6b3f2335dfe8739d62fb

Fixes: #17313
3 years agoMerge pull request #17342 from yuwata/network-dhcp-ipv4-acd-fixes
Yu Watanabe [Wed, 14 Oct 2020 14:12:41 +0000 (23:12 +0900)] 
Merge pull request #17342 from yuwata/network-dhcp-ipv4-acd-fixes

network: fixes several issues in IPv4 DAD for DHCP4

3 years agoMerge pull request #17267 from yuwata/hashmap_put_strdup
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2020 13:05:15 +0000 (15:05 +0200)] 
Merge pull request #17267 from yuwata/hashmap_put_strdup

hashmap: make hashmap_put_strdup() take hash_ops

3 years agoMerge pull request #17316 from yuwata/network-address-ipv4-peer-issue-17304
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2020 13:02:14 +0000 (15:02 +0200)] 
Merge pull request #17316 from yuwata/network-address-ipv4-peer-issue-17304

network: directly compare with in_addr element for IPv4 case

3 years agoMerge pull request #17341 from yuwata/sd-dhcp-client-fix-eexist-issue-16964
Yu Watanabe [Wed, 14 Oct 2020 09:55:39 +0000 (18:55 +0900)] 
Merge pull request #17341 from yuwata/sd-dhcp-client-fix-eexist-issue-16964

sd-dhcp: make sd_dhcp_client_set_request_option() not return -EEXIST

3 years agonetwork: start dynamic addressing clients like DHCP after setting netdevs
Yu Watanabe [Tue, 13 Oct 2020 07:47:10 +0000 (16:47 +0900)] 
network: start dynamic addressing clients like DHCP after setting netdevs

The function link_acquire_conf() may make the link state 'configuring'
when DHCP6 PD is enabled. Previously link_acquire_conf() was called
before link_enter_join_netdev(), and thus the assertion in the function
might be triggered.

Fixes #17329.

3 years agoupdate TODO 17338/head
Lennart Poettering [Wed, 14 Oct 2020 07:31:26 +0000 (09:31 +0200)] 
update TODO

3 years agotest-fd-util: add test case for close_all_fd()
Lennart Poettering [Tue, 13 Oct 2020 16:08:01 +0000 (18:08 +0200)] 
test-fd-util: add test case for close_all_fd()

3 years agofd-util: port close_all_fds() to close_range()
Lennart Poettering [Tue, 13 Oct 2020 16:06:45 +0000 (18:06 +0200)] 
fd-util: port close_all_fds() to close_range()

3 years agomissing: add close_range() wrapper
Lennart Poettering [Tue, 13 Oct 2020 15:53:25 +0000 (17:53 +0200)] 
missing: add close_range() wrapper

The syscall was added in 5.9 and is not yet exposed in glibc, hence
define our own wrapper.

3 years agoseccomp: allowlist close_range() by default in @basic-io
Lennart Poettering [Wed, 14 Oct 2020 07:40:37 +0000 (09:40 +0200)] 
seccomp: allowlist close_range() by default in @basic-io

3 years agoalloc-util: avoid allocating zero size memory blocks
Lennart Poettering [Wed, 14 Oct 2020 08:24:08 +0000 (10:24 +0200)] 
alloc-util: avoid allocating zero size memory blocks

It's not clear what libc's make of this. We clamp to 1 byte allocations
in most cases already, let's add this for a few where this was missing.

3 years agoanalyze: show ungrouped syscalls separately (#17343)
Lennart Poettering [Wed, 14 Oct 2020 08:31:59 +0000 (10:31 +0200)] 
analyze: show ungrouped syscalls separately (#17343)

This updates the "systemd-analyze syscall-filter" command to show a
special section of syscalls that are included in @known but in no other
group. Typically this should show syscalls we either should add to any
of the existing groups or where we unsure were they best fit in.

Right now, it mostly shows arch-specific compat syscalls, we probably
should move "@obsolete". This patch doesn't add thta however.

3 years agopager: make pager secure when under euid is changed or explicitly requested 17270/head
Zbigniew Jędrzejewski-Szmek [Wed, 7 Oct 2020 09:15:05 +0000 (11:15 +0200)] 
pager: make pager secure when under euid is changed or explicitly requested

The variable is renamed to SYSTEMD_PAGERSECURE (because it's not just about
less now), and we automatically enable secure mode in certain cases, but not
otherwise.

This approach is more nuanced, but should provide a better experience for
users:

- Previusly we would set LESSSECURE=1 and trust the pager to make use of
  it. But this has an effect only on less. We need to not start pagers which
  are insecure when in secure mode. In particular more is like that and is a
  very popular pager.

- We don't enable secure mode always, which means that those other pagers can
  reasonably used.

- We do the right thing by default, but the user has ultimate control by
  setting SYSTEMD_PAGERSECURE.

Fixes #5666.

v2:
- also check $PKEXEC_UID

v3:
- use 'sd_pid_get_owner_uid() != geteuid()' as the condition

3 years agonetwork: update MAC address in IPv4ACD client for DHCP4 17342/head
Yu Watanabe [Wed, 14 Oct 2020 06:29:47 +0000 (15:29 +0900)] 
network: update MAC address in IPv4ACD client for DHCP4

3 years agonetwork: also stop IPv4ACD client in link_stop_clients()
Yu Watanabe [Wed, 14 Oct 2020 06:27:57 +0000 (15:27 +0900)] 
network: also stop IPv4ACD client in link_stop_clients()

3 years agonetwork: stop IPv4ACD client for DHCPv4 when lease is exprired
Yu Watanabe [Wed, 14 Oct 2020 06:26:19 +0000 (15:26 +0900)] 
network: stop IPv4ACD client for DHCPv4 when lease is exprired

3 years agonetwork: move IPv4ACD client for DHCPv4 from Network to Link object
Yu Watanabe [Wed, 14 Oct 2020 06:22:56 +0000 (15:22 +0900)] 
network: move IPv4ACD client for DHCPv4 from Network to Link object

A .network file may matches multiple interfaces.

3 years agonetwork: voidify link_stop_clients() in link_enter_failed()
Yu Watanabe [Wed, 14 Oct 2020 06:14:56 +0000 (15:14 +0900)] 
network: voidify link_stop_clients() in link_enter_failed()

3 years agonetwork: drop unused condition 17341/head
Yu Watanabe [Wed, 14 Oct 2020 04:02:46 +0000 (13:02 +0900)] 
network: drop unused condition

3 years agosd-dhcp-client: make sd_dhcp_client_set_request_option() not return -EEXIST
Yu Watanabe [Wed, 14 Oct 2020 03:47:58 +0000 (12:47 +0900)] 
sd-dhcp-client: make sd_dhcp_client_set_request_option() not return -EEXIST

Fixes #16964.

3 years agotypo in systemd.network(5): IPv6PrefixDelegation=dhcpv6
Dmitry Borodaenko [Tue, 13 Oct 2020 21:35:59 +0000 (14:35 -0700)] 
typo in systemd.network(5): IPv6PrefixDelegation=dhcpv6

3 years agounits: update serial-getty@.service to support 57600 baud rate
Bjørn Mork [Tue, 13 Oct 2020 15:07:07 +0000 (17:07 +0200)] 
units: update serial-getty@.service to support 57600 baud rate

Fixes: #17306
3 years agosd-device: use trivial_hash_ops_free_free for managing match sysattrs or properties 17267/head
Yu Watanabe [Tue, 13 Oct 2020 13:41:34 +0000 (22:41 +0900)] 
sd-device: use trivial_hash_ops_free_free for managing match sysattrs or properties

This fixes an issue caused by eb1c1dc029c91750e6255c3fd844b4f4bf238fab.

Before the commit, multiple values can be specified for the same
sysattr or property.

Fixes #17259.

3 years agoutil: introduce two trivial hash_ops
Yu Watanabe [Tue, 13 Oct 2020 13:40:19 +0000 (22:40 +0900)] 
util: introduce two trivial hash_ops

Will be used in a later commit.

3 years agohashmap: introduce {hashmap,set}_put_strdup_full()
Yu Watanabe [Tue, 13 Oct 2020 13:39:02 +0000 (22:39 +0900)] 
hashmap: introduce {hashmap,set}_put_strdup_full()

They can take hash_ops.

3 years agotest-login: always test sd_pid_get_owner_uid(), modernize
Zbigniew Jędrzejewski-Szmek [Mon, 12 Oct 2020 16:57:32 +0000 (18:57 +0200)] 
test-login: always test sd_pid_get_owner_uid(), modernize

A long time some function only worked when in a session, and the test
didn't execute them when sd_pid_get_session() failed. Let's always call
them to increase coverage.

While at it, let's test for ==0 not >=0 where we don't expect the function
to return anything except 0 or error.

3 years agohwdb: update for v247
Zbigniew Jędrzejewski-Szmek [Tue, 13 Oct 2020 07:43:31 +0000 (09:43 +0200)] 
hwdb: update for v247

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

3 years agotest-network: add test for issue #17304 17316/head
Yu Watanabe [Tue, 13 Oct 2020 03:36:26 +0000 (12:36 +0900)] 
test-network: add test for issue #17304

3 years agonetwork: constify arguments
Yu Watanabe [Tue, 13 Oct 2020 06:06:44 +0000 (15:06 +0900)] 
network: constify arguments

3 years agonetwork: read peer address, label, broadcast from rtnl message
Yu Watanabe [Tue, 13 Oct 2020 05:53:46 +0000 (14:53 +0900)] 
network: read peer address, label, broadcast from rtnl message

Then, Address objects in Network and Link can be easily compared by
address_equal().

3 years agonetwork: directly compare with in_addr element for IPv4 case
Yu Watanabe [Sun, 11 Oct 2020 23:51:02 +0000 (08:51 +0900)] 
network: directly compare with in_addr element for IPv4 case

When peer address is set, address_compare_func() (or address_equal())
does not work in link_is_static_address_configured(), as an Address object
stored in a Link does not contain peer addresses. So, we need to also
compare with in_addr element for IPv4 case.

Fixes #17304.

3 years agopo: revert some recent translation changes (#17237)
Daniele Medri [Tue, 13 Oct 2020 10:30:20 +0000 (12:30 +0200)] 
po: revert some recent translation changes (#17237)

This partially reverts 7b8c70ed209:
- È richiesto autenticarsi → Autenticazione richiesta
- «${unit}» → '${unit}'

3 years agosysctl: set kernel.core_pipe_limit=16
Lennart Poettering [Mon, 12 Oct 2020 14:31:42 +0000 (16:31 +0200)] 
sysctl: set kernel.core_pipe_limit=16

We need to make sure that our coredump pattern handler manages to read
process metadata from /proc/$PID/ before the kernel reaps the crashed
process. By default the kernel will reap the process as soon as it can.
By setting kernel.core_pipe_limit to a non-zero the kernel will wait for
userspace to finish before reaping.

We'll set the value to 16, which allows 16 crashes to be
processed in parallel. This matches the MaxConnections= setting in
systemd-coredump.socket.

See: #17301

(This doesn't close 17301, since we probably should also gracefully
handle if /proc/$PID/ vanished already while our coredump handler runs,
just in case people loclly set the sysctl back to zero. i.e. we should
collect what we can and rather issue an incomplete log record than
none.)

3 years agosystemctl: ignore invalid variables in import-environment 17188/head
Zbigniew Jędrzejewski-Szmek [Mon, 28 Sep 2020 15:29:34 +0000 (17:29 +0200)] 
systemctl: ignore invalid variables in import-environment

When doing import-environment, we shouldn't fail if some assignment is invalid.
OTOH, if the invalid assignment is specified as a positional argument, we should
keep failing.

This would also fix https://bugzilla.redhat.com/show_bug.cgi?id=1754395, by
ignoring certain variables which are not important in that scenario. It seems
like the right thing to do in general.

3 years agobasic/env-util: (mostly) follow POSIX for what variable names are allowed
Zbigniew Jędrzejewski-Szmek [Mon, 28 Sep 2020 14:30:53 +0000 (16:30 +0200)] 
basic/env-util: (mostly) follow POSIX for what variable names are allowed

There was some confusion about what POSIX says about variable names:

   names shall not contain the character '='. For values to be portable
   across systems conforming to POSIX.1-2008, the value shall be composed
   of characters from the portable character set (except NUL and as
   indicated below).

i.e. it allows almost all ASCII in variable names (without NUL and DEL and
'='). OTOH, it says that *utilities* use a smaller set of characters:

   Environment variable names used by the utilities in the Shell and
   Utilities volume of POSIX.1-2008 consist solely of uppercase letters,
   digits, and the <underscore> ( '_' ) from the characters defined in
   Portable Character Set and do not begin with a digit.

When enforcing variable names in environment blocks, we need to use this
first definition, so that we can propagate all valid variables.
I think having non-printable characters in variable names is too much, so
I took out the whitespace stuff from the first definition.

OTOH, when we use *shell syntax*, for example doing variable expansion,
it seems enough to support expansion of variables that the shell would allow.

Fixes #14878,
https://bugzilla.redhat.com/show_bug.cgi?id=1754395,
https://bugzilla.redhat.com/show_bug.cgi?id=1879216.

3 years agotest-env-util: print function headers
Zbigniew Jędrzejewski-Szmek [Mon, 28 Sep 2020 12:54:16 +0000 (14:54 +0200)] 
test-env-util: print function headers

3 years agobasic/selinux: work around mallinfo deprecation
Zbigniew Jędrzejewski-Szmek [Fri, 9 Oct 2020 14:48:03 +0000 (16:48 +0200)] 
basic/selinux: work around mallinfo deprecation

Latest glibc has deprecated mallinfo(), so it might become unavailable at some point
in the future. There is malloc_info(), but it returns XML, ffs. I think the information
that we get from mallinfo() is quite useful, so let's use mallinfo() if available, and
not otherwise.

3 years agoupdate TODO
Lennart Poettering [Mon, 12 Oct 2020 11:11:55 +0000 (13:11 +0200)] 
update TODO

3 years agoxdg-autostart: Lower most info messages to debug level
Benjamin Berg [Mon, 12 Oct 2020 09:02:26 +0000 (11:02 +0200)] 
xdg-autostart: Lower most info messages to debug level

It is expected for numerous autostart files to not be convertible to
corresponding units. The information is only useful for someone
debugging why a file might not be started, but it is not generally
useful for users in most situations.

As such, lower the warnings. Anyone wondering why an application is not
started will easily notice that the unit is not generated. From there it
will be somewhat harder to figure out why, but the overall trade-off is
still improved.

Fixes: #17305
3 years agoMerge pull request #17302 from keszybz/fix-inhibitors
Lennart Poettering [Mon, 12 Oct 2020 09:41:18 +0000 (11:41 +0200)] 
Merge pull request #17302 from keszybz/fix-inhibitors

Fix inhibitors

3 years agoMerge pull request #17273 from mrc0mmand/coccinelle-check-for-bad-errno
Lennart Poettering [Mon, 12 Oct 2020 09:39:25 +0000 (11:39 +0200)] 
Merge pull request #17273 from mrc0mmand/coccinelle-check-for-bad-errno

coccinelle: resolve our own macros to avoid skipping functions

3 years agohwdb: Add accel orientation quirk for MPMAN Converter 9 2-in-1
Hans de Goede [Tue, 4 Aug 2020 12:54:57 +0000 (14:54 +0200)] 
hwdb: Add accel orientation quirk for MPMAN Converter 9 2-in-1

Add a quirk to fix the accelerometer orientation on the MPMAN
Converter 9 2-in-1.

3 years agoAdd Lenovo USB touchscreens to 60-autosuspend.hwdb
Hans de Goede [Sat, 10 Oct 2020 14:04:30 +0000 (16:04 +0200)] 
Add Lenovo USB touchscreens to 60-autosuspend.hwdb

Add Lenovo USB touchscreens which can safely autosuspend to hwdb,
this helps the processor reach deaper PC# states when idle.

3 years agoMerge pull request #17292 from poettering/idn-dlsym
Zbigniew Jędrzejewski-Szmek [Sat, 10 Oct 2020 14:25:49 +0000 (16:25 +0200)] 
Merge pull request #17292 from poettering/idn-dlsym

turn libidn/libidn2 dep into dlopen() one

3 years agoresolved: don't append RFC6975 data to stub replies
Lennart Poettering [Fri, 9 Oct 2020 14:47:34 +0000 (16:47 +0200)] 
resolved: don't append RFC6975 data to stub replies

We previously checked the QR bit to decide whether the RFC6975 algorithm
data in our packets. But that doesn't work in many cases, since we
initialize the QR flags along with the other flags usually only after
appending OPT (since success to do so propagates into flags). Hence,
let's add an explicit parameter that controls whether to include RFC6975
data in DNS packets, and set it to false for stub reply, and on true for
upstream queries.

Fixes: #17217
3 years agodocs: clarify that udev watches for IN_CLOSE_WRITE (and not IN_CLOSE)
Lennart Poettering [Fri, 9 Oct 2020 14:10:40 +0000 (16:10 +0200)] 
docs: clarify that udev watches for IN_CLOSE_WRITE (and not IN_CLOSE)

Also, while we are at it, explain that udev won't reprobe if users just
release the lock, they have to close the block device too.

3 years agologind: fix taking of inhibitors 17302/head
Zbigniew Jędrzejewski-Szmek [Sat, 10 Oct 2020 07:52:58 +0000 (09:52 +0200)] 
logind: fix taking of inhibitors

Ooops made in 0a9bf7fa593682326f1c5c2d7ec3d29a9d59e5cb.

3 years agologind: print what action is ignored
Zbigniew Jędrzejewski-Szmek [Sat, 10 Oct 2020 07:49:28 +0000 (09:49 +0200)] 
logind: print what action is ignored

My logs have lines like this:
Oct 10 09:38:38 krowka systemd-logind[1889]: External (2) displays connected.
Oct 10 09:38:38 krowka systemd-logind[1889]: Refusing operation, as it is turned off.
Without some hint *what* operation is ignored, this is not very informative.

(I remember this came up before, but I don't remember why we didn't change this
log line back then...)

3 years agoMerge pull request #17211 from poettering/udev-loop-fixes
Lennart Poettering [Fri, 9 Oct 2020 15:16:07 +0000 (17:16 +0200)] 
Merge pull request #17211 from poettering/udev-loop-fixes

two udev fixes, split out of #16859

3 years agoMerge pull request #17286 from benzea/benzea/xdg-autostart-improvements
Lennart Poettering [Fri, 9 Oct 2020 13:56:43 +0000 (15:56 +0200)] 
Merge pull request #17286 from benzea/benzea/xdg-autostart-improvements

XDG autostart improvements

3 years agomissing_syscall: fixup syscall numbers for x32 vs. amd64
mirabilos [Fri, 9 Oct 2020 06:56:57 +0000 (08:56 +0200)] 
missing_syscall: fixup syscall numbers for x32 vs. amd64

3 years agoupdate TODO 17292/head
Lennart Poettering [Fri, 9 Oct 2020 09:52:47 +0000 (11:52 +0200)] 
update TODO

3 years agoshared: make libidn/libdidn2 dependency a dlopen() one
Lennart Poettering [Fri, 9 Oct 2020 09:52:41 +0000 (11:52 +0200)] 
shared: make libidn/libdidn2 dependency a dlopen() one

3 years agotree-wide: drop if braces around single line expressions as well 17273/head
Frantisek Sumsal [Fri, 9 Oct 2020 13:06:34 +0000 (15:06 +0200)] 
tree-wide: drop if braces around single line expressions as well

3 years agotree-wide: assorted coccinelle fixes
Frantisek Sumsal [Fri, 9 Oct 2020 12:59:44 +0000 (14:59 +0200)] 
tree-wide: assorted coccinelle fixes

3 years agococcinelle: introduce drop-braces transformation
Frantisek Sumsal [Fri, 9 Oct 2020 10:45:03 +0000 (12:45 +0200)] 
coccinelle: introduce drop-braces transformation

to drop braces around single-line if statements. Also, prefix it with
zz- so it runs as the last one, so it's able to fix stuff tweaked by
previous transformations.

3 years agococcinelle: check for invalid errno comparisons
Frantisek Sumsal [Wed, 7 Oct 2020 13:26:16 +0000 (15:26 +0200)] 
coccinelle: check for invalid errno comparisons

Prompted by #15868

3 years agococcinelle: correctly resolve our own macros
Frantisek Sumsal [Wed, 7 Oct 2020 13:24:39 +0000 (15:24 +0200)] 
coccinelle: correctly resolve our own macros

Coccinelle can't do this automagically and requires we supply it
respective header files. Unfortunately, the option for this
(--macro-file=) can be used only once, so let's create our own
macro file by collecting macros needed for the semantic parser
to be happy.

3 years agoudev: make sure to install an inotify watch whenever we find a block device locked 17211/head
Lennart Poettering [Thu, 3 Sep 2020 16:27:53 +0000 (18:27 +0200)] 
udev: make sure to install an inotify watch whenever we find a block device locked

This fixes a race where a block device that pops up and immediately is
locked (such as a loopback device in preparation) might result in
udev never run any rules for it, and thus never turn on inotify watching
for it (as inotify watching is controlled via an option set via udev
rules), thus not noticing when the device is unlocked/closed again
(which is noticed via IN_CLOSE_WRITE inotify events).

This changes two things:

1. Whenever we encounter a locked block device we'll now inotify watch
   it, so that it is guaranteed we'll notice when the BSD lock fd is
   closed again, and will reprobe.

2. We'll now turn off inotify watching again once we realise the
   udev rules don't actually want that. Previously, once watching a
   device was enabled via a udev rule, it would be watched forever until
   the device disappeared, even if the option was dropped by the rules
   for later events.

Together this will make sure that we'll watch the device via inotify
in both of the following cases:

a) The block device has been BSD locked when udev wanted to look at it

b) The udev rules run for the last seen event for the device say so

In all other cases inotify is off for block devices.

This new behaviour both fixes the race, but also makes the most sense,
as the rules (when they are run) actually really control the watch state
now. And if someone BSD locks a block device then it should be OK to
inotify watch it briefly until the lock is released again as the user
this way more or less opts into the locking protocol.

3 years agoudev-util: ignore remove events, we care about initialization after all
Lennart Poettering [Tue, 29 Sep 2020 19:03:49 +0000 (21:03 +0200)] 
udev-util: ignore remove events, we care about initialization after all

3 years agoMerge pull request #17289 from keszybz/two-coverity-fixes
Lennart Poettering [Fri, 9 Oct 2020 09:56:15 +0000 (11:56 +0200)] 
Merge pull request #17289 from keszybz/two-coverity-fixes

Two coverity-inspired fixes

3 years agoman: document systemd-oomd and related items
Anita Zhang [Wed, 9 Sep 2020 08:04:36 +0000 (01:04 -0700)] 
man: document systemd-oomd and related items

3 years agoxdg-autostart: Ignore more common XDG Desktop Entry fields 17286/head
Benjamin Berg [Thu, 8 Oct 2020 13:58:37 +0000 (15:58 +0200)] 
xdg-autostart: Ignore more common XDG Desktop Entry fields

It makes sense to ignore all the common fields that are expected and
that we can safely ignore. Note that it is fine to ignore URL as we will
already warn about the type= being wrong in that case.

Closes: #17276
3 years agoxdg-autostart: Add support for Path= in XDG Desktop File
Benjamin Berg [Thu, 8 Oct 2020 13:58:08 +0000 (15:58 +0200)] 
xdg-autostart: Add support for Path= in XDG Desktop File

This sets the working directory of the application.

3 years agoratelimit: add ratelimit_configured() helper
Lennart Poettering [Thu, 8 Oct 2020 16:40:35 +0000 (18:40 +0200)] 
ratelimit: add ratelimit_configured() helper

This helper alone doesn't make too much sense, but it's preparatory work
for #17274, and I guess it can't hurt to land it early, it does make the
ratelimit code a tiny bit prettier after all.