]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agosystemctl: show original contents when editing unit 13589/head
williamvds [Wed, 21 Oct 2020 16:19:05 +0000 (17:19 +0100)] 
systemctl: show original contents when editing unit

A comment indicates the start of the new contents of the override file,
and another indicates that lines following it will be discarded once
editing is finished.
The contents of the unit file and drop-ins are listed out after this
last marker.

Adds WRITE_STRING_FILE_TRUNCATE to set O_TRUNC when opening a file.

Thanks to cgzones for providing the required SELinux function calls.

Co-authored-by: Christian Göttsche <cgzones@googlemail.com>
5 years agoAdd WRITE_STRING_FILE_TRUNCATE to set O_TRUNC
williamvds [Wed, 21 Oct 2020 16:18:25 +0000 (17:18 +0100)] 
Add WRITE_STRING_FILE_TRUNCATE to set O_TRUNC

5 years agoAdd strv_prepend
williamvds [Wed, 21 Oct 2020 16:14:37 +0000 (17:14 +0100)] 
Add strv_prepend

Inserts a copy of the value at the head of the list.

5 years agoMerge pull request #17344 from keszybz/bus-connect-more-logs
Lennart Poettering [Mon, 19 Oct 2020 15:39:37 +0000 (17:39 +0200)] 
Merge pull request #17344 from keszybz/bus-connect-more-logs

Add some debug logs to help diagnose bus connections

5 years agoMerge pull request #17387 from anitazha/systoomd_fixups
Lennart Poettering [Mon, 19 Oct 2020 15:29:22 +0000 (17:29 +0200)] 
Merge pull request #17387 from anitazha/systoomd_fixups

oomd fixups

5 years agoMerge pull request #17389 from poettering/bootspec-clarifications
Lennart Poettering [Mon, 19 Oct 2020 15:17:10 +0000 (17:17 +0200)] 
Merge pull request #17389 from poettering/bootspec-clarifications

bootspec entry character set clarifications

5 years agodocs: some coding style updates
Lennart Poettering [Mon, 19 Oct 2020 09:39:20 +0000 (11:39 +0200)] 
docs: some coding style updates

Primarily:

1. Mention that we prefer if return parameters carry "ret_" as prefix in
   their name

2. Clarify that debug-level logging is always OK, and irrelevant to when
   deciding whether a function is logging or non-logging.

5 years agotmpfiles: no need to specify a synthetic error code if we don't propagate it 17389/head
Lennart Poettering [Mon, 19 Oct 2020 12:20:26 +0000 (14:20 +0200)] 
tmpfiles: no need to specify a synthetic error code if we don't propagate it

5 years agobootspec: tweak error message
Lennart Poettering [Mon, 19 Oct 2020 12:20:03 +0000 (14:20 +0200)] 
bootspec: tweak error message

Clarify that the name of the entry failed validation, not the entry
itself.

5 years agodoc: document charset to use for bootspec entry names
Lennart Poettering [Mon, 19 Oct 2020 12:19:52 +0000 (14:19 +0200)] 
doc: document charset to use for bootspec entry names

Prompted-by: https://github.com/systemd/systemd/issues/12572#issuecomment-711074702
5 years agounits: drop ConditionCapability from systemd-oomd.service 17387/head
Anita Zhang [Mon, 19 Oct 2020 09:18:00 +0000 (02:18 -0700)] 
units: drop ConditionCapability from systemd-oomd.service

Another suggestion from #15206

5 years agooomd: simplify if/else error check
Anita Zhang [Mon, 19 Oct 2020 09:17:07 +0000 (02:17 -0700)] 
oomd: simplify if/else error check

5 years agocore: move where we send unit change updates to oomd
Anita Zhang [Mon, 19 Oct 2020 08:44:17 +0000 (01:44 -0700)] 
core: move where we send unit change updates to oomd

Post-merge suggestion from #15206

5 years agoNEWS: fix typo
Anita Zhang [Mon, 19 Oct 2020 08:39:36 +0000 (01:39 -0700)] 
NEWS: fix typo

5 years agocore: reindent and align table in load-fragment-gperf.gperf.m4
Anita Zhang [Mon, 19 Oct 2020 08:30:07 +0000 (01:30 -0700)] 
core: reindent and align table in load-fragment-gperf.gperf.m4

5 years agocore: varlink tweaks
Anita Zhang [Mon, 19 Oct 2020 08:11:06 +0000 (01:11 -0700)] 
core: varlink tweaks

Suggested post-merge in #15206

5 years agoTranslated using Weblate (Belarusian)
Zmicer Turok [Fri, 16 Oct 2020 06:30:21 +0000 (08:30 +0200)] 
Translated using Weblate (Belarusian)

Currently translated at 100.0% (187 of 187 strings)

Co-authored-by: Zmicer Turok <nashtlumach@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/be/
Translation: systemd/master

5 years agoMerge pull request #17369 from poettering/kill-log
Zbigniew Jędrzejewski-Szmek [Mon, 19 Oct 2020 07:31:02 +0000 (09:31 +0200)] 
Merge pull request #17369 from poettering/kill-log

log about processed killed due to "systemctl kill"

5 years agoman: document that for Type=dbus services dropping bus name has consequences
Lennart Poettering [Fri, 16 Oct 2020 16:04:59 +0000 (18:04 +0200)] 
man: document that for Type=dbus services dropping bus name has consequences

Fixes: #17150
5 years agoman: document that ConditionKernelCommandLine= looks at /proc/1/environ in containers
Lennart Poettering [Fri, 16 Oct 2020 16:22:37 +0000 (18:22 +0200)] 
man: document that ConditionKernelCommandLine= looks at /proc/1/environ in containers

Fixes: #16941
5 years agoMerge pull request #17367 from bluca/fix_test_50_ubuntu
Zbigniew Jędrzejewski-Szmek [Mon, 19 Oct 2020 07:17:28 +0000 (09:17 +0200)] 
Merge pull request #17367 from bluca/fix_test_50_ubuntu

test: fix TEST-50-DISSECT build on Ubuntu CI

5 years agohwdb: Add accel orientation for AsusTek TP300LAB
Pedro Ruiz [Mon, 19 Oct 2020 00:00:27 +0000 (02:00 +0200)] 
hwdb: Add accel orientation for AsusTek TP300LAB

5 years agopo: update Polish translation
Piotr Drąg [Sun, 18 Oct 2020 11:10:47 +0000 (13:10 +0200)] 
po: update Polish translation

5 years agotest: account for non-x86-64 archs in TEST-50-DISSECT 17367/head
Luca Boccassi [Sun, 18 Oct 2020 14:41:34 +0000 (15:41 +0100)] 
test: account for non-x86-64 archs in TEST-50-DISSECT

5 years agotest: increase size of verity partition in TEST-50-DISSECT GPT image
Luca Boccassi [Sat, 17 Oct 2020 21:10:42 +0000 (22:10 +0100)] 
test: increase size of verity partition in TEST-50-DISSECT GPT image

On Ubuntu it seems there's some padding added

5 years agoNEWS: fix typo: speicify → specify
Ansgar Burchardt [Sat, 17 Oct 2020 12:02:06 +0000 (14:02 +0200)] 
NEWS: fix typo: speicify → specify

5 years agotest/README: notes about Ubuntu CI logs and dependencies
Luca Boccassi [Fri, 16 Oct 2020 16:51:58 +0000 (17:51 +0100)] 
test/README: notes about Ubuntu CI logs and dependencies

Add a note about where to find the full journal, and how to add
packages/dependencies for the Ubuntu CI.

5 years agotest: fix TEST-50-DISSECT build on Ubuntu CI
Luca Boccassi [Fri, 16 Oct 2020 12:20:45 +0000 (13:20 +0100)] 
test: fix TEST-50-DISSECT build on Ubuntu CI

Ubuntu CI's just got the dependencies require dto run this test added,
and it seems the build is different enough from other platforms
that it fails to create the required directories:

cp: cannot create regular file '/var/tmp/systemd-test.JJMOBY/minimal/usr/lib/os-release': No such file or directory

5 years agoRevert "Block TEST-50-DISSECT on Ubuntu CI temporarily"
Luca Boccassi [Sat, 17 Oct 2020 16:58:32 +0000 (17:58 +0100)] 
Revert "Block TEST-50-DISSECT on Ubuntu CI temporarily"

This reverts commit 329315b29f63adb05054c26f739f68780fadfa0a.

5 years agoBlock TEST-50-DISSECT on Ubuntu CI temporarily
Luca Boccassi [Fri, 16 Oct 2020 16:58:52 +0000 (17:58 +0100)] 
Block TEST-50-DISSECT on Ubuntu CI temporarily

It looks like we need to do some whack-a-mole before it will fully pass,
so disable for now. It was skipped until today anyway due to missing
dependencies.

5 years agooomd: fix unit test when xattrs not supported
Anita Zhang [Fri, 16 Oct 2020 23:19:15 +0000 (16:19 -0700)] 
oomd: fix unit test when xattrs not supported

5 years agocore: log about "systemctl kill" requests 17369/head
Lennart Poettering [Fri, 16 Oct 2020 15:20:20 +0000 (17:20 +0200)] 
core: log about "systemctl kill" requests

let's add informational logging about each client requested signal
sending. While we are at, let's beef up error handling/log messages in
this case quite a bit: let's log errors both to syslog and report errors
back to client.

Fixes: #17254
5 years agocore: correct handling of "systemctl kill --kill-who=main-fail"
Lennart Poettering [Fri, 16 Oct 2020 15:16:23 +0000 (17:16 +0200)] 
core: correct handling of "systemctl kill --kill-who=main-fail"

--kill-who=main-fail never worked correctly, due to a copy and paste
mistake in ac5e3a505e49c80b56c971a8fc13bacac961640d, where the same item
was listed twice. The mistake was
later noticed, but fixed incorrectly, in
201f0c916d8f65ad2595a651b1371fcd39a4cf55.

Let's list all *-fail types correctly, finally.

And while we are at it, add a nice comment and generate a prettier D-Bus
error about this.

5 years agocore: add comment explaining unit_kill_context() vs. unit_kill_common() a bit
Lennart Poettering [Fri, 16 Oct 2020 15:16:02 +0000 (17:16 +0200)] 
core: add comment explaining unit_kill_context() vs. unit_kill_common() a bit

5 years agoMerge pull request #17358 from keszybz/hwdb-add-stars
Lennart Poettering [Fri, 16 Oct 2020 13:35:31 +0000 (15:35 +0200)] 
Merge pull request #17358 from keszybz/hwdb-add-stars

Add trailing star to all hwdb patterns

5 years agomeson: Fix missing libseccomp dependencies
Michal Koutný [Thu, 15 Oct 2020 15:56:30 +0000 (17:56 +0200)] 
meson: Fix missing libseccomp dependencies

The builds with HAVE_SECCOMP fail on missing include paths:

FAILED: src/basic/libbasic.a.p/parse-util.c.o
cc -Isrc/basic/libbasic.a.p -Isrc/basic -I../src/basic -Isrc/boot -I../src/boot -Isrc/home -I../src/home -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -Isrc/shutdown -I../src/shutdown -I../src/xdg-autostart-generator -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../src/libsystemd-network -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=shadow -include config.h -fPIC -pthread -fvisibility=default -MD -MQ src/basic/libbasic.a.p/parse-util.c.o -MF src/basic/libbasic.a.p/parse-util.c.o.d -o src/basic/libbasic.a.p/parse-util.c.o -c ../src/basic/parse-util.c
In file included from ../src/basic/parse-util.c:20:
../src/shared/seccomp-util.h:4:10: fatal error: seccomp.h: No such file or directory
    4 | #include <seccomp.h>
      |          ^~~~~~~~~~~
compilation terminated.

FAILED: test-parse-util.p/src_test_test-parse-util.c.o
cc -Itest-parse-util.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/boot -I../src/boot -Isrc/home -I../src/home -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -Isrc/shutdown -I../src/shutdown -I../src/xdg-autostart-generator -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../src/libsystemd-network -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=shadow -include config.h -MD -MQ test-parse-util.p/src_test_test-parse-util.c.o -MF test-parse-util.p/src_test_test-parse-util.c.o.d -o test-parse-util.p/src_test_test-parse-util.c.o -c ../src/test/test-parse-util.c
In file included from ../src/test/test-parse-util.c:14:
../src/shared/seccomp-util.h:4:10: fatal error: seccomp.h: No such file or directory
    4 | #include <seccomp.h>
      |          ^~~~~~~~~~~
compilation terminated.

Add the respective deps.

Fixes: 005bfaf118 ("exec: Add kill action to system call filters")
5 years agoMerge pull request #17363 from keszybz/oomd-meson-and-news
Yu Watanabe [Fri, 16 Oct 2020 03:26:28 +0000 (12:26 +0900)] 
Merge pull request #17363 from keszybz/oomd-meson-and-news

oomd meson and NEWS adjustments

5 years agoMerge pull request #17361 from keszybz/oomd-introspection-stub
Yu Watanabe [Fri, 16 Oct 2020 03:24:37 +0000 (12:24 +0900)] 
Merge pull request #17361 from keszybz/oomd-introspection-stub

Implement --version,--bus-introspect in oomd, add man page for the dbus api

5 years agoman: describe wildcards and range matches in hwdb syntax 17358/head
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 15:58:43 +0000 (17:58 +0200)] 
man: describe wildcards and range matches in hwdb syntax

5 years agoparse_hwdb: enforce the ":*" suffix
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 11:54:31 +0000 (13:54 +0200)] 
parse_hwdb: enforce the ":*" suffix

5 years agohwdb: add trailing ":*" everywhere
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 07:23:30 +0000 (09:23 +0200)] 
hwdb: add trailing ":*" everywhere

No functional change is intended.
The general pattern of changes:

-usb:v04F3p2B7C*
+usb:v04F3p2B7C:*
This is mostly a clarification, to make the part that makes the usb vXXXXpYYYY
part visually separated. It would only make a difference if we added further
keys with a different number of digits, which is unlikely.

-usb:v0627p0001:*QEMU USB Keyboard*
-usb:v0627p0001:*QEMU USB Mouse*
-usb:v0627p0001:*QEMU USB Tablet*
+usb:v0627p0001:*QEMU USB Keyboard*:*
+usb:v0627p0001:*QEMU USB Mouse*:*
+usb:v0627p0001:*QEMU USB Tablet*:*
Again, only a clarification. We know that ":" will appear somewhere later in
the match key, so anything that matches "…Keyboard*" will also match "…Keyboard*:*".

-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
This makes the match narrower. Previously we would match product "N53SV"
and "N53SV2", "N53SV3", and others. Here we are saying that the ':pn' part must
match exactly. Most of the changes in this patch match this pattern. I made a few
judgement calls and used "pn…*:*" when I wasn't sure if the full pn is included:
-evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*
+evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:*

-evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:
+evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:*
This more like the "QEMU" example above, since all dmi strings end in ":", so
anything which matches the old version will also match the new version.

-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:*

I replaced trailing ":pvr*" by ":*". This makes no functional difference because
we expect "pvr" to always appear in the dmi string. This makes patterns shorter.

-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*:*

OTOH, ":pn*" is kept. This is because almost patterns include ":pn*", and if we
skip it, we should make it clear that this is on purpose, that we really want to
match any product name.

The python script to generate autosuspend rules is updated to use ":*" too.

Inspired by https://github.com/systemd/systemd/pull/17281#discussion_r501489750.

5 years agopid1: ignore whole /run/host hierarchy
Lennart Poettering [Thu, 15 Oct 2020 13:25:56 +0000 (15:25 +0200)] 
pid1: ignore whole /run/host hierarchy

Let's mark the whole /run/host hierarchy as something to ignore by PID 1
for generation of .mount units, i.e. consider it as "extrinsic".

By unifying container mgr supplied resources in one dir it's also easy
to exclude the whole lot from PID1's management inside the container.
This is the right thing to do, since from the payload's PoV these mounts
are just API and not manipulatable as they are established, managed and
owned by the container manager, not the payload.

(While we are it, also add the boot ID mount to the existing list, as
nspawn and other container managers overmount that too, typically, and
it is thus owned by the container manager and not the payload
typically.)

5 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

5 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.

5 years agoman: add org.freedesktop.oom1(5) stub 17361/head
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:08:31 +0000 (15:08 +0200)] 
man: add org.freedesktop.oom1(5) stub

5 years agooomd: add names to dbus parameters and implement --bus-introspection
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:03:49 +0000 (15:03 +0200)] 
oomd: add names to dbus parameters and implement --bus-introspection

5 years agooomd: check number of arguments, add --version, fix indentation
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:03:07 +0000 (15:03 +0200)] 
oomd: check number of arguments, add --version, fix indentation

5 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

5 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")

5 years agohwdb: add missinging ":*" suffix
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 11:35:36 +0000 (13:35 +0200)] 
hwdb: add missinging ":*" suffix

I'm keeping this part separate because a function change is intended here.
Those patterns didn't match:

$ systemd-hwdb query 'evdev:atkbd:dmi:bvn_:bvr_:bd_:svnLENOVO:pn_:pvrThinkPadT430s'
KEYBOARD_LED_CAPSLOCK=0
$ systemd-hwdb query 'evdev:atkbd:dmi:bvn_:bvr_:bd_:svnLENOVO:pn_:pvrThinkPadT430s:'
(nil)

5 years agohwdb: reindent commments and say that "*" should always be trailing
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 07:22:35 +0000 (09:22 +0200)] 
hwdb: reindent commments and say that "*" should always be trailing

5 years agohwdb: update chromiumos autosuspend rules
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 10:33:12 +0000 (12:33 +0200)] 
hwdb: update chromiumos autosuspend rules

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

5 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!

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

5 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)

5 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)

5 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

5 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.

5 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

5 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

5 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

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

5 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()

5 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.

5 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.

5 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

5 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

5 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.

5 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

5 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…

5 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.

5 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

5 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.

5 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

5 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

5 years agosd-bus: add custom return code when $XDG_RUNTIME_DIR is not set 17344/head
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2020 10:15:58 +0000 (12:15 +0200)] 
sd-bus: add custom return code when $XDG_RUNTIME_DIR is not set

We would return ENOENT, which is extremely confusing. Strace is not helpful because
no *file* is actually missing. So let's add some logs at debug level and also use
a custom return code. Let all user-facing utilities print a custom error message
in that case.

5 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

5 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

5 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
5 years agosd-bus: add debug logs where we try to connect
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2020 09:59:23 +0000 (11:59 +0200)] 
sd-bus: add debug logs where we try to connect

When connection to the bus fails it can be mighty hard to figure out
what went wrong because we have many different connection mechanisms and
we don't log what is happenning.

5 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()

5 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

5 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.

5 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
5 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

5 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

5 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

5 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

5 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.

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

5 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()

5 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()

5 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.

5 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

5 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.

5 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.

5 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

5 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

5 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()