Commit Graph

45900 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 02b0109af5
Merge pull request #15955 from anitazha/nullorempty
core: check null_or_empty_path for masked units instead of /dev/null
2020-07-08 22:18:17 +02:00
Dan Streetman 4e3376d43a test-network: don't print networkctl output for passing subtests
This just clutters up the logs.
2020-07-08 16:13:14 -04:00
Zbigniew Jędrzejewski-Szmek 62320feb9f
Merge pull request #16404 from keszybz/release-246-prep
Prepare v246-rc1
2020-07-08 22:10:44 +02:00
Frantisek Sumsal 2e7090e94d test: bump the TEST-47 sleeps once again
Several recent failed runs show that the test is still racy in two ways:

1) Sometimes it takes a while before the PID file is created, leading
   to:

```
[   10.950540] testsuite-47.sh[308]: ++ cat /leakedtestpid
[   10.959712] testsuite-47.sh[308]: cat: /leakedtestpid: No such file or directory
[   10.959824] testsuite-47.sh[298]: + leaked_pid=
```

2) Again, sometimes we check the leaked PID before the unit is actually
   stopped, leading to a false negative:

```
[   18.099599] testsuite-47.sh[346]: ++ cat /leakedtestpid
[   18.116462] testsuite-47.sh[333]: + leaked_pid=342
[   18.117101] testsuite-47.sh[333]: + systemctl stop testsuite-47-repro
...
[   20.033907] testsuite-47.sh[333]: + ps -p 342
[   20.080050] testsuite-47.sh[351]:     PID TTY          TIME CMD
[   20.080050] testsuite-47.sh[351]:     342 ?        00:00:00 sleep
[   20.082040] testsuite-47.sh[333]: + exit 42
```
2020-07-08 22:09:55 +02:00
Alvin Šipraga 0d0de133f0 network: add support for MACVLAN source mode
Add support for creating a MACVLAN interface in "source" mode by
specifying Mode=source in the [MACVLAN] section of a .netdev file.

A list of allowed MAC addresses for the corresponding MACVLAN can also
be specified with the SourceMACAddress= option of the [MACVLAN] section.

An example .netdev file:

    [NetDev]
    Name=macvlan0
    Kind=macvlan
    MACAddress=02:DE:AD:BE:EF:00

    [MACVLAN]
    Mode=source
    SourceMACAddress=02:AB:AB:AB:AB:01 02:CD:CD:CD:CD:01
    SourceMACAddress=02:EF:EF:EF:EF:01

The same keys can also be specified in [MACVTAP] for MACVTAP kinds of
interfaces, with the same semantics.
2020-07-08 18:01:52 +02:00
Zbigniew Jędrzejewski-Szmek 3994922baf meson: bump version numbers for v246 2020-07-08 17:35:54 +02:00
Zbigniew Jędrzejewski-Szmek 72e5190878 NEWS: update contributors list for v246-rc 2020-07-08 17:33:46 +02:00
Zbigniew Jędrzejewski-Szmek 9c70fc2164 git-contrib: simplify implementation a bit 2020-07-08 17:31:43 +02:00
Zbigniew Jędrzejewski-Szmek cbc056c819 core: wrap some long lines and other formatting changes 2020-07-08 16:37:23 +02:00
Lennart Poettering 24e2494407
Merge pull request #16385 from JackFangXN/master
table add table_log_xx_error()
2020-07-08 12:12:29 +02:00
Yu Watanabe 43b24a0716 sd-device: use log_device_debug_errno() 2020-07-08 12:11:19 +02:00
fangxiuning 4b6607d949 table use table_log_print_error() instead of table_log_show_error 2020-07-08 15:16:52 +08:00
fangxiuning df83eb546b table add table_log_sort_error() 2020-07-08 10:53:57 +08:00
fangxiuning d836018a73 table add table_log_show_error() 2020-07-08 10:50:59 +08:00
Yu Watanabe c253a95bca
Merge pull request #16379 from yuwata/network-dhcp6-delegated-prefix-address-handler
network: fix assertion in assigning dhcp6 delegated prefix
2020-07-08 10:22:08 +09:00
Lukas Nykryn 21d19a7a13 docs: update information where to file bugs against RHEL/CentOS versions of systemd 2020-07-07 23:12:51 +02:00
Zbigniew Jędrzejewski-Szmek 2e2f6a01a0
Merge pull request #16143 from fbuihuu/fstab-generator-fix
fstab-generator: make sure explicit deps configured via mount options apply to .mount, not .automount unit
2020-07-07 20:06:18 +02:00
Alan Perry 5dc60faae5 add error message when bind mount src missing 2020-07-07 20:04:19 +02:00
Yu Watanabe 3650173fec network: make address_handler() static 2020-07-07 19:48:38 +02:00
Yu Watanabe a211ff4b84 network: introduce own address handler for dhcp6 delegated prefix
Fixes #16365.
2020-07-07 19:48:26 +02:00
Zbigniew Jędrzejewski-Szmek 2b0bf3ccf8
Merge pull request #16301 from poettering/firstboot-image
Add --image= switch to firstboot, similar to --root= but with support for operating on disk image
2020-07-07 19:44:12 +02:00
Zbigniew Jędrzejewski-Szmek 9870cfdf7f
Merge pull request #16388 from keszybz/xdg-desktop-fuzz-case
xdg-desktop fuzz case
2020-07-07 19:41:31 +02:00
Zbigniew Jędrzejewski-Szmek 60e3a5a252
Merge pull request #16390 from keszybz/coverity-and-typos
One coverity-inspired fix and spelling
2020-07-07 19:40:10 +02:00
Zbigniew Jędrzejewski-Szmek dea7f5cc87 xdg-autostart: ignore all empty entries in multi-string entries
The desktop file specification allows entries like ";;;;;;", full of empty strings.
But looking at the actual list of supported keys [1], empty entries are meaningless
(unless we would allow e.g. the desktop name to be the empty string. But that doesn't
seem very useful either). So let's just simplify our life and skip any empty substrings
entirely.

This would also resolve the fuzzer case:
$ valgrind build/fuzz-xdg-desktop test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812
test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812... ok
==2899241== HEAP SUMMARY:
==2899241==     in use at exit: 0 bytes in 0 blocks
==2899241==   total heap usage: 484,385 allocs, 484,385 frees, 12,411,330 bytes allocated
↓
==2899650== HEAP SUMMARY:
==2899650==     in use at exit: 0 bytes in 0 blocks
==2899650==   total heap usage: 1,325 allocs, 1,325 frees, 1,463,602 bytes allocated
2020-07-07 14:02:16 +02:00
Topi Miettinen f4e1a42592 man: match parentheses
Files found with:
for f in *; do \
    l=`tr -d '[^(]' < $f | wc -c`; \
    r=`tr -d '[^)]' < $f | wc -c`; \
    if [ $l -ne $r ]; then \
       echo $f $l $r; \
    fi; \
done
2020-07-07 13:31:39 +02:00
Zbigniew Jędrzejewski-Szmek d1ca1f7c2a xdg-autostart: avoid quadratic behaviour in strv parsing
The fuzzer test case has a giant line with ";;;;;;;;;;;..." which is turned into
a strv of empty strings. Unfortunately, when pushing each string, strv_push() needs
to walk the whole array, which leads to quadratic behaviour. So let's use
greedy_allocation here and also keep location in the string to avoid iterating.

build/fuzz-xdg-desktop test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812  51.10s user 0.01s system 99% cpu 51.295 total
↓
build/fuzz-xdg-desktop test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812  0.07s user 0.01s system 96% cpu 0.083 total

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22812.

Other minor changes:
- say "was already defined" instead of "defined multiple times" to make it
  clear that we're ignoring this second definition, and not all definitions
  of the key
- unescaping needs to be done also for the last entry
2020-07-07 12:20:43 +02:00
Zbigniew Jędrzejewski-Szmek a53f024d71 journald: minor wording tweak in message
For a user "from the kernel" might be rather unclear.
2020-07-07 12:14:41 +02:00
Zbigniew Jędrzejewski-Szmek cd990847b9 tree-wide: more repeated words 2020-07-07 12:08:22 +02:00
Zbigniew Jędrzejewski-Szmek 0da425df65 networkd: use capitalized "IP" and "TOS" in messages 2020-07-07 12:06:26 +02:00
Zbigniew Jędrzejewski-Szmek 8ab0f03266 journal/compress: drop "future" code in zstd compression
We generally don't include stuff that is not used. This can be
easily ressurected if ever needed.

Fixes CID#1430210.
2020-07-07 12:06:26 +02:00
Yuri Chornoivan d7b34e3841 all: fix minor typos
[thaller@redhat.com: original patch by Yuri, extracted from [1]]

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/565
2020-07-07 18:52:49 +09:00
Lennart Poettering 5d043c9fdf update NEWS 2020-07-07 11:48:45 +02:00
Lennart Poettering cbe952fe1f update TODO 2020-07-07 11:33:44 +02:00
Lennart Poettering 737ec51444 TODO 2020-07-07 11:20:42 +02:00
Lennart Poettering a122502077 firstboot: add option to turn off welcome text display 2020-07-07 11:20:42 +02:00
Lennart Poettering dcfdd62184 man: document the new --image= switch of systemd-firstboot 2020-07-07 11:20:42 +02:00
Lennart Poettering 3ff9fa591e firstboot: add --image= switch
This is like --root=, but takes an image file path or device node path
and dissects the image directly, mounting it internally.
2020-07-07 11:20:42 +02:00
Lennart Poettering 827ea52125 mount-util: use UMOUNT_NOFOLLOW in recursive umounter
When we only want to unmount mount points below some path then it is
against our interest to follow symlinks. Hence don't.
2020-07-07 11:20:42 +02:00
Lennart Poettering e49ee28522 mount-util: add destructor helper that umounts + rmdirs a path 2020-07-07 11:20:42 +02:00
Lennart Poettering e2ec9c4d3a namespace-util: introduce helper for combining unshare() + MS_SLAVE remount
We have multiple places we do these two non-trivial operations together,
let's introduce a unified helper for doing both at once.
2020-07-07 11:20:42 +02:00
Zbigniew Jędrzejewski-Szmek 9ecf5d9340 fuzz: add test case that should already be resolved 2020-07-07 10:26:28 +02:00
Luca Boccassi cda667722c core: refresh unit cache when building a transaction if UNIT_NOT_FOUND
When a command asks to load a unit directly and it is in state
UNIT_NOT_FOUND, and the cache is outdated, we refresh it and
attempto to load again.
Use the same logic when building up a transaction and a dependency in
UNIT_NOT_FOUND state is encountered.
Update the unit test to exercise this code path.
2020-07-07 10:09:24 +02:00
Zbigniew Jędrzejewski-Szmek 3f2e15abc5 sleep: one spelling unification
We use "writable" everywhere else.
2020-07-07 10:02:02 +02:00
Zbigniew Jędrzejewski-Szmek 77ecc1aaa5
Merge pull request #16380 from yuwata/network-dhcp6-update-prefix-route
Network: update acquired dhcp6 prefix routes
2020-07-07 09:05:08 +02:00
Zbigniew Jędrzejewski-Szmek 9389a271b7
Merge pull request #16381 from yuwata/dhcp4-renewing
dhcp4: fixes around renewing address
2020-07-07 08:59:35 +02:00
Zbigniew Jędrzejewski-Szmek a240147bdc
Merge pull request #16383 from yuwata/network-dhcp6-radv-update-prefix
network: do not restart radv engine when adding prefix
2020-07-07 08:53:31 +02:00
satmandu 7f6e342c93
hwdb: Add Google Pixel Slate (nocturne) (#16377) 2020-07-07 08:45:31 +02:00
Yu Watanabe 58e6c62191 network: fix memleak
If init() is failed, the allocated memory was leaked.
2020-07-07 08:23:17 +02:00
Yu Watanabe 1d596fdec2 network: do not restart radv engine when adding prefix
Replaces d469cea3bd.
2020-07-07 11:20:35 +09:00
Yu Watanabe 8fc2a5dff4 network: fix indentation 2020-07-07 11:18:28 +09:00