]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoman: update login1(5) for SetType() 15473/head
Zbigniew Jędrzejewski-Szmek [Tue, 5 May 2020 21:03:36 +0000 (23:03 +0200)] 
man: update login1(5) for SetType()

Added in db72aea4a952cdfdef51eda03408d7c4a11e7359.

4 years agoman: add stub for home1(5)
Zbigniew Jędrzejewski-Szmek [Sun, 3 May 2020 08:19:53 +0000 (10:19 +0200)] 
man: add stub for home1(5)

4 years agohomed: convert to the new scheme and add --bus-introspect
Zbigniew Jędrzejewski-Szmek [Sun, 3 May 2020 08:05:06 +0000 (10:05 +0200)] 
homed: convert to the new scheme and add --bus-introspect

4 years agoman: add description of org.freedesktop.LogControl1
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 19:04:43 +0000 (21:04 +0200)] 
man: add description of org.freedesktop.LogControl1

I'm not sure if the LogTarget property is sufficiently general to be made into
a property that can be generally implemented. It is very closely tied to the internal
systemd logic. The other two seem fine thoough.

4 years agomeson: add man/update-dbus-docs target
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 18:12:03 +0000 (20:12 +0200)] 
meson: add man/update-dbus-docs target

4 years agoman: drop LogLevel from resolve1(5)
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 15:55:11 +0000 (17:55 +0200)] 
man: drop LogLevel from resolve1(5)

Removed in 4c4520789d2bfa3fa51b38b826cac2efb5a4d252.

4 years agoman: drop CanMultiSession from documention
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 15:54:28 +0000 (17:54 +0200)] 
man: drop CanMultiSession from documention

Removed in 8f8cc84ba4612e74cd1e26898c6816e6e60fc4e9.

4 years agoman: use --bus-introspect to autogenerate dbus api docs
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 10:08:10 +0000 (12:08 +0200)] 
man: use --bus-introspect to autogenerate dbus api docs

This has the advantage that the executables are always in place and we don't
need any units to exist on the bus, so we can eventually hook this up into
a normal build system. (Probably as a build time check.)

4 years agoupdate-dbus-docs: use executables in build/
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 10:09:07 +0000 (12:09 +0200)] 
update-dbus-docs: use executables in build/

4 years agopid1: add --bus-introspect
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 21:50:31 +0000 (23:50 +0200)] 
pid1: add --bus-introspect

4 years agopid1: convert to the new scheme
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 21:50:12 +0000 (23:50 +0200)] 
pid1: convert to the new scheme

In all the other cases, I think the code was clearer with the static table.
Here, not so much. And because of the existing dump code, the vtables cannot
be made static and need to remain exported. I still think it's worth to do the
change to have the cmdline introspection, but I'm disappointed with how this
came out.

4 years agomachined: convert to the new scheme and add --bus-introspect
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 12:21:46 +0000 (14:21 +0200)] 
machined: convert to the new scheme and add --bus-introspect

4 years agolocaled: convert to the new scheme and add --bus-introspect
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 12:10:33 +0000 (14:10 +0200)] 
localed: convert to the new scheme and add --bus-introspect

4 years agohostnamed: convert to the new scheme and add --bus-introspect
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 12:08:16 +0000 (14:08 +0200)] 
hostnamed: convert to the new scheme and add --bus-introspect

4 years agobus-introspect: list the interfaces with "list"
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 10:46:23 +0000 (12:46 +0200)] 
bus-introspect: list the interfaces with "list"

The output is not very well formatted, but it is still useful when
testing this.

4 years agoresolved: convert to the new scheme
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 10:45:47 +0000 (12:45 +0200)] 
resolved: convert to the new scheme

4 years agotimedated: convert to the new scheme and add --bus-introspect
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 10:14:09 +0000 (12:14 +0200)] 
timedated: convert to the new scheme and add --bus-introspect

4 years agounits: change description of systemd-logind.service
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 07:59:03 +0000 (09:59 +0200)] 
units: change description of systemd-logind.service

"Login Service" doesn''t explain much, esp. considering that logind is actually is
for logins. I think "User Login Management" is better, but not that great either.
Suggestions welcome.

4 years agoimportd,logind: add --bus-introspect= option
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 15:55:34 +0000 (17:55 +0200)] 
importd,logind: add --bus-introspect= option

4 years agobus-util: add wrapper for interface introspection
Zbigniew Jędrzejewski-Szmek [Wed, 15 Apr 2020 15:19:53 +0000 (17:19 +0200)] 
bus-util: add wrapper for interface introspection

4 years agologind: convert to the new scheme
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2020 23:00:07 +0000 (01:00 +0200)] 
logind: convert to the new scheme

4 years agoimportd: convert to the new scheme
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 08:02:00 +0000 (10:02 +0200)] 
importd: convert to the new scheme

4 years agosd-bus: add helper struct for interface definitions
Zbigniew Jędrzejewski-Szmek [Wed, 15 Apr 2020 15:21:23 +0000 (17:21 +0200)] 
sd-bus: add helper struct for interface definitions

The idea is to have a static table that defines the dbus API. The vtable is
defined right next to the interface name and path because they are logically
connected.

4 years agologind,importd,hostnamed,localed,timedated,machined,resolved: add option parsing...
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 08:19:46 +0000 (10:19 +0200)] 
logind,importd,hostnamed,localed,timedated,machined,resolved: add option parsing stubs

--help and --version are implemented in the usual style.
help() prints full path, since the program is not expected to
be in $PATH.

4 years agomanager: add highlighting to --help
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 09:06:20 +0000 (11:06 +0200)] 
manager: add highlighting to --help

Also change the summary line to a bit more concise.

4 years agoutil-lib: add stub parser for --help, --version
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 08:19:11 +0000 (10:19 +0200)] 
util-lib: add stub parser for --help, --version

4 years agoimportd: wrap long lines
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2020 11:47:32 +0000 (13:47 +0200)] 
importd: wrap long lines

4 years agosd-bus: use STR_IN_SET() in one more place
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2020 13:04:06 +0000 (15:04 +0200)] 
sd-bus: use STR_IN_SET() in one more place

4 years agobus-introspect: move xml string defines into the .c file
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2020 12:45:19 +0000 (14:45 +0200)] 
bus-introspect: move xml string defines into the .c file

4 years agobus-introspect: write <interface> from within introspect_write_interface()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2020 11:34:09 +0000 (13:34 +0200)] 
bus-introspect: write <interface> from within introspect_write_interface()

4 years agoman: fix few spelling errors
Frantisek Sumsal [Fri, 1 May 2020 16:51:33 +0000 (18:51 +0200)] 
man: fix few spelling errors

Reported by Fossies.org.

4 years agotest: Fix build with !HAVE_LZ4 && HAVE_XZ
Michal Koutný [Fri, 1 May 2020 16:38:10 +0000 (18:38 +0200)] 
test: Fix build with !HAVE_LZ4 && HAVE_XZ

HUGE_SIZE was defined inconsistently.

> In file included from ../src/basic/alloc-util.h:9,
>                  from ../src/journal/test-compress.c:9:
> ../src/journal/test-compress.c: In function ‘main’:
> ../src/journal/test-compress.c:280:33: error: ‘HUGE_SIZE’ undeclared (first use in this function)
>   280 |         assert_se(huge = malloc(HUGE_SIZE));

4 years agocifuzz: upload artifacts only when the "run fuzzers" step fails
Evgeny Vereshchagin [Wed, 29 Apr 2020 05:04:56 +0000 (05:04 +0000)] 
cifuzz: upload artifacts only when the "run fuzzers" step fails

4 years agorepart: fix partition maximum size segfault
Emmanuel Garette [Thu, 30 Apr 2020 07:51:29 +0000 (09:51 +0200)] 
repart: fix partition maximum size segfault

Discovered, tracked down and fix proposed by Emmanuel Garette.

See: https://lists.freedesktop.org/archives/systemd-devel/2020-April/044435.html

(Lennart turned this into a PR)

Fixes: #15608
4 years agoMerge pull request #15652 from MadMcCrow/master
Zbigniew Jędrzejewski-Szmek [Fri, 1 May 2020 15:26:55 +0000 (17:26 +0200)] 
Merge pull request #15652 from MadMcCrow/master

Fix Chromebook Caroline board accelerometer not having correct orientation

4 years agoMerge pull request #15547 from kkdwivedi/notify-barrier
Lennart Poettering [Fri, 1 May 2020 06:48:42 +0000 (08:48 +0200)] 
Merge pull request #15547 from kkdwivedi/notify-barrier

Introduce sd_notify_barrier

4 years agoMerge pull request #13512 from msekletar/freezer
Zbigniew Jędrzejewski-Szmek [Fri, 1 May 2020 05:52:29 +0000 (07:52 +0200)] 
Merge pull request #13512 from msekletar/freezer

core: introduce support for cgroup freezer

4 years agoman: sd_notify() race is gone with sd_notify_barrier() 15547/head
Kumar Kartikeya Dwivedi [Tue, 28 Apr 2020 13:39:53 +0000 (19:09 +0530)] 
man: sd_notify() race is gone with sd_notify_barrier()

Add note for change of behaviour in systemd-notify, where parent pid trick
is only used when --no-block is passed, and with enough privileges ofcourse.

Also, fix a small error in systemd(1).

4 years agoIntroduce sd_notify_barrier
Kumar Kartikeya Dwivedi [Tue, 28 Apr 2020 14:09:27 +0000 (19:39 +0530)] 
Introduce sd_notify_barrier

This adds the sd_notify_barrier function, to allow users to synchronize against
the reception of sd_notify(3) status messages. It acts as a synchronization
point, and a successful return gurantees that all previous messages have been
consumed by the manager. This can be used to eliminate race conditions where
the sending process exits too early for systemd to associate its PID to a
cgroup and attribute the status message to a unit correctly.

systemd-notify now uses this function for proper notification delivery and be
useful for NotifyAccess=all units again in user mode, or in cases where it
doesn't have a control process as parent.

Fixes: #2739
4 years agotest: find path for systemd-journal-remote
Dan Streetman [Sun, 26 Apr 2020 15:19:55 +0000 (11:19 -0400)] 
test: find path for systemd-journal-remote

As Debian/Ubuntu use /lib/systemd instead of /usr/lib/systemd,
add systemd-journal-remote to the list of programs that test-functions
detects the correct path to, and replace its direct usage with
$SYSTEMD_JOURNAL_REMOTE

Also use $JOURNALCTL instead of journalctl.

Also minor correction in install_plymouth() to look in /lib/... as
well as /usr/lib/... and /etc/...

4 years agoMerge pull request #15592 from kennylevinsen/fdpoll-standalone
Lennart Poettering [Thu, 30 Apr 2020 20:32:28 +0000 (22:32 +0200)] 
Merge pull request #15592 from kennylevinsen/fdpoll-standalone

Introduce FDPOLL=0

4 years agoAdd SetType method to login Session interface
Corey Hinshaw [Sun, 23 Feb 2020 03:44:42 +0000 (22:44 -0500)] 
Add SetType method to login Session interface

4 years agocore: (De-)Serialize poll flag for fds in fdstore 15592/head
Kenny Levinsen [Thu, 9 Apr 2020 13:30:02 +0000 (15:30 +0200)] 
core: (De-)Serialize poll flag for fds in fdstore

This replaces manual string splitting and unescaping with
extract_first_word.

4 years agocore: Add optional FDPOLL=0 argument to fdstore
Kenny Levinsen [Wed, 8 Apr 2020 18:19:30 +0000 (20:19 +0200)] 
core: Add optional FDPOLL=0 argument to fdstore

A service can specify FDSTORE=1 FDPOLL=0 to request that PID1 does not
poll the fd to remove them on error. If set, fds will only be removed on
FDSTOREREMOVE=1 or when the service is done.

Fixes: #12086
4 years agoFix Chromebook Caroline board accelerometer not having correct orientation 15652/head
MadMcCrow [Thu, 30 Apr 2020 17:21:41 +0000 (19:21 +0200)] 
Fix Chromebook Caroline board accelerometer not having correct orientation

4 years agotest: add test for cgroup v2 freezer support 13512/head
Michal Sekletár [Fri, 3 Apr 2020 07:13:51 +0000 (09:13 +0200)] 
test: add test for cgroup v2 freezer support

4 years agocore: introduce support for cgroup freezer
Michal Sekletár [Wed, 29 Apr 2020 15:53:43 +0000 (17:53 +0200)] 
core: introduce support for cgroup freezer

With cgroup v2 the cgroup freezer is implemented as a cgroup
attribute called cgroup.freeze. cgroup can be frozen by writing "1"
to the file and kernel will send us a notification through
"cgroup.events" after the operation is finished and processes in the
cgroup entered quiescent state, i.e. they are not scheduled to
run. Writing "0" to the attribute file does the inverse and process
execution is resumed.

This commit exposes above low-level functionality through systemd's DBus
API. Each unit type must provide specialized implementation for these
methods, otherwise, we return an error. So far only service, scope, and
slice unit types provide the support. It is possible to check if a
given unit has the support using CanFreeze() DBus property.

Note that DBus API has a synchronous behavior and we dispatch the reply
to freeze/thaw requests only after the kernel has notified us that
requested operation was completed.

4 years agonotify: beef up --pid= logic
Lennart Poettering [Thu, 30 Apr 2020 09:59:30 +0000 (11:59 +0200)] 
notify: beef up --pid= logic

Prompted by the discussions on #15547.

4 years agoefi: honour SYSTEMD_EFI_OPTIONS even if we wouldn't honour SystemdOptions EFI var...
Lennart Poettering [Thu, 30 Apr 2020 08:08:54 +0000 (10:08 +0200)] 
efi: honour SYSTEMD_EFI_OPTIONS even if we wouldn't honour SystemdOptions EFI var due to SecureBoot

Fixes: #14864
4 years agoefi: cache test results of boolean EFI state functions
Lennart Poettering [Tue, 28 Apr 2020 21:33:46 +0000 (23:33 +0200)] 
efi: cache test results of boolean EFI state functions

EFI variable access is nowadays subject to rate limiting by the kernel.
Thus, let's cache the results of checking them, in order to minimize how
often we access them.

Fixes: #14828
4 years agoMerge pull request #15630 from nabijaczleweli/symmetric-buffers
Lennart Poettering [Thu, 30 Apr 2020 06:06:26 +0000 (08:06 +0200)] 
Merge pull request #15630 from nabijaczleweli/symmetric-buffers

link: Allow configuring RX mini and jumbo ring sizes, too

4 years agolink: Allow configuring RX mini and jumbo ring sizes, too 15630/head
nabijaczleweli [Wed, 29 Apr 2020 00:00:25 +0000 (02:00 +0200)] 
link: Allow configuring RX mini and jumbo ring sizes, too

This now covers all ethtool_ringparam configurables (as of v5.6;
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ethtool.h?h=v5.6#n488)

4 years agolink: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the implementati...
nabijaczleweli [Wed, 29 Apr 2020 16:38:56 +0000 (18:38 +0200)] 
link: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the implementation slightly

4 years agobasic/cgroup-util: introduce cg_get_keyed_attribute_full()
Michal Sekletár [Wed, 29 Apr 2020 15:40:22 +0000 (17:40 +0200)] 
basic/cgroup-util: introduce cg_get_keyed_attribute_full()

Callers of cg_get_keyed_attribute_full() can now specify via the flag whether the
missing keyes in cgroup attribute file are OK or not. Also the wrappers for both
strict and graceful version are provided.

4 years agodocs: reorder the section about security reporting to emphasize the sekrit list
Zbigniew Jędrzejewski-Szmek [Wed, 29 Apr 2020 06:09:53 +0000 (08:09 +0200)] 
docs: reorder the section about security reporting to emphasize the sekrit list

4 years agoselinux: do preprocessor check only in selinux-access.c
Michal Sekletár [Fri, 3 Apr 2020 07:13:59 +0000 (09:13 +0200)] 
selinux: do preprocessor check only in selinux-access.c

This has the advantage that mac_selinux_access_check() can be used as a
function in all contexts. For example, parameters passed to it won't be
reported as unused if the "function" call is replaced with 0 on SELinux
disabled builds.

4 years agoMerge pull request #15626 from poettering/more-specifiers
Frantisek Sumsal [Wed, 29 Apr 2020 08:07:12 +0000 (10:07 +0200)] 
Merge pull request #15626 from poettering/more-specifiers

tmpfiles,sysusers,pid1: add a bunch of more specifiers

4 years agoMerge pull request #15628 from poettering/tmpfiles-fuzz-fix
Lennart Poettering [Wed, 29 Apr 2020 07:41:46 +0000 (09:41 +0200)] 
Merge pull request #15628 from poettering/tmpfiles-fuzz-fix

systemd-tmpfiles fuzz issue fix

4 years agotmpfiles: remove unnecessary assert 15628/head
Lennart Poettering [Tue, 28 Apr 2020 22:13:52 +0000 (00:13 +0200)] 
tmpfiles: remove unnecessary assert

if we parse an xattr line that has no valid assignment, we might end up
with an empty ->xattr list. Don't hit assert on that, just go on.

Fixes: #15610
4 years agotmpfiles: use log_syntax() for all parse errors
Lennart Poettering [Tue, 28 Apr 2020 22:07:06 +0000 (00:07 +0200)] 
tmpfiles: use log_syntax() for all parse errors

4 years agoupdate TODO 15626/head
Lennart Poettering [Tue, 28 Apr 2020 21:16:35 +0000 (23:16 +0200)] 
update TODO

4 years agoman: document new specifiers
Lennart Poettering [Tue, 28 Apr 2020 20:50:50 +0000 (22:50 +0200)] 
man: document new specifiers

4 years agotree-wide: support a bunch of additional specifiers
Lennart Poettering [Tue, 28 Apr 2020 18:03:56 +0000 (20:03 +0200)] 
tree-wide: support a bunch of additional specifiers

4 years agoupdate TODO
Lennart Poettering [Tue, 28 Apr 2020 18:02:39 +0000 (20:02 +0200)] 
update TODO

4 years agomain: bump RLIMIT_MEMLOCK by physical RAM size
Lennart Poettering [Wed, 22 Apr 2020 20:49:02 +0000 (22:49 +0200)] 
main: bump RLIMIT_MEMLOCK by physical RAM size

Let's allow more memory to be locked on beefy machines than on small
ones. The previous limit of 64M is the lower bound still. This
effectively means on a 4GB machine we can lock 512M, which should be
more than enough, but still not lock up the machine entirely under
pressure.

Fixes: #15053
4 years agonspawn: be more careful with creating/chowning directories to overmount
Lennart Poettering [Wed, 22 Apr 2020 14:35:32 +0000 (16:35 +0200)] 
nspawn: be more careful with creating/chowning directories to overmount

We should never re-chown selinuxfs.

Fixes: #15475
4 years agoupdate TODO
Lennart Poettering [Tue, 28 Apr 2020 17:38:38 +0000 (19:38 +0200)] 
update TODO

4 years agosd-bus: Add sd_bus_query_sender_creds/privilege docs
Daan De Meyer [Tue, 28 Apr 2020 17:29:46 +0000 (19:29 +0200)] 
sd-bus: Add sd_bus_query_sender_creds/privilege docs

4 years agoMerge pull request #15618 from keszybz/help-output
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 17:31:16 +0000 (19:31 +0200)] 
Merge pull request #15618 from keszybz/help-output

Small adjustments to --help output

4 years agosd-bus: Add sd_bus_get_creds_mask docs
Daan De Meyer [Thu, 23 Apr 2020 19:31:45 +0000 (21:31 +0200)] 
sd-bus: Add sd_bus_get_creds_mask docs

4 years agoRevert "detect-virt: also detect "microsoft" as WSL"
Luca Boccassi [Mon, 27 Apr 2020 11:04:35 +0000 (12:04 +0100)] 
Revert "detect-virt: also detect "microsoft" as WSL"

WSL2 will soon (TM) include the "WSL2" string in /proc/sys/kernel/osrelease
so the workaround will no longer be necessary.
We have several different cloud images which do include the "microsoft"
string already, which would break this detection. They are for internal
usage at the moment, but the userspace side can come from all over the
place so it would be quite hard to track and downstream-patch to avoid
breakages.

This reverts commit a2f838d59075a49b012f9b7056664f7ffeed44d2.

4 years agohomectl: say "home area" in more places 15618/head
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:09:26 +0000 (09:09 +0200)] 
homectl: say "home area" in more places

Follow-up for b5947b5b100f694c93857a82018fb0656d08be34.

4 years agomeson: test userdbctl and homectl --help
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:08:37 +0000 (09:08 +0200)] 
meson: test userdbctl and homectl --help

4 years agouserdbctl: make --help fit in 80 columns
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:13:47 +0000 (09:13 +0200)] 
userdbctl: make --help fit in 80 columns

4 years agomeson: modernize indentation
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:08:04 +0000 (09:08 +0200)] 
meson: modernize indentation

By using a newline after executable( and run_target(, we get less
indentation and the indentation level does not change when the returned
object is saved to a variable.

4 years agoefivars: retry open and read operations
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 08:53:46 +0000 (10:53 +0200)] 
efivars: retry open and read operations

On my laptop (Lenovo X1carbo 4th) I very occasionally see test-boot-timestamps
fail with this tb:

262/494 test-boot-timestamps                    FAIL    0.7348453998565674 s (killed by signal 6 SIGABRT)

08:12:48 SYSTEMD_LANGUAGE_FALLBACK_MAP='/home/zbyszek/src/systemd/src/locale/language-fallback-map' SYSTEMD_KBD_MODEL_MAP='/home/zbyszek/src/systemd/src/locale/kbd-model-map' PATH='/home/zbyszek/src/systemd/build:/home/zbyszek/.local/bin:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/condabin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/zbyszek/bin:/var/lib/snapd/snap/bin' /home/zbyszek/src/systemd/build/test-boot-timestamps
--- stderr ---
Failed to read $container of PID 1, ignoring: Permission denied
Found container virtualization none.
Failed to get SystemdOptions EFI variable, ignoring: Interrupted system call
Failed to read ACPI FPDT: Permission denied
Failed to read LoaderTimeInitUSec: Interrupted system call
Failed to read EFI loader data: Interrupted system call
Assertion 'q >= 0' failed at src/test/test-boot-timestamps.c:84, function main(). Aborting.

Normally it takes ~0.02s, but here there's a slowdown to 0.73 and things fail with EINTR.
This happens only occasionally, and I haven't been able to capture a strace.

It would be to ignore that case in test-boot-timestamps or always translate
EINTR to -ENODATA. Nevertheless, I think it's better to retry, since this gives
as more resilient behaviour and avoids a transient failure.

See
https://github.com/torvalds/linux/blob/master/fs/efivarfs/file.c#L75
and
https://github.com/torvalds/linux/commit/bef3efbeb897b56867e271cdbc5f8adaacaeb9cd.

4 years agoshell-completion/zsh: update systemd-analyze completions
Ronan Pigott [Mon, 27 Apr 2020 06:16:55 +0000 (23:16 -0700)] 
shell-completion/zsh: update systemd-analyze completions

4 years agozsh: fix disable/enable completion
Haochen Tong [Sun, 26 Apr 2020 22:30:49 +0000 (00:30 +0200)] 
zsh: fix disable/enable completion

The "preset" column introduced in
b01c1f305c044a381ad110709a62507d74bf6d86 breaks zsh completion for
systemctl disable/enable. Fix by ignoring everything after the last
space in a line.

4 years agotests: various small fixes for strict systems
Topi Miettinen [Thu, 23 Apr 2020 10:12:23 +0000 (13:12 +0300)] 
tests: various small fixes for strict systems

Don't assume that 4MB can be allocated from stack since there could be smaller
DefaultLimitSTACK= in force, so let's use malloc(). NUL terminate the huge
strings by hand, also ensure termination in test_lz4_decompress_partial() and
optimize the memset() for the string.

Some items in /proc and /etc may not be accessible to poor unprivileged users
due to e.g. SELinux, BOFH or both, so check for EACCES and EPERM.

/var/tmp may be a symlink to /tmp and then path_compare() will always fail, so
let's stick to /tmp like elsewhere.

/tmp may be mounted with noexec option and then trying to execute scripts from
there would fail.

Detect and warn if seccomp is already in use, which could make seccomp test
fail if the syscalls are already blocked.

Unset $TMPDIR so it will not break specifier tests where %T is assumed to be
/tmp and %V /var/tmp.

4 years agosd-bus: Cite sd_bus_creds_unref in sd_bus_get_name_creds docs
Daan De Meyer [Fri, 24 Apr 2020 16:45:15 +0000 (18:45 +0200)] 
sd-bus: Cite sd_bus_creds_unref in sd_bus_get_name_creds docs

4 years agotest-cgroup: skip if /sys/fs/cgroup unknown fs
Dan Streetman [Sat, 21 Mar 2020 14:59:42 +0000 (10:59 -0400)] 
test-cgroup: skip if /sys/fs/cgroup unknown fs

It's not always mounted, e.g. during the build-time tests, it's running inside
a chroot (that's how Debian/Ubuntu build packages, in chroots) so this test
always fails because /sys/fs/cgroup isn't mounted.

4 years agocgroup-util: check for SYSFS_MAGIC when detecting cgroup format
Dan Streetman [Sat, 21 Mar 2020 15:19:44 +0000 (11:19 -0400)] 
cgroup-util: check for SYSFS_MAGIC when detecting cgroup format

When nothing at all is mounted at /sys/fs/cgroup, the fs.f_type is
SYSFS_MAGIC (0x62656572) which results in the confusing debug log:

"Unknown filesystem type 62656572 mounted on /sys/fs/cgroup."

Instead, if the f_type is SYSFS_MAGIC, a more accurate message is:

"No filesystem is currently mounted on /sys/fs/cgroup."

4 years agoImprove help for clang-format
Norbert Lange [Fri, 24 Apr 2020 23:40:37 +0000 (01:40 +0200)] 
Improve help for clang-format

The comments lack the most important usecase: fixing up your commits.

4 years agoci: introduce CIFuzz
Frantisek Sumsal [Fri, 24 Apr 2020 10:00:44 +0000 (12:00 +0200)] 
ci: introduce CIFuzz

Per-PR fuzzing provided by OSS-Fuzz using GH workflows.

See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/

4 years agodhcp6: make string argument to sd_dhcp6_client_set_request_mud_url() const
Thomas Haller [Fri, 24 Apr 2020 07:15:59 +0000 (09:15 +0200)] 
dhcp6: make string argument to sd_dhcp6_client_set_request_mud_url() const

4 years agoMerge pull request #15579 from DaanDeMeyer/sd-bus-get-name/owner-creds-docs
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 06:29:41 +0000 (08:29 +0200)] 
Merge pull request #15579 from DaanDeMeyer/sd-bus-get-name/owner-creds-docs

4 years agoMerge pull request #15564 from poettering/tmpfiles-no-proc
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 06:16:22 +0000 (08:16 +0200)] 
Merge pull request #15564 from poettering/tmpfiles-no-proc

util-lib: check for /proc being mounted in some really basic fs operations

4 years agosd-bus: Add sd_bus_get_name/owner_creds docs 15579/head
Daan De Meyer [Thu, 23 Apr 2020 19:21:58 +0000 (21:21 +0200)] 
sd-bus: Add sd_bus_get_name/owner_creds docs

4 years agoMerge pull request #15570 from poettering/cmsg-find
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 05:45:07 +0000 (07:45 +0200)] 
Merge pull request #15570 from poettering/cmsg-find

CMSG_FIND_DATA() and cmsg_find() work

4 years agotree-wide: use structured initialization at various places
Lennart Poettering [Fri, 17 Apr 2020 13:30:48 +0000 (15:30 +0200)] 
tree-wide: use structured initialization at various places

4 years agodhcp-server: port to recvmsg_safe()
Lennart Poettering [Thu, 23 Apr 2020 18:00:07 +0000 (20:00 +0200)] 
dhcp-server: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.

4 years agoicmp6-util: port to recvmsg_safe()
Lennart Poettering [Thu, 23 Apr 2020 17:53:27 +0000 (19:53 +0200)] 
icmp6-util: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.

4 years agodhcp-client: port to recvmsg_safe()
Lennart Poettering [Thu, 23 Apr 2020 17:57:53 +0000 (19:57 +0200)] 
dhcp-client: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.

(also setting green label here, since @keszybz already greenlit it in that other PR)

4 years agofuzzit: make the submit phase a bit more robust
Frantisek Sumsal [Thu, 23 Apr 2020 19:24:22 +0000 (21:24 +0200)] 
fuzzit: make the submit phase a bit more robust

The submit phase of the Fuzzit Travis job has been spuriously failing
for some time with various (and usually pretty hidden) errors, like:

```
./fuzzit create job --type regression ...
2020/04/23 17:02:12 please set env variable FUZZIT_API_KEY or pass --api-key. API Key for you account: ...
```

```
./fuzzit create job --type regression ...
2020/04/23 11:36:53 Creating job...
2020/04/23 11:36:54 Uploading fuzzer...
2020/04/23 11:36:54 Job created successfully
2020/04/23 11:36:54 Get https://...&action=create: read tcp x.x.x.x:39674->x.x.x.x:443: read: connection reset by peer
```

```
./fuzzit create job --type regression ...
2020/04/22 18:09:15 Creating job...
2020/04/22 18:09:16 Uploading fuzzer...
2020/04/22 18:09:37 Job created successfully
2020/04/22 18:09:37 500 Internal Server Error
```

etc.

Let's retry each submit job up to three times to (hopefully) mitigate this.

4 years agonss-systemd: don't synthesize root/nobody when iterating
Lennart Poettering [Thu, 23 Apr 2020 07:55:06 +0000 (09:55 +0200)] 
nss-systemd: don't synthesize root/nobody when iterating

Fixes: #15160
4 years agosd-bus: Add sd_bus_message_get_creds docs
Daan De Meyer [Thu, 23 Apr 2020 19:40:52 +0000 (21:40 +0200)] 
sd-bus: Add sd_bus_message_get_creds docs

4 years agosd-bus: Add sd_bus_get_name_machine_id docs
Daan De Meyer [Thu, 23 Apr 2020 19:07:36 +0000 (21:07 +0200)] 
sd-bus: Add sd_bus_get_name_machine_id docs

4 years agosd-bus: Add sd_bus_send_to docs
Daan De Meyer [Thu, 23 Apr 2020 18:40:30 +0000 (20:40 +0200)] 
sd-bus: Add sd_bus_send_to docs

4 years agoMerge pull request #15566 from poettering/destroy-binfmt
Lennart Poettering [Thu, 23 Apr 2020 19:15:22 +0000 (21:15 +0200)] 
Merge pull request #15566 from poettering/destroy-binfmt

unregister binary formats during shutdown

4 years agohome: fix strv NUL termination
Lennart Poettering [Thu, 23 Apr 2020 11:46:10 +0000 (13:46 +0200)] 
home: fix strv NUL termination

Fixes: #15559