]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoupdate TODO 16142/head
Lennart Poettering [Thu, 11 Jun 2020 07:54:44 +0000 (09:54 +0200)] 
update TODO

3 years agoman: document systemd.random-seed=
Lennart Poettering [Thu, 11 Jun 2020 08:04:41 +0000 (10:04 +0200)] 
man: document systemd.random-seed=

3 years agocore: add new systemd.random_seed= kernel command line option for seeding entropy...
Lennart Poettering [Thu, 11 Jun 2020 07:56:01 +0000 (09:56 +0200)] 
core: add new systemd.random_seed= kernel command line option for seeding entropy pool

This is useful in test environments with entropy starved VMs.

3 years agorandom-util: add common helper random_write_entropy() for crediting entropy to the...
Lennart Poettering [Thu, 11 Jun 2020 07:53:29 +0000 (09:53 +0200)] 
random-util: add common helper random_write_entropy() for crediting entropy to the kernel's pool

3 years agopid1: don't apply "systemd.clock_usec" kernel cmdline parameter outside of PID 1
Lennart Poettering [Thu, 11 Jun 2020 07:52:01 +0000 (09:52 +0200)] 
pid1: don't apply "systemd.clock_usec" kernel cmdline parameter outside of PID 1

3 years agorandom-seed: use ERRNO_IS_NOT_SUPPORTED() where appropriate
Lennart Poettering [Thu, 11 Jun 2020 07:51:25 +0000 (09:51 +0200)] 
random-seed: use ERRNO_IS_NOT_SUPPORTED() where appropriate

3 years agofeature to honor first shutdown request to completion
Jay Burger [Fri, 10 Apr 2020 21:38:42 +0000 (16:38 -0500)] 
feature to honor first shutdown request to completion

Create unit tests per established norm at position 52

check in_set first before getting unit

3 years agoMerge pull request #16112 from poettering/nss-systemd-block-fix
Lennart Poettering [Wed, 24 Jun 2020 06:39:44 +0000 (08:39 +0200)] 
Merge pull request #16112 from poettering/nss-systemd-block-fix

rework nss-systemd recursion lock

3 years agoMerge pull request #16223 from cgzones/user_selinux
Lennart Poettering [Wed, 24 Jun 2020 06:39:13 +0000 (08:39 +0200)] 
Merge pull request #16223 from cgzones/user_selinux

Initialize SELinux in user instances

3 years agoselinux: update mac_selinux_free()
Christian Göttsche [Tue, 23 Jun 2020 10:26:59 +0000 (12:26 +0200)] 
selinux: update mac_selinux_free()

* Drop mac_selinux_use() condition from mac_selinux_free(): if the
  passed pointer holds memory we want to free it even if SELinux is
  disabled

* Drop NULL-check cause man:freecon(3) states that freecon(NULL) is a
  well-defined NOP

* Assert that on non-SELinux builds the passed pointer is always NULL,
  to avoid memory leaks

3 years agohwdb: add another Logitech G502 Hero variant (#16256)
Gigadoc2 [Tue, 23 Jun 2020 23:46:46 +0000 (23:46 +0000)] 
hwdb: add another Logitech G502 Hero variant (#16256)

The commit 67551ea already adds the G502 Hero mouse, but apparently
there are multiple variants with the same ID but different names.

3 years agoMerge pull request #16246 from benzea/benzea/xdg-autostart
Zbigniew Jędrzejewski-Szmek [Tue, 23 Jun 2020 19:13:07 +0000 (21:13 +0200)] 
Merge pull request #16246 from benzea/benzea/xdg-autostart

Minor xdg-autostart changes

3 years agoMerge pull request #16213 from yuwata/network-cleanup-link-state-file
Zbigniew Jędrzejewski-Szmek [Tue, 23 Jun 2020 19:09:24 +0000 (21:09 +0200)] 
Merge pull request #16213 from yuwata/network-cleanup-link-state-file

network: cleanup link state file

3 years agomake-autosuspend-rules: restore compatibility with Python3 < 3.6
Luca Boccassi [Tue, 23 Jun 2020 10:45:50 +0000 (11:45 +0100)] 
make-autosuspend-rules: restore compatibility with Python3 < 3.6

The f'...' format was introduced in Python 3.6 ( https://www.python.org/dev/peps/pep-0498/ )
and returns an error when systemd is built on a system with an older Python3 version:

<...>
  File /home/bluca/git/systemd/tools/make-autosuspend-rules.py, line 15
    print(f'pci:v{vendor:08X}d{device:08X}*')
                                           ^
SyntaxError: invalid syntax
[2/388] Generating version.h with a custom command.
ninja: build stopped: subcommand failed.
$ python3 --version
Python 3.5.6

Use an older format to keep backward compatibility.

3 years agoMake failures of mac_selinux_init() fatal 16223/head
Christian Göttsche [Fri, 19 Jun 2020 17:29:24 +0000 (19:29 +0200)] 
Make failures of mac_selinux_init() fatal

3 years agoInitialize SELinux in user instances
Christian Göttsche [Fri, 19 Jun 2020 16:24:10 +0000 (18:24 +0200)] 
Initialize SELinux in user instances

Call mac_selinux_init() to setup the label cache, so objects can be
created with default SELinux context.

Fixes: #8004
3 years agouserdb: replace recursion lock 16112/head
Lennart Poettering [Thu, 4 Jun 2020 09:46:36 +0000 (11:46 +0200)] 
userdb: replace recursion lock

Previously we'd used the existance of a specific AF_UNIX socket in the
abstract namespace as lock for disabling lookup recursions. (for
breaking out of the loop: userdb synthesized from nss → nss synthesized
from userdb → userdb synthesized from nss → …)

I did it like that because it promised to work the same both in static
and in dynmically linked environments and is accessible easily from any
programming language.

However, it has a weakness regarding reuse attacks: the socket is
securely hashed (siphash) from the thread ID in combination with the
AT_RANDOM secret. Thus it should not be guessable from an attacker in
advance. That's only true if a thread takes the lock only once and
keeps it forever. However, if a thread takes and releases it multiple
times an attacker might monitor that and quickly take the lock
after the first iteration for follow-up iterations.

It's not a big issue given that userdb (as the primary user for this)
never released the lock and we never made the concept a public
interface, and it was only included in one release so far, but it's
something that deserves fixing. (moreover it's a local DoS only, only
permitting to disable native userdb lookups)

With this rework the libnss_systemd.so.2 module will now export two
additional symbols. These symbols are not used by glibc, but can be used
by arbitrary programs: one can be used to disable nss-systemd, the other
to check if it is currently disabled.

The lock is per-thread. It's slightly less pretty, since it requires
people to manually link against C code via dlopen()/dlsym(), but it
should work safely without the aforementioned weakness.

3 years agonss-systemd: skip /etc/gshadow look-ups when we just need the GID of a group
Lennart Poettering [Tue, 9 Jun 2020 08:47:43 +0000 (10:47 +0200)] 
nss-systemd: skip /etc/gshadow look-ups when we just need the GID of a group

3 years agoutil: add dlfcn-util.h
Lennart Poettering [Thu, 4 Jun 2020 09:25:46 +0000 (11:25 +0200)] 
util: add dlfcn-util.h

This just adds a _cleanup_ helper call encapsulating dlclose().

This also means libsystemd-shared is linked against libdl now. I don't
think this is much of an issue, since libdl is part of glibc anyway, and
anything from exotic. It's not an optional part of the OS (think: NSS
requires dynamic linking), hence this pulls in no deps and is almost
certainly loaded into all process' memory anyway.

[zj: use DEFINE_TRIVIAL_CLEANUP_FUNC().]

3 years agoman: replace perl bug tracker link that went away with link to paper
Lennart Poettering [Tue, 23 Jun 2020 15:11:47 +0000 (17:11 +0200)] 
man: replace perl bug tracker link that went away with link to paper

Fixes: #16245
3 years agoman: s/PROGRAMM/PROGRAM/
Lennart Poettering [Tue, 23 Jun 2020 15:06:42 +0000 (17:06 +0200)] 
man: s/PROGRAMM/PROGRAM/

3 years agoRevert "cgroup: Allow empty assignments of Memory{Low,Min}="
Zbigniew Jędrzejewski-Szmek [Tue, 23 Jun 2020 09:35:39 +0000 (11:35 +0200)] 
Revert "cgroup: Allow empty assignments of Memory{Low,Min}="

This reverts commit 53aa85af24cda4470b6750f88e181b775385e228.
The reason is that that patch changes the dbus api to be different than
the types declared by introspection api.

Replaces #16122.

3 years agonetworkctl: display DHCPv4 server address 16213/head
Susant Sahani [Thu, 18 Jun 2020 15:01:21 +0000 (00:01 +0900)] 
networkctl: display DHCPv4 server address

3 years agodhcp: fix entry name in parsing lease file
Yu Watanabe [Thu, 18 Jun 2020 14:59:38 +0000 (23:59 +0900)] 
dhcp: fix entry name in parsing lease file

3 years agonetwork: drop duplicated information from link state file
Yu Watanabe [Thu, 18 Jun 2020 14:35:09 +0000 (23:35 +0900)] 
network: drop duplicated information from link state file

Those entries are already in DHCP4 lease file, and not used anymore.

3 years agosd-network: drop unused functions
Yu Watanabe [Thu, 18 Jun 2020 14:31:32 +0000 (23:31 +0900)] 
sd-network: drop unused functions

3 years agonetworkctl: use lease file to get DHCPv4 client ID
Yu Watanabe [Thu, 18 Jun 2020 14:24:06 +0000 (23:24 +0900)] 
networkctl: use lease file to get DHCPv4 client ID

3 years agonetworkctl: use lease file to get DHCPv4 address
Yu Watanabe [Thu, 18 Jun 2020 14:18:27 +0000 (23:18 +0900)] 
networkctl: use lease file to get DHCPv4 address

3 years agonetworkctl: load DHCPv4 lease file and use timezone data from the lease file
Yu Watanabe [Thu, 18 Jun 2020 14:02:31 +0000 (23:02 +0900)] 
networkctl: load DHCPv4 lease file and use timezone data from the lease file

3 years agolibsystemd-network: move prototypes of dhcp_lese_save/load() to network-internal.h
Yu Watanabe [Thu, 18 Jun 2020 14:01:05 +0000 (23:01 +0900)] 
libsystemd-network: move prototypes of dhcp_lese_save/load() to network-internal.h

3 years agoRevert "job: Don't mark as redundant if deps are relevant"
Dave Reisner [Thu, 11 Jun 2020 14:34:13 +0000 (10:34 -0400)] 
Revert "job: Don't mark as redundant if deps are relevant"

This reverts commit 097537f07a2fab3cb73aef7bc59f2a66aa93f533.

At least Fedora and Debian have already reverted this at the distro
level because it causes more problems than it solves. Arch is debating
reverting it as well [0] but would strongly prefer that this happens
upstream first. Fixes #15188.

[0] https://bugs.archlinux.org/task/66458

3 years agoxdg-autostart: Ignore all files with GNOME autostart phase 16246/head
Benjamin Berg [Tue, 23 Jun 2020 08:44:50 +0000 (10:44 +0200)] 
xdg-autostart: Ignore all files with GNOME autostart phase

If an autostart file for GNOME has a phase specified, then this implies
it is a session service that needs to be started at a specific time.

We have no way of handling the ordering, and while it does make sense
to explicitly hide these services with X-systemd-skip, there is no point
in even trying to handle them.

3 years agoxdg-autostart: Fix info message if Type= is not Application
Benjamin Berg [Tue, 23 Jun 2020 08:38:08 +0000 (10:38 +0200)] 
xdg-autostart: Fix info message if Type= is not Application

The message was copy-pasted and not changed to correctly specify what
the problem was.

3 years agocore: add RootHash and RootVerity service parameters
Luca Boccassi [Wed, 3 Jun 2020 08:50:45 +0000 (09:50 +0100)] 
core: add RootHash and RootVerity service parameters

Allow to explicitly pass root hash (explicitly or as a file) and verity
device/file as unit options. Take precedence over implicit checks.

3 years agonspawn: mkdir selinux mount point once, but not twice
Lennart Poettering [Tue, 16 Jun 2020 14:50:46 +0000 (16:50 +0200)] 
nspawn: mkdir selinux mount point once, but not twice

Since #15533 we didn't create the mount point for selinuxfs anymore.

Before it we created it twice because we mount selinuxfs twice: once the
superblock, and once we remount its bind mound read-only. The second
mkdir would mean we'd chown() the host version of selinuxfs (since
there's only one selinuxfs superblock kernel-wide).

The right time to create mount point point is once: before we mount the
selinuxfs. But not a second time for the remount.

Fixes: #16032
3 years agoMerge pull request #16196 from mrc0mmand/travis-simplification
Zbigniew Jędrzejewski-Szmek [Tue, 23 Jun 2020 08:16:18 +0000 (10:16 +0200)] 
Merge pull request #16196 from mrc0mmand/travis-simplification

travis: use a matrix for similar jobs

3 years agoMerge pull request #16216 from nabijaczleweli/make-a-fuss
Zbigniew Jędrzejewski-Szmek [Tue, 23 Jun 2020 08:12:47 +0000 (10:12 +0200)] 
Merge pull request #16216 from nabijaczleweli/make-a-fuss

man/sd-makefs: mention that mkswap can also be run and fix deadlink to btrfs-man5(5)

3 years agoselinux-util: tweak log_enforcing_errno() to return the errno passed in or 0 when...
Lennart Poettering [Mon, 22 Jun 2020 13:37:12 +0000 (15:37 +0200)] 
selinux-util: tweak log_enforcing_errno() to return the errno passed in or 0 when in non-enforcing mode

Also, some other, minor modernizations.

3 years agotest-functions: read /usr/etc/nsswitch.conf if /etc/nsswitch.conf does not exist...
Elisei Roca [Tue, 23 Jun 2020 05:42:15 +0000 (07:42 +0200)] 
test-functions: read /usr/etc/nsswitch.conf if /etc/nsswitch.conf does not exist (#16195)

See this for more info why and since when this change is needed: https://build.opensuse.org/request/show/807179.

3 years agoman/sd-makefs: link to btrfs.wiki.kernel.org for btrfs-man5, since the man-pages... 16216/head
наб [Thu, 18 Jun 2020 23:55:09 +0000 (01:55 +0200)] 
man/sd-makefs: link to btrfs.wiki.kernel.org for btrfs-man5, since the man-pages link is dead

This also adds a <citerefentry project="url"> type,
since the other btrfs manpages use man-pages/die-net and are alive,
and btrfs.w.k.o won't be used anywhere else

3 years agoMerge pull request #16237 from keszybz/revert-message-type-check
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jun 2020 20:46:13 +0000 (22:46 +0200)] 
Merge pull request #16237 from keszybz/revert-message-type-check

Revert "bus-message: immediately reject messages with invalid type"

3 years agoMerge pull request #16179 from keszybz/auto-suspend-hwdb
Lennart Poettering [Mon, 22 Jun 2020 15:38:42 +0000 (17:38 +0200)] 
Merge pull request #16179 from keszybz/auto-suspend-hwdb

Convert autosuspend rules to hwdb

3 years agobus-message: add macro for calculation of offset from the page 16237/head
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jun 2020 15:18:35 +0000 (17:18 +0200)] 
bus-message: add macro for calculation of offset from the page

3 years agobus-message: avoid dereferencing a NULL pointer
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jun 2020 15:09:49 +0000 (17:09 +0200)] 
bus-message: avoid dereferencing a NULL pointer

We'd try to map a zero-byte buffer from a NULL pointer, which is undefined behaviour.

src/systemd/src/libsystemd/sd-bus/bus-message.c:3161:60: runtime error: applying zero offset to null pointer
    #0 0x7f6ff064e691 in find_part /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-message.c:3161:60
    #1 0x7f6ff0640788 in message_peek_body /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-message.c:3283:16
    #2 0x7f6ff064e8db in enter_struct_or_dict_entry /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-message.c:3967:21
    #3 0x7f6ff06444ac in bus_message_enter_struct /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-message.c:4009:13
    #4 0x7f6ff0641dde in sd_bus_message_enter_container /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-message.c:4136:21
    #5 0x7f6ff0619874 in sd_bus_message_dump /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-dump.c:178:29
    #6 0x4293d9 in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-bus-message.c:39:9
    #7 0x441986 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:558:15
    #8 0x44121e in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:470:3
    #9 0x443164 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__1::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/libfuzzer/FuzzerLoop.cpp:770:7
    #10 0x4434bc in fuzzer::Fuzzer::Loop(std::__1::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/libfuzzer/FuzzerLoop.cpp:799:3
    #11 0x42d2bc in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:846:6
    #12 0x42978a in main /src/libfuzzer/FuzzerMain.cpp:19:10
    #13 0x7f6fef13c82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #14 0x407808 in _start (out/fuzz-bus-message+0x407808)

3 years agoRevert "bus-message: immediately reject messages with invalid type"
Zbigniew Jędrzejewski-Szmek [Sun, 21 Jun 2020 14:15:23 +0000 (16:15 +0200)] 
Revert "bus-message: immediately reject messages with invalid type"

This reverts commit a2dd991d0fde59dc0574bd4d0c1438f01dc0b8ff.
Creation of such messages is evidently useful, and at least sdbus-c++ test
suite depends on that.

Fixes #16193.

3 years agomake-autosuspend-rules: remove one instance of "whitelist" 16179/head
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jun 2020 12:41:50 +0000 (14:41 +0200)] 
make-autosuspend-rules: remove one instance of "whitelist"

Let's be clear what we mean exactly. Also see https://lwn.net/Articles/823224/
for general justification.

3 years agorules: remove 61-autosuspend-manual.rules
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jun 2020 12:38:01 +0000 (14:38 +0200)] 
rules: remove 61-autosuspend-manual.rules

It doesn't hurt, but there's no point in keeping it now. Any changes
can be added to 60-autosuspend.hwdb.

3 years agohwdb: enable autosuspend for Wacom Pen and EMV Smartcard Reader
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jun 2020 16:38:58 +0000 (18:38 +0200)] 
hwdb: enable autosuspend for Wacom Pen and EMV Smartcard Reader

Replaces #16113.

3 years agotest: also verify the generated autosuspend hwdb file
Zbigniew Jędrzejewski-Szmek [Sun, 14 Jun 2020 10:43:42 +0000 (12:43 +0200)] 
test: also verify the generated autosuspend hwdb file

Hint: meson test -C build parse-hwdb -v

3 years agotools: rewrite make-autosuspend-rules.py and add udev rules
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 15:52:41 +0000 (17:52 +0200)] 
tools: rewrite make-autosuspend-rules.py and add udev rules

Concatenating strings is not a very efficient approach. And in this case fully
unnecessary. We also need some rules to make use of those hwdb entries.

PCI needs to be 8 characters, not 4. And we need to use uppercase hexadecimal
for both. With udev rules this made no difference, but hwdb match is case
sensitive.

Fixes #16119.

3 years agoMerge pull request #16235 from yuwata/network-fix-warning-16224
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jun 2020 12:29:50 +0000 (14:29 +0200)] 
Merge pull request #16235 from yuwata/network-fix-warning-16224

network: fix compile error

3 years agolog: Prefer logging to CLI unless JOURNAL_STREAM is set
Daan De Meyer [Wed, 10 Jun 2020 18:19:41 +0000 (20:19 +0200)] 
log: Prefer logging to CLI unless JOURNAL_STREAM is set

3 years agoMerge pull request #16059 from keszybz/resolve-single-label-names
Lennart Poettering [Mon, 22 Jun 2020 12:00:31 +0000 (14:00 +0200)] 
Merge pull request #16059 from keszybz/resolve-single-label-names

Optionally resolve single label names

3 years agoMerge pull request #15926 from fbuihuu/rework-show-status
Lennart Poettering [Mon, 22 Jun 2020 11:55:06 +0000 (13:55 +0200)] 
Merge pull request #15926 from fbuihuu/rework-show-status

Rework show status

3 years agoman: add note regarding editing user groups
ignapk [Fri, 19 Jun 2020 06:29:59 +0000 (08:29 +0200)] 
man: add note regarding editing user groups

Currently the manual doesn't clearly say whether `homectl update username -G group` will append the group to the user, or overwrite the list and remove user from the groups that aren't specified.

Fix this by updating the manual, basing the change on the usermod manual.

3 years agonetwork: add missing break
Yu Watanabe [Mon, 22 Jun 2020 04:10:39 +0000 (13:10 +0900)] 
network: add missing break

Follow-up for 2a71d57f4e63e4492a7c2d6d747e498d0c5521cd.

3 years agoMerge pull request #16239 from keszybz/cleanups
Lennart Poettering [Mon, 22 Jun 2020 10:48:49 +0000 (12:48 +0200)] 
Merge pull request #16239 from keszybz/cleanups

Two minor tweaks

3 years agoci: pass -Werror using CFLAGS 16235/head
Evgeny Vereshchagin [Fri, 19 Jun 2020 22:44:09 +0000 (00:44 +0200)] 
ci: pass -Werror using CFLAGS

Judging by https://github.com/systemd/systemd/issues/16224, it seems
`--werror` doesn't work with `-Db_lto=true`

3 years agonetwork: drop unnecessary "&"
Yu Watanabe [Mon, 22 Jun 2020 03:13:20 +0000 (12:13 +0900)] 
network: drop unnecessary "&"

This confuses gcc-10 with -O3 -flto.

Closes #16224.

3 years agoman: Fix a typo of session
Matthew Leeds [Fri, 19 Jun 2020 03:43:40 +0000 (20:43 -0700)] 
man: Fix a typo of session

3 years agoman/sd-makefs: also mention /sbin/mkswap
наб [Thu, 18 Jun 2020 23:15:20 +0000 (01:15 +0200)] 
man/sd-makefs: also mention /sbin/mkswap

3 years agoman: document the new option 16059/head
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jun 2020 15:01:34 +0000 (17:01 +0200)] 
man: document the new option

Also correct "stub resolver" → "systemd-resolved" in one other option.

3 years agoresolved: optionally allow single-label A/AAAA queries
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jun 2020 11:10:23 +0000 (13:10 +0200)] 
resolved: optionally allow single-label A/AAAA queries

3 years agoresolved: drop bit-field annotations for fields in Manager
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jun 2020 11:09:59 +0000 (13:09 +0200)] 
resolved: drop bit-field annotations for fields in Manager

Access to bit fields is less efficient, and since the Manager is a singleton,
a byte or two of space in the structure doesn't matter at all. (And in this
particular case, because of alignment issues, we wouldn't save anything
anyway.)

3 years agoresolved: add dns_query_candidate_freep()
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jun 2020 10:53:27 +0000 (12:53 +0200)] 
resolved: add dns_query_candidate_freep()

3 years agoman: rework description of Domains=
Zbigniew Jędrzejewski-Szmek [Tue, 2 Jun 2020 16:21:04 +0000 (18:21 +0200)] 
man: rework description of Domains=

We said that ~domains "do not define a search path", which is mighty confusing,
because this is exactly what they do. So let's try to make this a bit easier
for the reader: start by saying that there are two things going on here, and
describe each one from user's POV.

3 years agoudev: do not execute hwdb builtin import twice or thrice
Zbigniew Jędrzejewski-Szmek [Sun, 14 Jun 2020 16:34:27 +0000 (18:34 +0200)] 
udev: do not execute hwdb builtin import twice or thrice

Running the import more than once shouldn't matter, but it's a bit confusing
and causes a slowdown too. This patch reworks the rules to avoid duplicted runs,
but tries to keep the same imports. (E.g. import for pci devices without MODALIAS
is only done for tty devices.)

Note that this is only about hwdb import with argument, which uses MODALIAS as
the lookup key. There are other imports done with different lookup keys.

3 years agosd-boot: Add small comments after device-specific key macros
Paul Cercueil [Mon, 15 Jun 2020 10:54:28 +0000 (12:54 +0200)] 
sd-boot: Add small comments after device-specific key macros

The key macros added in commit 6fe95d3020 look strange at first sight.
Add a comment with just the tablet name after each line, so that it's
obvious that these lines address device-specific issues of the EFI
firmware, and not broken/old code.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
3 years agoMerge pull request #16191 from poettering/repart-spec
Lennart Poettering [Thu, 18 Jun 2020 13:53:31 +0000 (15:53 +0200)] 
Merge pull request #16191 from poettering/repart-spec

repart: add specifier expansion to Label= + bump default mininum size to 10M

3 years agoMerge pull request #16208 from yuwata/udev-fix-16207
Lennart Poettering [Thu, 18 Jun 2020 13:52:07 +0000 (15:52 +0200)] 
Merge pull request #16208 from yuwata/udev-fix-16207

udev: fixes error handling of sd_device_get_parent()

3 years agonetwork: do not fail to configure non-nl80211 wifi interfaces
Yu Watanabe [Wed, 17 Jun 2020 04:54:56 +0000 (13:54 +0900)] 
network: do not fail to configure non-nl80211 wifi interfaces

Also, make wifi_get_interface() and wifi_get_station() initialize
destination buffer when they return a non-negatinve value.

Closes #16160.

3 years agonetwork: drop casting in memcpy()ing IPv6 address
Yu Watanabe [Thu, 18 Jun 2020 06:35:27 +0000 (15:35 +0900)] 
network: drop casting in memcpy()ing IPv6 address

Follow-up for #16067.

3 years agoudev: udev_event_apply_format() always make buf NUL terminated 16208/head
Yu Watanabe [Thu, 18 Jun 2020 04:48:45 +0000 (13:48 +0900)] 
udev: udev_event_apply_format() always make buf NUL terminated

The return value of udev_event_apply_format() is always ignored.
So, the destination buffer must be always NUL terminated.

3 years agoudev: fix error handling of sd_device_get_parent()
Yu Watanabe [Thu, 18 Jun 2020 04:48:44 +0000 (13:48 +0900)] 
udev: fix error handling of sd_device_get_parent()

sd_device_get_parent() returns -EINVAL or -ENOENT on error, not -ENODEV.

Fixes #16207.

3 years agonetwork: clean-up DHCP lease server data configuration
Lennart Poettering [Tue, 16 Jun 2020 18:35:18 +0000 (20:35 +0200)] 
network: clean-up DHCP lease server data configuration

This is an attempt to clean up the POP3/SMTP/LPR/… DHCP lease server
data logic in networkd. This reduces code duplication and fixes a number
of bugs.

This removes any support for collecting POP3/SMPT/LPR servers acquired
via local DHCP client releases since noone uses that, and given how old
these protocols are I doubt this will change. It keeps support for
configuring them for the dhcp server however.

The differences between the DNS/NTP/SIP/POP3/SMTP/LPR configuration
logics are minimized.

This removes the relevant symbols from sd-network.h (which is an
internal API only at this point after all).

This is unfortunately not well test, given the old code for this had
barely any tests. But the new code should not perform worse at least,
and allow us to release, since it corrects some interfaces visible in
the .network configuration format.

Fixes: #15943
3 years agoMerge pull request #16061 from filbranden/standalone1
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jun 2020 22:09:42 +0000 (00:09 +0200)] 
Merge pull request #16061 from filbranden/standalone1

meson: add a new -Dstandalone-binaries=true option

3 years agonetwork: DHCPv6 - Add support to set token on the LAN interface
Susant Sahani [Wed, 10 Jun 2020 02:57:35 +0000 (04:57 +0200)] 
network: DHCPv6 - Add support to set token on the LAN interface

This patch adds support to set a token on the LAN interface for
the acquired delegated prefixes for the DHCPv6 to generate address.

3 years agoefi: use stub for cache_efi_options_variable if !ENABLE_EFI
Luca Boccassi [Mon, 15 Jun 2020 18:50:56 +0000 (19:50 +0100)] 
efi: use stub for cache_efi_options_variable if !ENABLE_EFI

../src/core/main.c: In function 'main':
../src/core/main.c:2637:32: error: implicit declaration of function 'cache_efi_options_variable'; did you mean 'systemd_efi_options_variable'? [-Werror=implicit-function-declaration]
                         (void) cache_efi_options_variable();
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                systemd_efi_options_variable

3 years agoUSER_RECORD: fix typo
Lennart Poettering [Tue, 16 Jun 2020 14:10:37 +0000 (16:10 +0200)] 
USER_RECORD: fix typo

Fixes: #16172
3 years agotravis: sort dependencies 16196/head
Frantisek Sumsal [Tue, 16 Jun 2020 16:49:37 +0000 (18:49 +0200)] 
travis: sort dependencies

3 years agotravis: drop stuff moved to GH Actions
Frantisek Sumsal [Tue, 16 Jun 2020 16:47:49 +0000 (18:47 +0200)] 
travis: drop stuff moved to GH Actions

3 years agotravis: use a matrix for similar jobs
Frantisek Sumsal [Tue, 16 Jun 2020 16:14:43 +0000 (18:14 +0200)] 
travis: use a matrix for similar jobs

3 years agorepart: if now minimal size is specified, default to 10M 16191/head
Lennart Poettering [Tue, 16 Jun 2020 12:38:44 +0000 (14:38 +0200)] 
repart: if now minimal size is specified, default to 10M

Prompted by this discussion:

https://lists.freedesktop.org/archives/systemd-devel/2020-June/044669.html

3 years agorepart: add simple specifier expansion in Label=
Lennart Poettering [Tue, 16 Jun 2020 09:43:11 +0000 (11:43 +0200)] 
repart: add simple specifier expansion in Label=

Strictly speaking this is a compat breakage, but given the tool was
added only in the last release, let's try to sail under the radar, and
fix this early before anyone notices it wasn't supported always.

3 years agoupdate TODO
Lennart Poettering [Tue, 16 Jun 2020 12:38:23 +0000 (14:38 +0200)] 
update TODO

3 years agoREADME: add reference to systemd.io
Lennart Poettering [Tue, 16 Jun 2020 09:37:06 +0000 (11:37 +0200)] 
README: add reference to systemd.io

3 years agoupdate TODO
Lennart Poettering [Tue, 16 Jun 2020 09:42:16 +0000 (11:42 +0200)] 
update TODO

3 years agohwdb: Mask rfkill event from intel-hid on HP platforms
Kai-Heng Feng [Thu, 11 Jun 2020 13:32:12 +0000 (21:32 +0800)] 
hwdb: Mask rfkill event from intel-hid on HP platforms

HP spec mandates the hp-wireless driver as canonical source of rfkill
event, so mask the rfkill event from intel-hid to avoid double rfkill
events fired from a single hotkey press.

3 years agoman: do not say that systemd-modules-load.service only uses static config 16239/head
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jun 2020 14:28:41 +0000 (16:28 +0200)] 
man: do not say that systemd-modules-load.service only uses static config

Inspired by https://github.com/systemd/zram-generator/issues/26#issuecomment-644097273.

3 years agosd-boot: Work around malformed CR key code
Paul Cercueil [Sun, 14 Jun 2020 10:51:36 +0000 (12:51 +0200)] 
sd-boot: Work around malformed CR key code

When a key is pressed, the EFI firmware gives us a 64-bit word that
contains the modifier key code in the upper 32 bits, the scan code in
the middle 16 bits, and a unicode character in the low 16 bits.

Some bogus EFI firmwares will put the unicode character in the scan code
area, for instance on the EZpad mini 4s tablet.

Others will even put the unicode character in both the scan code and
unicode areas. This is the case for instance on the Teclast X98+ II
tablet.

Add workarounds for these corner cases, only for the carriage return key
right now. Some more workarounds may be needed, e.g. for volume keys,
but I cannot test it.

Partially fixes #8466.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
3 years agohwdb: Add accel orientation quirk for Odys Fusion Win 12 2in1
AndreRH [Sat, 13 Jun 2020 14:48:53 +0000 (16:48 +0200)] 
hwdb: Add accel orientation quirk for Odys Fusion Win 12 2in1

3 years agoMerge pull request #16170 from keszybz/man-user@
Zbigniew Jędrzejewski-Szmek [Sun, 14 Jun 2020 17:55:11 +0000 (19:55 +0200)] 
Merge pull request #16170 from keszybz/man-user@

Better documentation for user@ services

3 years agoman: mention systemd-user-runtime-dir in user@.service too 16170/head
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 15:11:00 +0000 (17:11 +0200)] 
man: mention systemd-user-runtime-dir in user@.service too

_riotingpacifist was complaining on reddit [1] that systemd-user-runtime-dir
is not documented anywhere. So let's add the binary name as page alias.

[1] https://www.reddit.com/r/linux/comments/h086fd/why_linuxs_systemd_is_still_divisive_after_all/ftllr66/

This page should be in section 8, like all .service descriptions.

Also extend the text a bit to make it clearer that systemd --user is the same
executable but running in a different mode (which might be certainly a bit
confusing to users.)

3 years agoefi: Skip parsing SystemdOptions if there's an error getting it.
Filipe Brandenburger [Thu, 11 Jun 2020 22:33:32 +0000 (15:33 -0700)] 
efi: Skip parsing SystemdOptions if there's an error getting it.

The original logic was logging an "ignored" debug message, but it was still
going ahead and calling proc_cmdline_parse_given() on the NULL line. Fix that
to skip that explicitly when the EFI variable wasn't really read.

3 years agonetworkd: Add missing match_wlan_iftype check to network_verify
Daan De Meyer [Fri, 12 Jun 2020 17:31:22 +0000 (19:31 +0200)] 
networkd: Add missing match_wlan_iftype check to network_verify

3 years agoman: Document the crypttab keyfile syntax specifying a device
Vladimir Panteleev [Fri, 12 Jun 2020 10:44:57 +0000 (10:44 +0000)] 
man: Document the crypttab keyfile syntax specifying a device

Feature introduced in 50d2eba27b9bfc77ef6b40e5721713846815418b. Also documented
as part of the kernel parameter syntax in systemd-cryptsetup-generator(8), but
should also be documented here as part of the overall file syntax.

3 years agoMerge pull request #16163 from DaanDeMeyer/resolved-edns-info
Zbigniew Jędrzejewski-Szmek [Sun, 14 Jun 2020 08:45:02 +0000 (10:45 +0200)] 
Merge pull request #16163 from DaanDeMeyer/resolved-edns-info

resolved: Don't complain too much when downgrading from EDNS

3 years agoImprove message for scheduled shutdown or reboot
Tomáš Pospíšek [Sun, 14 Jun 2020 08:43:06 +0000 (10:43 +0200)] 
Improve message for scheduled shutdown or reboot

Depending on if the system has been scheduled for shutdown or for reboot pring the corresponding message (and not only "Shutdown"). Prtinting the "wrong" message when rebooting will mislead and panic people. I get these messages via cron from remote servers and it would be bad if those systems actually *did* shut down, as the email from cron is telling me. Those messages cause an adrenalin spike in our team, which wouldn't happen, if the message was "correct"

Fixes #16129.

3 years agohwdb: generate a hwdb file instead of rules for autosuspend
Lennart Poettering [Tue, 9 Jun 2020 15:00:56 +0000 (17:00 +0200)] 
hwdb: generate a hwdb file instead of rules for autosuspend

3 years agoman: really fix conditional in homed.conf
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 14:45:37 +0000 (16:45 +0200)] 
man: really fix conditional in homed.conf

Followup for f978844eb62e1c47431b388ab90aafdd29f624ec.