]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 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.

4 years agoman: drop obsolete HAVE_PYTHON conditional
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 14:44:58 +0000 (16:44 +0200)] 
man: drop obsolete HAVE_PYTHON conditional

It stopped making sense when automake support was dropped and python started
being required to perform a build.
Follow-up for 72cdb3e783174dcf9223a49f03e3b0e2ca95ddb8.

4 years agoupdate-man-rules: properly filter out directives index again
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 14:29:43 +0000 (16:29 +0200)] 
update-man-rules: properly filter out directives index again

When directives-template.xml was created in 282230882cd0fc49b5377349f2aee22a1c9dd159,
this generator started picking it up. Let's filter it out properly again,
and also simply the filter while at it.

4 years agopager: set PR_DEATHSIG for pager to SIGINT rather than SIGTERM
Lennart Poettering [Tue, 9 Jun 2020 06:59:33 +0000 (08:59 +0200)] 
pager: set PR_DEATHSIG for pager to SIGINT rather than SIGTERM

"less" doesn't properly reset its terminal on SIGTERM, it does so only
on SIGINT. Let's thus configure SIGINT instead of SIGTERM.

I think this is something less should fix too, and clean up things
correctly on SIGTERM, too. However, given that we explicitly enable
SIGINT behaviour by passing "K" to $LESS I figure it makes sense if we
also send SIGINT instead of SIGTERM to match it.

Fixes: #16084
4 years agodocs: point contributors to list of most recent systemd releases
Lennart Poettering [Tue, 9 Jun 2020 07:42:12 +0000 (09:42 +0200)] 
docs: point contributors to list of most recent systemd releases

Fixes: #16083
4 years agoMerge pull request #16111 from poettering/bitlck-fix
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 08:25:36 +0000 (10:25 +0200)] 
Merge pull request #16111 from poettering/bitlck-fix

bitlocker cryptsetup fix

4 years agoMerge pull request #16118 from poettering/inaccessible-fixlets
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 08:23:13 +0000 (10:23 +0200)] 
Merge pull request #16118 from poettering/inaccessible-fixlets

move $XDG_RUNTIME_DIR/inaccessible/ to $XDG_RUNTIME_DIR/systemd/inaccessible

4 years agoMerge pull request #16120 from poettering/udevd-fixlets
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 08:18:36 +0000 (10:18 +0200)] 
Merge pull request #16120 from poettering/udevd-fixlets

minor udev fixlets

4 years agoMerge pull request #16087 from mrc0mmand/travis-build-check
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 07:06:14 +0000 (09:06 +0200)] 
Merge pull request #16087 from mrc0mmand/travis-build-check

travis: check build with various compiler options

4 years agotree-wide: check POLLNVAL everywhere
Lennart Poettering [Tue, 9 Jun 2020 11:40:25 +0000 (13:40 +0200)] 
tree-wide: check POLLNVAL everywhere

poll() sets POLLNVAL inside of the poll structures if an invalid fd is
passed. So far we generally didn't check for that, thus not taking
notice of the error. Given that this specific kind of error is generally
indication of a programming error, and given that our code is embedded
into our projects via NSS or because people link against our library,
let's explicitly check for this and convert it to EBADF.

(I ran into a busy loop because of this missing check when some of my
test code accidentally closed an fd it shouldn't close, so this is a
real thing)

4 years agotree-wide: mark assert()-only variables as unused 16087/head
Frantisek Sumsal [Tue, 9 Jun 2020 19:31:10 +0000 (21:31 +0200)] 
tree-wide: mark assert()-only variables as unused

to make a compilation with -Db_ndebug=true and --werror pass once again.

4 years agotravis: check build with various compiler options
Frantisek Sumsal [Sun, 7 Jun 2020 12:05:20 +0000 (14:05 +0200)] 
travis: check build with various compiler options

In the past we occasionally stumbled upon a build issue which could be
reproduced only with specific optimization level or other compilation
option. Let's try to build the current revision with several most common
compiler options causing such issues to catch them early.

4 years agoMerge pull request #16104 from ssahani/dhcpv6-iaid
Daan De Meyer [Tue, 9 Jun 2020 19:18:28 +0000 (21:18 +0200)] 
Merge pull request #16104 from ssahani/dhcpv6-iaid

networkctl: Display DHCPv6 IAID

4 years agoAppArmor: Support for loading a set of pre-compiled profiles at startup time
YmrDtnJu [Mon, 25 May 2020 08:46:54 +0000 (10:46 +0200)] 
AppArmor: Support for loading a set of pre-compiled profiles at startup time

Let systemd load a set of pre-compiled AppArmor profile files from a policy
cache at /etc/apparmor/earlypolicy. Maintenance of that policy cache must be
done outside of systemd.

After successfully loading the profiles systemd will attempt to change to a
profile named systemd.

If systemd is already confined in a profile, it will not load any profile files
and will not attempt to change it's profile.

If anything goes wrong, systemd will only log failures. It will not fail to
start.

4 years agoMerge pull request #16058 from Werkov/fix-memory-protection-default
Lennart Poettering [Tue, 9 Jun 2020 18:02:53 +0000 (20:02 +0200)] 
Merge pull request #16058 from Werkov/fix-memory-protection-default

Fix memory protection default setting

4 years agoMerge pull request #16046 from bluca/dissect_squashfs_verity
Lennart Poettering [Tue, 9 Jun 2020 17:52:21 +0000 (19:52 +0200)] 
Merge pull request #16046 from bluca/dissect_squashfs_verity

dissect: single-filesystem verity images with external hashdevice

4 years agoman: udevadm: mention non-zero exit code on settle
Yigal Korman [Sun, 7 Jun 2020 18:46:59 +0000 (21:46 +0300)] 
man: udevadm: mention non-zero exit code on settle

'udevadm settle --timeout=XY' will return 1 in case the timeout was
reached and the event queue was not empty.
The manpage should mention it.

4 years agotest-network: wait 2min for the bridge being in configured state
Yu Watanabe [Tue, 9 Jun 2020 09:27:57 +0000 (18:27 +0900)] 
test-network: wait 2min for the bridge being in configured state

On some CIs, it may takes more than 40 seconds.

Hopefully fixes #16105.

4 years agodoc: Try to clarify automount dependency confusion
Chris Down [Tue, 9 Jun 2020 13:43:05 +0000 (14:43 +0100)] 
doc: Try to clarify automount dependency confusion

Arch recently upgraded systemd to 245.6. Shortly afterwards, users began
reporting[0] that systemd detected an ordering cycle, and they were
unable to log in. The reason they were unable to log in was because of
ordering cycle resolution:

    [...]
    systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-journal-catalog-update.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
    [...]

Whether the resolution did the right thing here or not is a longer-term
discussion, but in the interim we should at least make this distinction
between automount dependencies and mount dependencies clearer in the
documentation, so that users and distribution maintainers know what's
acceptable. In this case Arch actually backed out b3d7aef5 entirely and
released a new version due to the confusion.

Also see https://github.com/systemd/systemd-stable/issues/69.

0: https://bugs.archlinux.org/task/66908

4 years agodocs: use bool in varlink interface definition
Michał Bartoszkiewicz [Thu, 28 May 2020 16:02:03 +0000 (18:02 +0200)] 
docs: use bool in varlink interface definition

Boolean type in varlink is named bool, not boolean.

4 years agoinaccessible: move inaccessible file nodes to /systemd/ subdir in runtime dir always 16118/head
Lennart Poettering [Tue, 9 Jun 2020 14:22:24 +0000 (16:22 +0200)] 
inaccessible: move inaccessible file nodes to /systemd/ subdir in runtime dir always

Let's make sure $XDG_RUNTIME_DIR for the user instance and /run for the
system instance is always organized the same way: the "inaccessible"
device nodes should be placed in a subdir of either called "systemd" and
a subdir of that called "inaccessible".

This way we can emphasize the common behaviour, and only differ where
really necessary.

Follow-up for #13823

4 years agologin: use ERRNO_IS_PRIVILEGE() where appropriate
Lennart Poettering [Tue, 9 Jun 2020 14:13:51 +0000 (16:13 +0200)] 
login: use ERRNO_IS_PRIVILEGE() where appropriate

4 years agomkdir: use log_full_errno() where appropriate
Lennart Poettering [Tue, 9 Jun 2020 14:13:16 +0000 (16:13 +0200)] 
mkdir: use log_full_errno() where appropriate

4 years agoudev: set fewer process properties 16120/head
Lennart Poettering [Tue, 9 Jun 2020 13:40:20 +0000 (15:40 +0200)] 
udev: set fewer process properties

On systemd systems we generally don't need to chdir() to root, we don't
need to setup /dev/ ourselves (as PID 1 does that during earliest boot),
and we don't need to set the OOM adjustment values, as that's done via
unit files.

Hence, drop this. if people want to use udev from other init systems
they should do this on their own, I am very sure it's a good thing to do
it from outside of udevd, so that fewer privileges are required by udevd. In
particular the dev_setup() stuff is something that people who build
their own non-systemd distros want to set up themselves anyway, in
particular as they already have to mount devtmpfs themselves anyway.

Note that this only drops stuff that isn't really necessary for testing
stuff, i.e. process properties and settings that don't matter if you
quickly want to invoke udev from a terminal session to test something.

4 years agoudevd: use cpus_in_affinity_mask()
Lennart Poettering [Tue, 9 Jun 2020 13:39:51 +0000 (15:39 +0200)] 
udevd: use cpus_in_affinity_mask()

Let's make use of our own helpers. This has the benefit that we can deal
with arbitrarily sized affinity masks.

4 years agoMerge pull request #16074 from msekletar/freezer-test-flakes
Lennart Poettering [Tue, 9 Jun 2020 12:38:40 +0000 (14:38 +0200)] 
Merge pull request #16074 from msekletar/freezer-test-flakes

Freezer test flakes

4 years agocryptsetup: pass selected mode to crypt_load() when doing LUKS 16111/head
Lennart Poettering [Tue, 9 Jun 2020 12:21:32 +0000 (14:21 +0200)] 
cryptsetup: pass selected mode to crypt_load() when doing LUKS

This doesn't fix anything IRL, but is a bit cleaner, since it makes sure
that arg_type is properly passed to crypt_load() in all cases.

We actually never set arg_type to CRYPT_LUKS2, which is why this wasn't
noticed before, but theoretically this might change one day, and
existing comments suggest it as possible value for arg_type, hence let's
process it properly.

4 years agocryptsetup: try to load bitlocker superblock only if requested
Lennart Poettering [Tue, 9 Jun 2020 12:18:09 +0000 (14:18 +0200)] 
cryptsetup: try to load bitlocker superblock only if requested

let's do automatic discovery only for our native LUKS/LUKS2 headers,
since they are Linux stuff, and let's require that BitLocker to be
requested explicitly.

This makes sure cryptsetup without either "luks" nor "bitlk" in the
option string will work. Right now it would fail because we'd load the
superblock once with luks and once with bitlk and one of them would
necessarily fail.

Follow-up for #15979

4 years agohwbd entry for Dell Inspiron Chromebook 14 2-in-1 sensor (#16109)
Yegor Vialov [Tue, 9 Jun 2020 11:31:58 +0000 (14:31 +0300)] 
hwbd entry for  Dell Inspiron Chromebook 14 2-in-1 sensor (#16109)

4 years agologin: allow individual USB ports to be assigned to seats
Adam Nielsen [Mon, 8 Jun 2020 02:40:47 +0000 (12:40 +1000)] 
login: allow individual USB ports to be assigned to seats

Assigning seats to specific USB ports lets the devices plugged into them
inherit the port's seat assignment.

4 years agodissect: support single-filesystem verity images with external verity hash 16046/head
Luca Boccassi [Fri, 29 May 2020 16:51:20 +0000 (17:51 +0100)] 
dissect: support single-filesystem verity images with external verity hash

dm-verity support in dissect-image at the moment is restricted to GPT
volumes.
If the image a single-filesystem type without a partition table (eg: squashfs)
and a roothash/verity file are passed, set the verity flag and mark as
read-only.

4 years agonetworkctl: DHCPv6 - display IAID 16104/head
Susant Sahani [Tue, 9 Jun 2020 08:50:21 +0000 (10:50 +0200)] 
networkctl: DHCPv6 - display IAID

4 years agosd-network: Introduce API to get DHCPv6 IAID
Susant Sahani [Tue, 9 Jun 2020 08:49:38 +0000 (10:49 +0200)] 
sd-network: Introduce API to get DHCPv6 IAID

4 years agonetwork: DHCPv6 - export IAID to state file
Susant Sahani [Tue, 9 Jun 2020 08:49:08 +0000 (10:49 +0200)] 
network: DHCPv6 - export IAID to state file

4 years agodhcp6: Provide method to access IAID
Susant Sahani [Tue, 9 Jun 2020 08:48:36 +0000 (10:48 +0200)] 
dhcp6: Provide method to access IAID

4 years agoMerge pull request #16080 from YmrDtnJu/9p
Lennart Poettering [Tue, 9 Jun 2020 08:51:20 +0000 (10:51 +0200)] 
Merge pull request #16080 from YmrDtnJu/9p

9p is a network filesystem

4 years agocore: let user define start-/stop-timeout behaviour
Jan Klötzke [Tue, 16 Apr 2019 14:45:20 +0000 (16:45 +0200)] 
core: let user define start-/stop-timeout behaviour

The usual behaviour when a timeout expires is to terminate/kill the
service. This is what user usually want in production systems. To debug
services that fail to start/stop (especially sporadic failures) it
might be necessary to trigger the watchdog machinery and write core
dumps, though. Likewise, it is usually just a waste of time to
gracefully stop a stuck service. Instead it might save time to go
directly into kill mode.

This commit adds two new options to services: TimeoutStartFailureMode=
and TimeoutStopFailureMode=. Both take the same values and tweak the
behavior of systemd when a start/stop timeout expires:

 * 'terminate': is the default behaviour as it has always been,
 * 'abort': triggers the watchdog machinery and will send SIGABRT
   (unless WatchdogSignal was changed) and
 * 'kill' will directly send SIGKILL.

To handle the stop failure mode in stop-post state too a new
final-watchdog state needs to be introduced.

4 years agoMerge pull request #16073 from keszybz/shell-completion
Lennart Poettering [Tue, 9 Jun 2020 07:33:41 +0000 (09:33 +0200)] 
Merge pull request #16073 from keszybz/shell-completion

Bash completion for homectl and help improvement for kernel-install

4 years agoMerge pull request #15953 from keszybz/gdb-script
Lennart Poettering [Tue, 9 Jun 2020 07:31:49 +0000 (09:31 +0200)] 
Merge pull request #15953 from keszybz/gdb-script

Update gdb script to match current sources and other hashmap improvements

4 years agoMerge pull request #16047 from poettering/udev-ro-block
Lennart Poettering [Tue, 9 Jun 2020 07:09:32 +0000 (09:09 +0200)] 
Merge pull request #16047 from poettering/udev-ro-block

udev: optionally mark all block devices popping up read-only by default

4 years agoupdate TODO
Lennart Poettering [Tue, 9 Jun 2020 06:54:41 +0000 (08:54 +0200)] 
update TODO

4 years agoMerge pull request #16085 from ssahani/network-client-id
Yu Watanabe [Tue, 9 Jun 2020 06:30:23 +0000 (15:30 +0900)] 
Merge pull request #16085 from ssahani/network-client-id

networkctl: add support to display DHCPv4 client ID

4 years agoAdd 'bitlk' option to mount Bitlocker drives with cryptsetup.
Maxim Fomin [Sat, 30 May 2020 10:21:44 +0000 (11:21 +0100)] 
Add 'bitlk' option to mount Bitlocker drives with cryptsetup.

4 years agomount-tool: Replace fstype_is_{network,api_vfs} with fstype_is_blockdev_backed 16080/head
YmrDtnJu [Mon, 8 Jun 2020 17:25:18 +0000 (19:25 +0200)] 
mount-tool: Replace fstype_is_{network,api_vfs} with fstype_is_blockdev_backed

Not every filesystem that is not a network filesystem and also not an API VFS
filesystem has a corresponding block device.

4 years agobasic: New function fstype_is_blockdev_backed for fstypes that need a blockdev
YmrDtnJu [Sat, 6 Jun 2020 10:42:01 +0000 (12:42 +0200)] 
basic: New function fstype_is_blockdev_backed for fstypes that need a blockdev

The function returns true if the specified filesystem requires a block device.

4 years agohwdb: add HP Spectre x360's mic mute switch
Niccolò Maggioni [Mon, 8 Jun 2020 10:45:02 +0000 (12:45 +0200)] 
hwdb: add HP Spectre x360's mic mute switch

Tested on HP Spectre x360 Convertible 13-aw0xxx

4 years agoMerge pull request #16092 from yuwata/network-accept-local-16090
Lennart Poettering [Mon, 8 Jun 2020 16:15:03 +0000 (18:15 +0200)] 
Merge pull request #16092 from yuwata/network-accept-local-16090

network: introduce IPv4AcceptLocal= setting

4 years agoman: single-char parameters take no '=' 16047/head
Lennart Poettering [Fri, 5 Jun 2020 13:42:45 +0000 (15:42 +0200)] 
man: single-char parameters take no '='

The suggested syntax is simply not valid and results in an error.

4 years agounits: tweak udev unit descriptions
Lennart Poettering [Tue, 2 Jun 2020 13:36:17 +0000 (15:36 +0200)] 
units: tweak udev unit descriptions

4 years agoudev: optionally mark all block devices read-only as they pop up
Lennart Poettering [Tue, 2 Jun 2020 13:15:24 +0000 (15:15 +0200)] 
udev: optionally mark all block devices read-only as they pop up

4 years agodissect-image: wait for udev for single filesystem images too
Luca Boccassi [Wed, 3 Jun 2020 18:47:39 +0000 (19:47 +0100)] 
dissect-image: wait for udev for single filesystem images too

Single filesystem images are mounted from the /dev/block/X:Y symlink
rather than /dev/loopZ, so we need to wait for udev to create it or
mounting will be racy and occasionally fail.

4 years agonetworkctl: Display DHCP4 client ID 16085/head
Susant Sahani [Mon, 8 Jun 2020 04:40:23 +0000 (06:40 +0200)] 
networkctl: Display DHCP4 client ID

4 years agosd-network: Introduce API to access DHCP4 client ID
Susant Sahani [Mon, 8 Jun 2020 04:39:50 +0000 (06:39 +0200)] 
sd-network: Introduce API to access DHCP4 client ID

4 years agonetwork: DHCP4 client ID save in state file
Susant Sahani [Mon, 8 Jun 2020 04:39:06 +0000 (06:39 +0200)] 
network: DHCP4 client ID save in state file

4 years agotest-network: add test for IPv4AcceptLocal= 16092/head
Yu Watanabe [Mon, 8 Jun 2020 04:51:50 +0000 (13:51 +0900)] 
test-network: add test for IPv4AcceptLocal=

4 years agonetwork: introduce IPv4AcceptLocal= setting
Yu Watanabe [Mon, 8 Jun 2020 04:48:14 +0000 (13:48 +0900)] 
network: introduce IPv4AcceptLocal= setting

Closes #16090.

4 years agohomed help --uid short option
layderv [Sat, 6 Jun 2020 16:01:56 +0000 (12:01 -0400)] 
homed help --uid short option

4 years agotest: avoid failing due to unexpected precision
Frantisek Sumsal [Sat, 6 Jun 2020 10:50:48 +0000 (12:50 +0200)] 
test: avoid failing due to unexpected precision

After today's Arch Linux image update, there seems to be a slight change
in delay reporting which breaks some asserts in
systemd-networkd-tests.py:

Expected:
        limit 100 delay 50.0ms  10.0ms loss 20%
Current:
        limit 100 delay 50ms  10ms loss 20%

4 years agoMerge pull request #16033 from poettering/parse-int-fixlets
Daan De Meyer [Sat, 6 Jun 2020 08:45:35 +0000 (10:45 +0200)] 
Merge pull request #16033 from poettering/parse-int-fixlets

various fixes and tweaks for integer parsing

4 years agoresolve: enable RES_TRUSTAD towards the 127.0.0.53 stub resolver
YmrDtnJu [Fri, 5 Jun 2020 13:36:58 +0000 (15:36 +0200)] 
resolve: enable RES_TRUSTAD towards the 127.0.0.53 stub resolver

glibc 2.31 strips the AD flag, unless either the application specifies
RES_TRUSTAD or the options in resolv.conf contain trust-ad.

See https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD

4 years agolldp: fix assertion checking argument for sd_lldp_set_neighbors_max()
Thomas Haller [Fri, 5 Jun 2020 17:48:13 +0000 (19:48 +0200)] 
lldp: fix assertion checking argument for sd_lldp_set_neighbors_max()

Fixes: 34437b4f9c9c ('sd-lldp: rework sd-lldp API')
4 years agoman: fix typo Takse -> Takes
Susant Sahani [Sat, 6 Jun 2020 07:05:34 +0000 (09:05 +0200)] 
man: fix typo Takse -> Takes

4 years agoshell-completion: add homectl for bash 16073/head
Zbigniew Jędrzejewski-Szmek [Fri, 5 Jun 2020 14:30:22 +0000 (16:30 +0200)] 
shell-completion: add homectl for bash

The difference between verbs that take one user and multiple users is not
handled. I don't know how to do this.

4 years agokernel-install: extend --help
Zbigniew Jędrzejewski-Szmek [Thu, 4 Jun 2020 11:17:22 +0000 (13:17 +0200)] 
kernel-install: extend --help

4 years agoMerge pull request #15378 from msekletar/udev-kill-signal
Zbigniew Jędrzejewski-Szmek [Fri, 5 Jun 2020 14:33:14 +0000 (16:33 +0200)] 
Merge pull request #15378 from msekletar/udev-kill-signal

udev:  make signal that we use to kill workers on timeout configurable

4 years agocore: fix the return value in order to make sure we don't dipatch method return too... 16074/head
Michal Sekletár [Fri, 5 Jun 2020 13:23:12 +0000 (15:23 +0200)] 
core: fix the return value in order to make sure we don't dipatch method return too early

Actually, it is the same kind of problem as in d910f4c . Basically, we
need to return 1 on success code path in slice_freezer_action().
Otherwise we dispatch DBus return message too soon.

Fixes: #16050
4 years agotests: sleep a bit and give kernel time to perform the action after manual freeze...
Michal Sekletár [Fri, 5 Jun 2020 09:35:01 +0000 (11:35 +0200)] 
tests: sleep a bit and give kernel time to perform the action after manual freeze/thaw

Fixes: #16050
4 years agotest: add test for parse_uid_range() 16033/head
Lennart Poettering [Fri, 5 Jun 2020 13:56:11 +0000 (15:56 +0200)] 
test: add test for parse_uid_range()

4 years agotests: beef up integer parsing tests
Lennart Poettering [Mon, 1 Jun 2020 15:48:41 +0000 (17:48 +0200)] 
tests: beef up integer parsing tests

4 years agoparse-util: also parse integers prefixed with 0b and 0o
Lennart Poettering [Mon, 1 Jun 2020 15:31:51 +0000 (17:31 +0200)] 
parse-util: also parse integers prefixed with 0b and 0o

Let's adopt Python 3 style 0b and 0x syntaxes, because it makes a ton of
sense, in particular in bitmask settings.

4 years agoparse-util: rewrite parse_uid_range() on top of parse_uid()
Lennart Poettering [Mon, 1 Jun 2020 15:17:40 +0000 (17:17 +0200)] 
parse-util: rewrite parse_uid_range() on top of parse_uid()

parse_uid() does so many safety checks we want, hence rewrite
parse_uid_range() on top of parse_uid() instead of parse_range().

4 years agouser-util: be stricter in parse_uid()
Lennart Poettering [Mon, 1 Jun 2020 15:16:46 +0000 (17:16 +0200)] 
user-util: be stricter in parse_uid()

Let's refuse "+" and "-" prefixed UIDs. Let's refuse whitespace-prefixed
UIDS, Let's refuse zero-prefixed UIDs. Let's be safe than sorry.

4 years agoparse-util: rewrite parse_mode() on top of safe_atou_full()
Lennart Poettering [Mon, 1 Jun 2020 15:16:04 +0000 (17:16 +0200)] 
parse-util: rewrite parse_mode() on top of safe_atou_full()

Parsing is hard, hence let's use our own careful wrappers wherever
possible.

4 years agoparse-util: make return parameter optional in safe_atou16_full()
Lennart Poettering [Mon, 1 Jun 2020 15:10:27 +0000 (17:10 +0200)] 
parse-util: make return parameter optional in safe_atou16_full()

All other safe_atoXYZ_full() functions have the parameter optional,
let's make it optoinal here, too.

4 years agoparse-util: allow '-0' as alternative to '0' and '+0'
Lennart Poettering [Mon, 1 Jun 2020 15:08:38 +0000 (17:08 +0200)] 
parse-util: allow '-0' as alternative to '0' and '+0'

Let's allow "-0" as alternative to "+0" and "0" when parsing integers,
unless the new SAFE_ATO_REFUSE_PLUS_MINUS flag is specified.

In cases where allowing the +/- syntax shall not be allowed
SAFE_ATO_REFUSE_PLUS_MINUS is the right flag to use, but this also means
that -0 as only negative integer that fits into an unsigned value should
be acceptable if the flag is not specified.

4 years agoparse-util: allow tweaking how to parse integers
Lennart Poettering [Mon, 1 Jun 2020 15:06:19 +0000 (17:06 +0200)] 
parse-util: allow tweaking how to parse integers

This allows disabling a few alternative ways to decode integers
formatted as strings, for safety reasons.

See: #15991

4 years agotest: add integration test for udev event timeout 15378/head
Michal Sekletár [Thu, 30 Apr 2020 21:22:08 +0000 (23:22 +0200)] 
test: add integration test for udev event timeout

Note that run_test() calls coredumpctl in a loop because in certain
environments (1 vCPU unaccelerated QEMU VM) it might take quite a
while to process the coredump.

4 years agoudev: make signal that we use to kill workers on timeout configurable
Michal Sekletár [Thu, 9 Apr 2020 09:14:25 +0000 (11:14 +0200)] 
udev: make signal that we use to kill workers on timeout configurable

4 years agoMerge pull request #15466 from elmarco/dhcp-leases
Zbigniew Jędrzejewski-Szmek [Fri, 5 Jun 2020 06:47:35 +0000 (08:47 +0200)] 
Merge pull request #15466 from elmarco/dhcp-leases

networkctl: print DHCP leases

4 years agoturn off fuzzit
Evgeny Vereshchagin [Thu, 4 Jun 2020 14:02:23 +0000 (16:02 +0200)] 
turn off fuzzit

It seems it went down yesterday and it's not clear how long it will
take to bring it back.

4 years agonetworkctl: print DHCP leases 15466/head
Marc-André Lureau [Fri, 22 May 2020 10:01:35 +0000 (12:01 +0200)] 
networkctl: print DHCP leases

4 years agonetworkctl: factor out link_get_property()
Marc-André Lureau [Fri, 22 May 2020 09:59:31 +0000 (11:59 +0200)] 
networkctl: factor out link_get_property()

The next patch is going to reuse it.

4 years agosd-dhcp-client: add sd_dhcp_client_id_to_string()
Marc-André Lureau [Fri, 22 May 2020 09:30:49 +0000 (11:30 +0200)] 
sd-dhcp-client: add sd_dhcp_client_id_to_string()

Add a human-friendly pretty-printer for client ID.

4 years agomacro.h: add sizeof_field() helper
Marc-André Lureau [Sun, 17 May 2020 13:25:14 +0000 (15:25 +0200)] 
macro.h: add sizeof_field() helper

Similar to kernel FIELD_SIZE()

4 years agosd-dhcp-client: make struct sd_dhcp_client_id reusable
Marc-André Lureau [Fri, 22 May 2020 09:27:49 +0000 (11:27 +0200)] 
sd-dhcp-client: make struct sd_dhcp_client_id reusable

4 years agonetworkd: expose DHCPServer interface on links
Marc-André Lureau [Fri, 22 May 2020 09:56:59 +0000 (11:56 +0200)] 
networkd: expose DHCPServer interface on links

4 years agonetworkd: start a DBus interface for the DHCP server
Marc-André Lureau [Fri, 22 May 2020 09:49:16 +0000 (11:49 +0200)] 
networkd: start a DBus interface for the DHCP server

Add a "org.freedesktop.network1.DHCPServer" DBus interface that will be
added on a link path where a DHCP server is provided.

Currently, it only exposes a "Leases" property, although there are plans
to expand it further. The property is updated thanks to the
dhcp_server_callback().

4 years agosd-dhcp-server: notify callback on lease changed
Marc-André Lureau [Fri, 22 May 2020 09:37:14 +0000 (11:37 +0200)] 
sd-dhcp-server: notify callback on lease changed

4 years agosd-dhcp-server: add sd_dhcp_server_set_callback()
Marc-André Lureau [Fri, 22 May 2020 09:33:36 +0000 (11:33 +0200)] 
sd-dhcp-server: add sd_dhcp_server_set_callback()

4 years agonetwork: make link become configured state when at least one dynamic protocol provide...
Yu Watanabe [Wed, 3 Jun 2020 08:07:16 +0000 (17:07 +0900)] 
network: make link become configured state when at least one dynamic protocol provide an address

Before this, to speed up the system boot with IPv4 only network,
we need to specify `IPv6AcceptRA=no`, as it is enabled by default.

Closes #15469.

4 years agochange fs/file-max to LONG_MAX instead of ULONG_MAX
Einsler Lee [Thu, 4 Jun 2020 07:28:51 +0000 (15:28 +0800)] 
change fs/file-max to LONG_MAX instead of ULONG_MAX

Since this has been changed in: https://github.com/systemd/systemd/commit/6e2f78948403a4cce45b9e34311c9577c624f066, the change should be synchronized.

4 years agoMerge pull request #16057 from keszybz/resolvectl-sorted-no-nta
Yu Watanabe [Thu, 4 Jun 2020 02:30:14 +0000 (11:30 +0900)] 
Merge pull request #16057 from keszybz/resolvectl-sorted-no-nta

Drop NTA lists from resolvectl status and sort output by link number

4 years agoMerge pull request #15171 from ssahani/tc-qfq
Yu Watanabe [Thu, 4 Jun 2020 02:17:42 +0000 (11:17 +0900)] 
Merge pull request #15171 from ssahani/tc-qfq

network: TC- Introduce Quick Fair Queueing (QFQ)

4 years agoMerge pull request #16056 from keszybz/minor-doc-updates
Lennart Poettering [Wed, 3 Jun 2020 17:00:04 +0000 (19:00 +0200)] 
Merge pull request #16056 from keszybz/minor-doc-updates

Minor doc updates

4 years agoseccomp: filter openat2() entirely in seccomp_restrict_sxid()
Lennart Poettering [Tue, 2 Jun 2020 08:40:25 +0000 (10:40 +0200)] 
seccomp: filter openat2() entirely in seccomp_restrict_sxid()

4 years agocore: remove support for ".include" stanza
Lennart Poettering [Tue, 2 Jun 2020 10:06:22 +0000 (12:06 +0200)] 
core: remove support for ".include" stanza

Six years ago we declared it obsolete and removed it from the docs
(c073a0c4a5ffbf6677dd6af02e7c7d59b2b901ab) and added a note about it in
NEWS. Two years ago we add warning messages about it, indicating the
feature will be removed (41b283d0f1f4abd85d0bbeeb7f71bb30f87cfab9) and
mentioned it in NEWS again.

Let's now kill it for good.

4 years agonetwork: read driver name from ethtool
Yu Watanabe [Wed, 3 Jun 2020 07:19:29 +0000 (16:19 +0900)] 
network: read driver name from ethtool

To make Driver= in [Match] section work in containers.

Note that ID_NET_DRIVER= property in udev database is set with the
result of the ethtool. So, this should not change anything for
non-container cases.

Closes #15678.

4 years agobasic/sort-util: adorn qsort_safe with a prefix underscore 16057/head
Zbigniew Jędrzejewski-Szmek [Tue, 2 Jun 2020 15:54:49 +0000 (17:54 +0200)] 
basic/sort-util: adorn qsort_safe with a prefix underscore

It should not be used directly since we have typesafe_qsort(), so
let's mark it appropriately.

4 years agopstore: use typesafe_qsort
Zbigniew Jędrzejewski-Szmek [Tue, 2 Jun 2020 15:53:14 +0000 (17:53 +0200)] 
pstore: use typesafe_qsort

Also move "allocated" above "n", since, conceptually, it is modified
earlier (and that is the definition order we normally use).

4 years agoresolvect: sort status output by link number
Zbigniew Jędrzejewski-Szmek [Tue, 2 Jun 2020 15:49:22 +0000 (17:49 +0200)] 
resolvect: sort status output by link number

This makes the output more predictable. Also, interesting interfaces
are often the low-numbered ones (actual hardware links, not virtual
devices stacked on top), and this makes them more visible.