]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 years agofuzz: limit the maximum size of test inputs for a few parsers 11975/head
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 16:48:06 +0000 (17:48 +0100)] 
fuzz: limit the maximum size of test inputs for a few parsers

We have a few cases or reported issues which are about a timeout to parse
the input in 25 s. In all cases, the input is a few hundred kb. We don't really
care if the config parsers are super efficent, so let's set a limit on the input
size to avoid triggering such issues. The parsers often contain quadratic
algorithms. This is OK, because the numbers of elements are almost always very
small in real use. Rewriting the code to use more complicated data structures
to speed this up would not only complicate the code, but also pessimize behaviour
for the overwhelmingly common case of small samples. Note that in all those
cases, the input data is trusted. We care about memory correctness, and not
not so much about efficiency.

The size checks are done twice: using options for libfuzzer, and using an
internal check for afl. Those should be changed together. I didn't use a define,
because there is no easy mechanism to share the define between the two files.

6 years agonspawn: fix memleak uncovered by fuzzer
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 16:44:01 +0000 (17:44 +0100)] 
nspawn: fix memleak uncovered by fuzzer

This is almost the same as 0e636bf51a. I looked through the code,
and I don't see any more instances of this pattern, so hopefully this
will be the last one.

https://oss-fuzz.com/issue/5660094128193536/13691.

6 years agoMerge pull request #11964 from mrc0mmand/even-more-fuzzers
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 14:08:20 +0000 (15:08 +0100)] 
Merge pull request #11964 from mrc0mmand/even-more-fuzzers

fuzz: add fuzzers for calendar & time expressions

6 years agomeson: scope more git invocations with current_source_dir()
Davide Cavalca [Wed, 27 Feb 2019 16:19:07 +0000 (11:19 -0500)] 
meson: scope more git invocations with current_source_dir()

6 years agoMerge pull request #11927 from poettering/network-namespace-path
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 13:29:14 +0000 (14:29 +0100)] 
Merge pull request #11927 from poettering/network-namespace-path

Add NetworkNamespacePath= to unit files

6 years agopo: update French translation
Sylvain Plantefève [Thu, 7 Mar 2019 22:10:46 +0000 (23:10 +0100)] 
po: update French translation

6 years agoMerge pull request #11943 from yuwata/device-action-seqnum-cleanups
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 12:17:33 +0000 (13:17 +0100)] 
Merge pull request #11943 from yuwata/device-action-seqnum-cleanups

sd-device: store parsed SEQNUM and ACTION string

6 years agofuzz: add a fuzzer for time utils 11964/head
Frantisek Sumsal [Mon, 11 Mar 2019 18:57:09 +0000 (19:57 +0100)] 
fuzz: add a fuzzer for time utils

6 years agofuzz: add a fuzzer for calendarspec
Frantisek Sumsal [Mon, 11 Mar 2019 18:56:34 +0000 (19:56 +0100)] 
fuzz: add a fuzzer for calendarspec

6 years agobash-completion: also suggest units in reloading or activating
Yu Watanabe [Mon, 11 Mar 2019 04:26:29 +0000 (13:26 +0900)] 
bash-completion: also suggest units in reloading or activating

Closes #11942.

6 years agoMerge pull request #11897 from mrc0mmand/parallelize-TEST-24-UNIT-TESTS
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 10:21:06 +0000 (11:21 +0100)] 
Merge pull request #11897 from mrc0mmand/parallelize-TEST-24-UNIT-TESTS

test: parallelize tasks in TEST-24-UNIT-TESTS

6 years agolgtm: replace the query used for looking for fgets with a more general query
Evgeny Vereshchagin [Mon, 11 Mar 2019 20:05:13 +0000 (21:05 +0100)] 
lgtm: replace the query used for looking for fgets with a more general query

to make it easier to comlain about `strtok` :-)

Inspired by https://github.com/systemd/systemd/pull/11963, which, in turn,
was prompted by https://github.com/systemd/systemd/pull/11555.

6 years agoudev: fix memleak in 'udevadm trigger --settle'
Yu Watanabe [Tue, 12 Mar 2019 03:20:13 +0000 (12:20 +0900)] 
udev: fix memleak in 'udevadm trigger --settle'

Fixes #11966.

6 years agotest: wait for a while active state of .device is updated 11943/head
Yu Watanabe [Mon, 11 Mar 2019 18:53:22 +0000 (03:53 +0900)] 
test: wait for a while active state of .device is updated

6 years agoefivars: make sure efi_loader_entry_name_valid() is always compiled in
Lennart Poettering [Mon, 11 Mar 2019 14:58:52 +0000 (15:58 +0100)] 
efivars: make sure efi_loader_entry_name_valid() is always compiled in

The string validation should always be done correctly, and not fail just
because EFI is turned off. After all an EFI loader entry name string
remains properly formatted regardless if EFI is on or off...

Fixes: #11948
6 years agolibudev: use device_get_seqnum() and device_get_action()
Yu Watanabe [Sat, 9 Mar 2019 02:07:26 +0000 (11:07 +0900)] 
libudev: use device_get_seqnum() and device_get_action()

6 years agologin: use device_is_in_action()
Yu Watanabe [Sat, 9 Mar 2019 01:45:48 +0000 (10:45 +0900)] 
login: use device_is_in_action()

6 years agonetwork: use device_get_action()
Yu Watanabe [Sat, 9 Mar 2019 01:37:12 +0000 (10:37 +0900)] 
network: use device_get_action()

6 years agocore/device: use device_get_action()
Yu Watanabe [Sat, 9 Mar 2019 01:28:11 +0000 (10:28 +0900)] 
core/device: use device_get_action()

6 years agoudevadm-test: check action string earlier
Yu Watanabe [Sat, 9 Mar 2019 01:20:42 +0000 (10:20 +0900)] 
udevadm-test: check action string earlier

The string will be checked later in device_new_from_synthetic_event(),
but let's check it earlier in parse_argv().

6 years agoudevadm: use device_get_action()
Yu Watanabe [Sat, 9 Mar 2019 01:14:38 +0000 (10:14 +0900)] 
udevadm: use device_get_action()

6 years agoudev: refuse to modify SEQNUM by udev rules
Yu Watanabe [Sat, 9 Mar 2019 01:09:40 +0000 (10:09 +0900)] 
udev: refuse to modify SEQNUM by udev rules

6 years agoudevd: use device_get_action() and device_get_seqnum()
Yu Watanabe [Sat, 9 Mar 2019 01:08:03 +0000 (10:08 +0900)] 
udevd: use device_get_action() and device_get_seqnum()

6 years agoutil: introduce device_for_action()
Yu Watanabe [Sat, 9 Mar 2019 01:45:15 +0000 (10:45 +0900)] 
util: introduce device_for_action()

It will be used in later commits.

6 years agosd-device: store parsed ACTION= and SEQNUM= udev properties
Yu Watanabe [Fri, 8 Mar 2019 08:25:00 +0000 (17:25 +0900)] 
sd-device: store parsed ACTION= and SEQNUM= udev properties

6 years agoMerge pull request #11960 from mrc0mmand/more-fuzzers
Lennart Poettering [Mon, 11 Mar 2019 17:04:22 +0000 (18:04 +0100)] 
Merge pull request #11960 from mrc0mmand/more-fuzzers

fuzz: introduce more fuzzers

6 years agonetwork: introduce TripleSampling= option in CAN section
Clemens Gruber [Mon, 11 Mar 2019 14:25:20 +0000 (15:25 +0100)] 
network: introduce TripleSampling= option in CAN section

When enabled, three samples are used to determine the value of a
received bit by majority rule.

This patch adds support for the TripleSampling= option in the [CAN]
section of .network files.

6 years agotest-network: add tests for issue #11921
Yu Watanabe [Fri, 8 Mar 2019 03:34:56 +0000 (12:34 +0900)] 
test-network: add tests for issue #11921

6 years agonspawn: fix memleak uncovered by fuzzer 11960/head
Zbigniew Jędrzejewski-Szmek [Mon, 11 Mar 2019 13:27:29 +0000 (14:27 +0100)] 
nspawn: fix memleak uncovered by fuzzer

Also use TAKE_PTR as appropriate.

6 years agofuzz: add a memleak reproducer for fuzz-nspawn-settings
Frantisek Sumsal [Mon, 11 Mar 2019 11:56:10 +0000 (12:56 +0100)] 
fuzz: add a memleak reproducer for fuzz-nspawn-settings

6 years agofuzz: add nspawn-settings fuzzer
Frantisek Sumsal [Mon, 11 Mar 2019 11:43:20 +0000 (12:43 +0100)] 
fuzz: add nspawn-settings fuzzer

6 years agofuzz: add hostname-util fuzzer
Frantisek Sumsal [Mon, 11 Mar 2019 11:43:00 +0000 (12:43 +0100)] 
fuzz: add hostname-util fuzzer

6 years agofuzz: add env-file fuzzer
Frantisek Sumsal [Mon, 11 Mar 2019 11:42:26 +0000 (12:42 +0100)] 
fuzz: add env-file fuzzer

6 years agomachinectl: do not format size if freed disk space is "-1"
Yu Watanabe [Mon, 11 Mar 2019 03:51:51 +0000 (12:51 +0900)] 
machinectl: do not format size if freed disk space is "-1"

Closes #11941.

6 years agojournal-remote: do not request Content-Length if Transfer-Encoding is chunked
Yu Watanabe [Mon, 11 Mar 2019 03:27:18 +0000 (12:27 +0900)] 
journal-remote: do not request Content-Length if Transfer-Encoding is chunked

This fixes a bug introduced by 7fdb237f5473cb8fc2129e57e8a0039526dcb4fd.

Closes #11571.

6 years agofuzz: add bus-label fuzzer
Frantisek Sumsal [Sun, 10 Mar 2019 19:53:57 +0000 (20:53 +0100)] 
fuzz: add bus-label fuzzer

6 years agoimport: do not try to set selinux related attributes if selinux is disabled
Yu Watanabe [Mon, 11 Mar 2019 04:21:09 +0000 (13:21 +0900)] 
import: do not try to set selinux related attributes if selinux is disabled

Closes #11940.

6 years agoAdded support for touchpad hotkey for Lenovo Y50-70 (#11937)
StKob [Mon, 11 Mar 2019 09:50:56 +0000 (10:50 +0100)] 
Added support for touchpad hotkey for Lenovo Y50-70 (#11937)

6 years agonetwork: update logs
Yu Watanabe [Mon, 11 Mar 2019 05:30:45 +0000 (14:30 +0900)] 
network: update logs

6 years agoexecute: remove one aa profile output from context dump
Lennart Poettering [Thu, 7 Mar 2019 14:18:06 +0000 (15:18 +0100)] 
execute: remove one aa profile output from context dump

The same data is output a few lines further up already, drop one.

6 years agoFix compilation without EFI being enabled
Vesa Jääskeläinen [Sat, 9 Mar 2019 20:44:21 +0000 (22:44 +0200)] 
Fix compilation without EFI being enabled

If EFI is disabled compilation can fail with:

../src/login/logind-dbus.c: In function ‘property_get_reboot_to_boot_loader_entry’:
../src/login/logind-dbus.c:2772:29: error: implicit declaration of function ‘efi_loader_entry_name_valid’; did you mean ‘efi_loader_get_features’? [-Werror=implicit-function-declaration]
                 } else if (!efi_loader_entry_name_valid(v)) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                             efi_loader_get_features
../src/login/logind-dbus.c:2772:29: warning: nested extern declaration of ‘efi_loader_entry_name_valid’ [-Wnested-externs]

This adds stub for efi_loader_entry_name_valid() to enable compilation.

6 years agohwdb: label the trackpoint on IBM UltraNav keyboard as a pointing stick (#11934)
Lubomir Rintel [Sun, 10 Mar 2019 23:00:03 +0000 (00:00 +0100)] 
hwdb: label the trackpoint on IBM UltraNav keyboard as a pointing stick (#11934)

This is the TrackPoint on an older IBM-branded ThinkPad-y USB keyboard.
It needs ID_INPUT_POINTINGSTICK=1 for TrackPoint scrolling to work, and
also for the AttrTrackpointMultiplier quirk to apply in libinput
(otherwise the TrackPoint is too slooooow).

6 years agotimedate: fix emitted value when ntp client is enabled/disabled (#11951)
Yu Watanabe [Sun, 10 Mar 2019 19:44:21 +0000 (04:44 +0900)] 
timedate: fix emitted value when ntp client is enabled/disabled (#11951)

This fixes a regression originall caused by cf3872bd2 and
triggered by b4356b5720a.

Fixes #11944

6 years agofix a typo in the man page for dhcpserver
Robin Elvedi [Fri, 8 Mar 2019 18:17:21 +0000 (19:17 +0100)] 
fix a typo in the man page for dhcpserver

6 years agotest: try to determine QEMU_SMP dynamically 11897/head
Frantisek Sumsal [Tue, 5 Mar 2019 15:08:00 +0000 (16:08 +0100)] 
test: try to determine QEMU_SMP dynamically

If the QEMU_SMP value has not been explicitly set, try to determine it
from the number of online CPUs using the nproc utility. If this approach
fails, fall back to the default value QEMU_SMP=1.

This change should significantly help when running integration tests
under QEMU on multicore systems.

6 years agoMerge pull request #11922 from poettering/hostname-protect-fix
Lennart Poettering [Fri, 8 Mar 2019 16:46:42 +0000 (17:46 +0100)] 
Merge pull request #11922 from poettering/hostname-protect-fix

be a bit more conservative with enabling ProtectHostname= for everything

6 years agounits: turn of ProtectHostname= again for services hat need to know about system... 11922/head
Lennart Poettering [Thu, 7 Mar 2019 13:38:11 +0000 (14:38 +0100)] 
units: turn of ProtectHostname= again for services hat need to know about system hostname changes

ProtectHostname= turns off hostname change propagation from host to
service. This means for services that care about the hostname and need
to be able to notice changes to it it's not suitable (though it is
useful for most other cases still).

Let's turn it off hence for journald (which logs the current hostname)
for networkd (which optionally sends the current hostname to dhcp
servers) and resolved (which announces the current hostname via
llmnr/mdns).

6 years agoman: document that ProtectHostname= disables hostname change notifications
Lennart Poettering [Thu, 7 Mar 2019 13:38:07 +0000 (14:38 +0100)] 
man: document that ProtectHostname= disables hostname change notifications

6 years agocore: simplify and check validity of paths for RequiresMountsFor=
Yu Watanabe [Thu, 7 Mar 2019 06:12:10 +0000 (15:12 +0900)] 
core: simplify and check validity of paths for RequiresMountsFor=

Prompted by #11910.

6 years agoMerge pull request #11905 from poettering/catalog-fixes
Lennart Poettering [Thu, 7 Mar 2019 20:37:56 +0000 (21:37 +0100)] 
Merge pull request #11905 from poettering/catalog-fixes

various catalog fixes

6 years agoman: document NetworkNamespacePath= 11927/head
Lennart Poettering [Thu, 7 Mar 2019 20:20:36 +0000 (21:20 +0100)] 
man: document NetworkNamespacePath=

6 years agorun: make sure NetworkNamespacePath= can be used on the systemd-run cmdline
Lennart Poettering [Thu, 7 Mar 2019 15:46:25 +0000 (16:46 +0100)] 
run: make sure NetworkNamespacePath= can be used on the systemd-run cmdline

6 years agocore: support netns joining also for sockets created by .socket unit
Lennart Poettering [Thu, 7 Mar 2019 15:43:58 +0000 (16:43 +0100)] 
core: support netns joining also for sockets created by .socket unit

Similar to the cgroup magic we nowadays do when listening to sockets, to
assign them the right bpf programs, let's also do the same and join the
specified netns in the child process.

This allows people to listen in sockets in specific namespaces, or join
multiple services and socket units together to live in the same
namespace.

6 years agocore: add new setting NetworkNamespacePath= for configuring a netns by path for a...
Lennart Poettering [Thu, 7 Mar 2019 15:39:01 +0000 (16:39 +0100)] 
core: add new setting NetworkNamespacePath= for configuring a netns by path for a service

Fixes: #2741
6 years agocore: add open_netns_path() helper
Lennart Poettering [Thu, 7 Mar 2019 15:42:04 +0000 (16:42 +0100)] 
core: add open_netns_path() helper

The new call allows us to open a netns from the file system, and store
it in a "storage fd pair". It's supposed to work with setup_netns() and
allows pre-population of the netns used with one opened from the file
system.

6 years agoexecute: no need to check for NULL when function right after does anyway
Lennart Poettering [Thu, 7 Mar 2019 15:55:19 +0000 (16:55 +0100)] 
execute: no need to check for NULL when function right after does anyway

6 years agoexecute: (void)ify more
Lennart Poettering [Thu, 7 Mar 2019 15:40:06 +0000 (16:40 +0100)] 
execute: (void)ify more

6 years agoexecute: make things a tiny bit shorter
Lennart Poettering [Thu, 7 Mar 2019 15:39:45 +0000 (16:39 +0100)] 
execute: make things a tiny bit shorter

6 years agoexecute: use structured initialization
Lennart Poettering [Thu, 7 Mar 2019 15:39:17 +0000 (16:39 +0100)] 
execute: use structured initialization

6 years agorandom-seed: don't use "label" version of mkdir_parents() 11905/head
Lennart Poettering [Thu, 7 Mar 2019 14:06:37 +0000 (15:06 +0100)] 
random-seed: don't use "label" version of mkdir_parents()

We don't load the selinux label database anyway, hence this is not going
to do anything at all. Let's simplify this hence and drop the explicit
request.

Also note that today SELinux can take the filename into account when
automatically deducing the label for a new file, hence even if this code
actually would have done something it is redundant today.

6 years agocatalog: _cleanup_close_ is your friend
Lennart Poettering [Wed, 6 Mar 2019 10:42:35 +0000 (11:42 +0100)] 
catalog: _cleanup_close_ is your friend

6 years agocatalog: (void)ify all things
Lennart Poettering [Wed, 6 Mar 2019 10:42:12 +0000 (11:42 +0100)] 
catalog: (void)ify all things

6 years agocatalog: use structured initialization more
Lennart Poettering [Wed, 6 Mar 2019 10:41:59 +0000 (11:41 +0100)] 
catalog: use structured initialization more

6 years agocatalog: let's use mkdir_parents() and use same mode as tmpfiles.d for this dir
Lennart Poettering [Wed, 6 Mar 2019 10:40:31 +0000 (11:40 +0100)] 
catalog: let's use mkdir_parents() and use same mode as tmpfiles.d for this dir

let's use mkdir_parents() (because its shorter), and 0755 as access
mode, so that things have the access mode tmpfiles.d also suggests.

Prompted by: #11903

6 years agocatalog: be a bit less aggressive with line breaking. After all 109ch is what we...
Lennart Poettering [Wed, 6 Mar 2019 10:39:11 +0000 (11:39 +0100)] 
catalog: be a bit less aggressive with line breaking. After all 109ch is what we going for

6 years agocatalog: don't make catalog_entry_lang() clobber output params on failure
Lennart Poettering [Wed, 6 Mar 2019 10:38:28 +0000 (11:38 +0100)] 
catalog: don't make catalog_entry_lang() clobber output params on failure

A minor fix to bring this in-line with our coding style

6 years agounits: fix systemd.special man page reference in system-update-cleanup.service
Michael Biebl [Thu, 7 Mar 2019 11:02:53 +0000 (12:02 +0100)] 
units: fix systemd.special man page reference in system-update-cleanup.service

6 years agoMerge pull request #11916 from yuwata/pid1-id-renaming-handling
Lennart Poettering [Thu, 7 Mar 2019 13:42:08 +0000 (14:42 +0100)] 
Merge pull request #11916 from yuwata/pid1-id-renaming-handling

core: handle ID_RENAMING= udev property

6 years agoMerge pull request #11918 from keszybz/clang-8
Lennart Poettering [Thu, 7 Mar 2019 13:41:44 +0000 (14:41 +0100)] 
Merge pull request #11918 from keszybz/clang-8

Two trivial changes to build with clang 8

6 years agonspawn: move payload to sub-cgroup first, then sync cgroup trees
Lennart Poettering [Tue, 5 Mar 2019 17:57:53 +0000 (18:57 +0100)] 
nspawn: move payload to sub-cgroup first, then sync cgroup trees

if we sync the legacy and unified trees before moving to the right
subcgroup then ultimately the cgroup paths in the hierarchies will be
out-of-sync... Hence, let's move the payload first, and sync then.

Addresses: https://github.com/systemd/systemd/pull/9762#issuecomment-441187979

6 years agopo: update Polish translation
Piotr Drąg [Wed, 6 Mar 2019 17:59:02 +0000 (18:59 +0100)] 
po: update Polish translation

6 years agotest-execute: avoid undefined variable warning when compiled w/o seccomp 11918/head
Zbigniew Jędrzejewski-Szmek [Thu, 7 Mar 2019 09:56:38 +0000 (10:56 +0100)] 
test-execute: avoid undefined variable warning when compiled w/o seccomp

6 years agobuild-sys: disable -Wstring-plus-int
Zbigniew Jędrzejewski-Szmek [Thu, 7 Mar 2019 09:56:15 +0000 (10:56 +0100)] 
build-sys: disable -Wstring-plus-int

clang-8 warns about constructs like "foobar"+3 (to get "bar"). We
like to use patterns like this, so let's just disable the warning.

6 years agoremove "." path components from required mount paths
Stephane Chazelas [Wed, 6 Mar 2019 22:16:55 +0000 (22:16 +0000)] 
remove "." path components from required mount paths

unit_require_mounts_for may be passed path arguments that contain "."
components like for user's home directories where "." is sometimes used
to specify some form of anchor point.

This change stops considering such path as an error and removes the "."
components instead.

Closes: #11910
6 years agohwdb: Add support for Alienware touchpad toggle
Kai-Heng Feng [Wed, 6 Mar 2019 16:28:10 +0000 (00:28 +0800)] 
hwdb: Add support for Alienware touchpad toggle

BugLink: https://bugs.launchpad.net/bugs/1605433
6 years agoMerge pull request #11911 from keszybz/bootspec-handle-invalid-efi
Lennart Poettering [Thu, 7 Mar 2019 09:01:31 +0000 (10:01 +0100)] 
Merge pull request #11911 from keszybz/bootspec-handle-invalid-efi

Bootspec handle invalid efi

6 years agoTODO: update 11916/head
Yu Watanabe [Thu, 7 Mar 2019 05:49:09 +0000 (14:49 +0900)] 
TODO: update

6 years agotest: add test for ID_RENAMING= udev property handling by pid1
Yu Watanabe [Thu, 7 Mar 2019 05:47:43 +0000 (14:47 +0900)] 
test: add test for ID_RENAMING= udev property handling by pid1

6 years agoman: mention possible actions supported by "udevadm trigger"
Yu Watanabe [Thu, 7 Mar 2019 05:45:38 +0000 (14:45 +0900)] 
man: mention possible actions supported by "udevadm trigger"

6 years agoudevadm trigger: make --action option support all possible actions
Yu Watanabe [Thu, 7 Mar 2019 05:43:33 +0000 (14:43 +0900)] 
udevadm trigger: make --action option support all possible actions

This also make udevadm abort operations if invalid action is specified.

6 years agosd-device: move device_action_from_string() and friends to device-private.h
Yu Watanabe [Thu, 7 Mar 2019 05:42:36 +0000 (14:42 +0900)] 
sd-device: move device_action_from_string() and friends to device-private.h

6 years agocore/device: make devices with ID_RENAMING= property be considered not ready
Yu Watanabe [Thu, 7 Mar 2019 03:54:58 +0000 (12:54 +0900)] 
core/device: make devices with ID_RENAMING= property be considered not ready

6 years agoshared/bootspec: do not fail on errors when reading EFI vars 11911/head
Zbigniew Jędrzejewski-Szmek [Wed, 6 Mar 2019 21:49:52 +0000 (22:49 +0100)] 
shared/bootspec: do not fail on errors when reading EFI vars

It seems that my EFI storage is corrupted. The kernel reports the file as present, but returns
an error when reading. Nevertheless, this shouldn't prevent me from reading the entry
list.

Fixes #11909.

6 years agoshared/bootspec: treat empty EFI vars as missing
Zbigniew Jędrzejewski-Szmek [Wed, 6 Mar 2019 21:45:37 +0000 (22:45 +0100)] 
shared/bootspec: treat empty EFI vars as missing

We shouldn't really make any fuss about this. Also, change 'var' to 'variable'
for consistency with systemctl.c.

6 years agoshared/bootspec: minor simplification
Zbigniew Jędrzejewski-Szmek [Tue, 5 Mar 2019 12:56:18 +0000 (13:56 +0100)] 
shared/bootspec: minor simplification

6 years agoMerge pull request #11898 from keszybz/meson-conv-lib
Lennart Poettering [Wed, 6 Mar 2019 09:46:18 +0000 (10:46 +0100)] 
Merge pull request #11898 from keszybz/meson-conv-lib

Use a convenience library for the sources shared between core/ and shutdown/

6 years agotest: parallelize tasks in TEST-24-UNIT-TESTS
Frantisek Sumsal [Tue, 5 Mar 2019 12:50:28 +0000 (13:50 +0100)] 
test: parallelize tasks in TEST-24-UNIT-TESTS

6 years agojson: log about the right line number
Lennart Poettering [Tue, 5 Mar 2019 17:11:35 +0000 (18:11 +0100)] 
json: log about the right line number

We mean the line number in the json data, not the line number in our
C source code.

Addresses: https://github.com/systemd/systemd/pull/9762#issuecomment-441183987

6 years agomeson: drop "_la_" from variable name 11898/head
Zbigniew Jędrzejewski-Szmek [Tue, 5 Mar 2019 15:22:33 +0000 (16:22 +0100)] 
meson: drop "_la_" from variable name

A left-over from libtool times.

6 years agomeson: use a convenience library for the sources shared between core/ and the outside
Zbigniew Jędrzejewski-Szmek [Tue, 5 Mar 2019 15:19:40 +0000 (16:19 +0100)] 
meson: use a convenience library for the sources shared between core/ and the outside

This avoids double compilation. Those files are tiny, so it doesn't save time,
but we avoid repeated warnings and errors, and it's generally cleaner to it
this way.

The number of commands in 'ninja -C build clean && ninja -C build' drops from
1462 to 1455 for me.

6 years agoMerge pull request #10495 from poettering/login-boot-hookup
Zbigniew Jędrzejewski-Szmek [Tue, 5 Mar 2019 19:38:41 +0000 (20:38 +0100)] 
Merge pull request #10495 from poettering/login-boot-hookup

add "systemctl reboot --boot-loader-menu=" and "systemctl reboot --boot-loader-entry="

6 years agopkgconfig: avoid double slash with split-usr configuration
Zbigniew Jędrzejewski-Szmek [Tue, 5 Mar 2019 15:46:52 +0000 (16:46 +0100)] 
pkgconfig: avoid double slash with split-usr configuration

By defining rootprefix= we avoid a double slash in $systemdsystemunitdir and
other variables. This fixes a regression introduced in
1c2c7c6cb3d92315624f3711114e86b0acfbce63 where the variables using rootprefix=/
would start with a double slash. This should be interpreted the same, but is
certainly ugly.

The rootprefix variable was added to systemd.pc in
1c2c7c6cb3d92315624f3711114e86b0acfbce63, so there is no question of backwards
compatiblity. If people try to "override" the prefix and specify
--define-variable=rootprefix=/, they will get a double slash, which should be
OK, and is the same as --define-variable=rootprefix=/something/, which also
results in a double slash somewhere in the strings.

6 years agoupdate TODO 10495/head
Lennart Poettering [Tue, 23 Oct 2018 12:17:22 +0000 (14:17 +0200)] 
update TODO

6 years agodocs: document the new environment variables logind groks
Lennart Poettering [Tue, 23 Oct 2018 13:53:18 +0000 (15:53 +0200)] 
docs: document the new environment variables logind groks

6 years agologind: refactor logic of returning polkit challenge result into its own function
Lennart Poettering [Tue, 23 Oct 2018 11:58:41 +0000 (13:58 +0200)] 
logind: refactor logic of returning polkit challenge result into its own function

Let's share some code.

6 years agosystemctl: add support for booting into boot menu/entry
Lennart Poettering [Mon, 22 Oct 2018 18:43:45 +0000 (20:43 +0200)] 
systemctl: add support for booting into boot menu/entry

(This also removes support for booting into the EFI firmware setup
without logind. That's because otherwise the non-EFI fallback logind
implements can't work.)

Fixes: #9896
6 years agologind: add support for booting into the boot menu or a specific boot menu entry
Lennart Poettering [Mon, 22 Oct 2018 18:06:52 +0000 (20:06 +0200)] 
logind: add support for booting into the boot menu or a specific boot menu entry

This behaves similar to the "boot into firmware" logic, and also allows
either direct EFI operation (which sd-boot supports and others might
support eventually too) or override through env var.

6 years agobootspec: validate bootpsec entry ids before we use them
Lennart Poettering [Mon, 4 Mar 2019 18:19:30 +0000 (19:19 +0100)] 
bootspec: validate bootpsec entry ids before we use them

6 years agobootspec: get rid of find_default_boot_entry() entirely
Lennart Poettering [Mon, 4 Mar 2019 17:02:30 +0000 (18:02 +0100)] 
bootspec: get rid of find_default_boot_entry() entirely

Now only two operations are left. Let's just move this into the caller,
since it should make things simpler, clearer and shorter, in particular
as there's only a single user for this.

6 years agobootspec: rework find_default_boot_entry() to use boot_entries_load_config_auto()
Lennart Poettering [Mon, 4 Mar 2019 16:57:54 +0000 (17:57 +0100)] 
bootspec: rework find_default_boot_entry() to use boot_entries_load_config_auto()

it's pretty much the same code now, hence use it.