Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 17:28:53 +0000 (19:28 +0200)]
core: minor simplification
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 16:55:23 +0000 (18:55 +0200)]
userwork: remove trailing comma in message
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 14:07:30 +0000 (16:07 +0200)]
core: add forgotten return in error path
If we get an error here, this is most likely oom, and we should not continue.
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 13:06:53 +0000 (15:06 +0200)]
core: update comment about sysv compat
We don't want people to consider that part deprecated.
Follow-up for
6589a56972.
Lennart Poettering [Tue, 26 May 2020 16:29:06 +0000 (18:29 +0200)]
Merge pull request #15920 from keszybz/userwork-proc-title
Avoid log noise when setting proc titles and some doc updates
Lennart Poettering [Tue, 26 May 2020 13:38:14 +0000 (15:38 +0200)]
Merge pull request #15906 from keszybz/busctl-stdout-stderr
Make busctl stdout/stderr split consistent
Lennart Poettering [Tue, 26 May 2020 13:37:57 +0000 (15:37 +0200)]
Merge pull request #15909 from keszybz/sd-network-serialization
networkd link serialization fix
Andreas Rammhold [Tue, 26 May 2020 11:06:42 +0000 (13:06 +0200)]
editorconfig: add man configuration
My VIM usually defaults to tabs (8ch) on these XML files. With this
change it behaves as defined in the coding style documentation.
Norbert Lange [Tue, 28 Apr 2020 21:11:55 +0000 (23:11 +0200)]
dont install systemd-initctl, runlevel, telinit if no SYSV compat
systemd-initctl executable is still built.
Evgeny Vereshchagin [Tue, 26 May 2020 12:11:16 +0000 (15:11 +0300)]
Merge pull request #15914 from poettering/ubsan-float-check
json: disable ubsan float checking
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 09:13:06 +0000 (11:13 +0200)]
man: reword description of IPAddressDeny/Allow a bit
Zbigniew Jędrzejewski-Szmek [Fri, 22 May 2020 07:39:36 +0000 (09:39 +0200)]
tree-wide: s/time-out/timeout/g
See
3f9a0a522f2029e9295ea5e9984259022be88413 for justification.
Zbigniew Jędrzejewski-Szmek [Fri, 22 May 2020 07:38:00 +0000 (09:38 +0200)]
userwork: fix typos in comment
Zbigniew Jędrzejewski-Szmek [Fri, 22 May 2020 07:23:31 +0000 (09:23 +0200)]
basic/process-util: only try PR_SET_MM once
userwork wants to update the title many times, and a strace is full of
attempts that fail the same way:
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid() = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce32901d, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] accept4(3, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid() = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce329020, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid() = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce32901d, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] accept4(3, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid() = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce329020, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid() = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce32901d, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
[pid 21765] accept4(3, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
[pid 21765] prctl(PR_SET_NAME, "systemd-userwor"...) = 0
[pid 21765] geteuid() = 0
[pid 21765] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fedce329000
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fedce329000, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fedce329020, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21765] munmap(0x7fedce329000, 4096) = 0
If we get a permission error, don't try again.
Zbigniew Jędrzejewski-Szmek [Fri, 22 May 2020 07:00:49 +0000 (09:00 +0200)]
basic/process-util: create helper function
No functional change.
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 12:05:40 +0000 (14:05 +0200)]
man: beef up $MAINPID examples
Inspired by https://github.com/systemd/systemd/pull/15400#discussion_r428537955.
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 08:19:31 +0000 (10:19 +0200)]
network: simplify how initial space is handled
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 20:02:47 +0000 (22:02 +0200)]
networkd: unfoobar serialization of links
We'd start writing an entry line, then another one, then another one,
and then output the rest of the first one, and then some other random
stuff, and the rest of some other lines... Results were ...eh... random.
Let's define a helper to avoid some of the copy&paste madness, and separate
blocks that output a single line with /**********************************/.
This rework doesn't change what data is written, it only tries to fix the
format of the output. The fact that some entries only write data from
link->network, and some from either link->network or link, some stuff only
for dhpc4 leases while some for both dhpc4 and dhcp6, etc, looks rather
suspicious too, but I didn't touch this.
Lennart Poettering [Tue, 26 May 2020 08:02:29 +0000 (10:02 +0200)]
Merge pull request #15840 from Werkov/mkosi-opensuse
mkosi: openSUSE updates
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 19:51:39 +0000 (21:51 +0200)]
sd-dhcp6: constify output arguments in get_{ntp,nds}_addr
This matches what we do for ipv4 and is in general better.
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 17:18:39 +0000 (19:18 +0200)]
sd-network: reduce scope of some variables
Lennart Poettering [Tue, 26 May 2020 07:32:22 +0000 (09:32 +0200)]
Merge pull request #15862 from hunger/master
repart: Add Uuid option to config files
Lennart Poettering [Tue, 26 May 2020 07:21:40 +0000 (09:21 +0200)]
update TODO
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 07:13:39 +0000 (09:13 +0200)]
busctl: drop unneeded param
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 11:47:53 +0000 (13:47 +0200)]
busctl: verify args early and always print results to stdout
We would print the error sometimes to stdout and sometimes to stderr. It *is*
useful to get the message if one of the names is not found on the bus to
stdout, so that this shows out in the pager. So let's do verification of args
early to catch invalid arguments, and then if we receive an error over the bus
(most likely that the name is not activatable), let's print to stdout so it
gets paged. E.g. 'busctl tree org.freedesktop.systemd1 org.freedesktop.systemd2'
gives a nicely usable output.
Evgeny Vereshchagin [Mon, 25 May 2020 11:38:36 +0000 (13:38 +0200)]
add a test triggering https://github.com/systemd/systemd/issues/15907
Lennart Poettering [Mon, 25 May 2020 16:21:08 +0000 (18:21 +0200)]
json: turn off ubsan for json_variant_has_type()
Fixes: #15907
Lennart Poettering [Mon, 25 May 2020 16:20:52 +0000 (18:20 +0200)]
macro: introduce DISABLE_WARNING_TYPE_LIMITS and make use of it everywhere
Lennart Poettering [Mon, 25 May 2020 16:16:33 +0000 (18:16 +0200)]
tree-wide: use DISABLE_WARNING_FORMAT_NONLITERAL where appropriate
Lennart Poettering [Mon, 25 May 2020 16:08:21 +0000 (18:08 +0200)]
json: use our regular way to turn off compiler warnings
Lennart Poettering [Mon, 25 May 2020 15:32:00 +0000 (17:32 +0200)]
Merge pull request #15167 from ssahani/address-gen-mode
networkctl: Add a range to address genmode
Lennart Poettering [Mon, 25 May 2020 15:31:00 +0000 (17:31 +0200)]
Merge pull request #15872 from keszybz/networkd-types
Type and parsing fixes for networkd
Tobias Hunger [Wed, 20 May 2020 15:28:55 +0000 (17:28 +0200)]
Repart: Add simple tests for Label="" and UUID=""
Make sure Labels and UUIDs taken from destination definitions are
taken into account when no Label/UUID is currently set already.
Tobias Hunger [Wed, 20 May 2020 08:44:33 +0000 (10:44 +0200)]
repart: Add UUID option to config files
Add a option to provide a UUID for the partition that will get
created and document that.
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 06:36:01 +0000 (08:36 +0200)]
network: allow empty assignment to PreferredLifetime=
Users might want to use that to unset a previous setting. The docs seem OK as
they are: we don't need to explictly mention the empty value, since it is
almost always allowed.
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 06:17:45 +0000 (08:17 +0200)]
network: use consistent type when parsing lifetimes
Those fields are both uint32_t, so we should use the same type when parsing.
Having a different type didn't change the result, but let's be consistent.
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 17:06:12 +0000 (19:06 +0200)]
sd-network: fix inverted error message
We get -ENOMSG when there is no lease.
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 11:04:24 +0000 (13:04 +0200)]
sd-bus: internalize setting of bus is_system/is_user
Each of bus_set_address_{user,system} had two users, and each of the two users
would set the internal flag manually. We should do that internally in the
functions instead.
While at it, only set the flag when setting the address is actually successful.
This doesn't change anything for current users, but it seems more correct.
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 12:13:24 +0000 (14:13 +0200)]
man: add docs for the new functions
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 11:39:25 +0000 (13:39 +0200)]
tree-wide: use public sd-bus functions in more places
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 10:51:51 +0000 (12:51 +0200)]
sd-bus: make name validation functions public
Those are fairly trivial to reimplement, but any non-trivial user of sd-bus
is likely to need them. So let's expose them to save everyone the trouble.
I'm keeping the internal functions and making the public ones thin wrappers,
because for the internal uses we don't need the additional asserts, and also we
can't expose _pure_ annotation easily, and dropping it would likely make the
compiled code a bit less efficient.
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 10:30:55 +0000 (12:30 +0200)]
busctl: use set_put_strdup()
Frantisek Sumsal [Sun, 24 May 2020 21:00:13 +0000 (23:00 +0200)]
tree-wide: codespell fixes
Another batch of codespell fixes as reported by Fossies.org
Dana Olson [Thu, 21 May 2020 20:41:25 +0000 (16:41 -0400)]
ACCEL_MOUNT_MATRIX for additional Acer Spin model
This fixes the broken rotation on the Acer Spin 1 I recently bought (exact model is SP111-34N-P4BZ).
It is possible that all of the SP111 models would use the same matrix, but to be on the safe side, I added a new entry.
Topi Miettinen [Sat, 23 May 2020 14:00:41 +0000 (17:00 +0300)]
login: limit nr_inodes for /run/user/$UID
Limit number of inodes for tmpfs mounts on /run/user/$UID. Default is
RuntimeDirectorySize= divided by 4096.
Tudor Roman [Sun, 24 May 2020 10:25:13 +0000 (13:25 +0300)]
home: respect user record mount flags
Peter Hutterer [Thu, 21 May 2020 07:33:13 +0000 (17:33 +1000)]
hwdb: remove support for MOUSE_WHEEL_TILT_*
This has now been deprecated in libinput, the only known user of this
property. It was never set for any device and weston and mutter, maybe
other compositors, never added the code required to parse it.
The benefit we could get in the UI from handling tilt differently to
wheel is tiny and the lack of support shows that it isn't of interest to
anyone. Let's remove this.
See also
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/444
Evgeny Vereshchagin [Sat, 23 May 2020 16:21:44 +0000 (19:21 +0300)]
Merge pull request #15886 from mrc0mmand/travis-enable-fuzz-tests
travis: enable fuzzer regression tests under sanitizers
Frantisek Sumsal [Fri, 22 May 2020 12:28:17 +0000 (14:28 +0200)]
meson: pass the optimization level to the fuzzer build
Frantisek Sumsal [Fri, 22 May 2020 09:34:01 +0000 (11:34 +0200)]
travis: enable fuzzer regression tests under sanitizers
Evgeny Vereshchagin [Fri, 22 May 2020 17:08:55 +0000 (20:08 +0300)]
Merge pull request #15889 from evverx/15885
network: Fix crash when SendOption= is invalid
Evgeny Vereshchagin [Fri, 22 May 2020 11:35:00 +0000 (13:35 +0200)]
tests: add a testcase for https://github.com/systemd/systemd/issues/15885
Susant Sahani [Fri, 22 May 2020 09:55:44 +0000 (11:55 +0200)]
network: Fix crash when SendOption= is invalid
```
p11-kit-0.23.20-1.fc32.x86_64 pam-1.3.1-26.fc33.x86_64 xz-libs-5.2.5-1.fc33.x86_64 zlib-1.2.11-21.fc32.x86_64
(gdb) bt
lvalue=0x560e10 "SendOption", ltype=2, rvalue=0x560e1b "11:string", data=0x561e20, userdata=0x561cd0) at ../src/network/networkd-dhcp-common.c:580
table=0x4392e0 <network_network_gperf_lookup>, section=0x560ef0 "DHCPv4", section_line=14, lvalue=0x560e10 "SendOption", rvalue=0x560e1b "11:string", flags=CONFIG_PARSE_WARN,
userdata=0x561cd0) at ../src/shared/conf-parser.c:132
lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>, flags=CONFIG_PARSE_WARN, section=0x7fffffffc9f8, section_line=0x7fffffffc9a0,
section_ignored=0x7fffffffc99d, l=0x560e10 "SendOption", userdata=0x561cd0) at ../src/shared/conf-parser.c:270
lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>, flags=CONFIG_PARSE_WARN, userdata=0x561cd0) at ../src/shared/conf-parser.c:395
lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>, flags=CONFIG_PARSE_WARN, userdata=0x561cd0) at ../src/shared/conf-parser.c:452
dropin_dirname=0x7fffffffcbd0 "veth99.network.d", sections=0x4f3a18 "Match", lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>,
flags=CONFIG_PARSE_WARN, userdata=0x561cd0) at ../src/shared/conf-parser.c:511
(gdb) q
A debugging session is active.
Inferior 1 [process 118718] will be killed.
```
```
$ printf '[DHCPv4]\nSendOption=1:uint8' >crash
$ ./out/fuzz-network-parser ./crash
INFO: Seed:
1158717610
INFO: Loaded 2 modules (199728 inline 8-bit counters): 136668 [0x7faf3e91a930, 0x7faf3e93bf0c), 63060 [0xadf190, 0xaee7e4),
INFO: Loaded 2 PC tables (199728 PCs): 136668 [0x7faf3e93bf10,0x7faf3eb51cd0), 63060 [0xaee7e8,0xbe4d28),
./out/fuzz-network-parser: Running 1 inputs 1 time(s) each.
Running: ./crash
Assertion 's' failed at src/basic/parse-util.c:458, function int safe_atou8(const char *, uint8_t *)(). Aborting.
==5588== ERROR: libFuzzer: deadly signal
#0 0x51811e in __sanitizer_print_stack_trace (/home/vagrant/systemd/out/fuzz-network-parser+0x51811e)
#1 0x46b921 in fuzzer::PrintStackTrace() (/home/vagrant/systemd/out/fuzz-network-parser+0x46b921)
#2 0x44ded6 in fuzzer::Fuzzer::CrashCallback() (.part.0) (/home/vagrant/systemd/out/fuzz-network-parser+0x44ded6)
#3 0x44df9d in fuzzer::Fuzzer::StaticCrashSignalCallback() (/home/vagrant/systemd/out/fuzz-network-parser+0x44df9d)
#4 0x7faf3d6d7b1f (/lib64/libpthread.so.0+0x14b1f)
#5 0x7faf3d3c2624 in raise (/lib64/libc.so.6+0x3c624)
#6 0x7faf3d3ab8d8 in abort (/lib64/libc.so.6+0x258d8)
#7 0x7faf3e12593a in log_assert_failed_realm /home/vagrant/systemd/build/../src/basic/log.c:819:9
#8 0x7faf3e140ce1 in safe_atou8 /home/vagrant/systemd/build/../src/basic/parse-util.c:458:9
#9 0x68089c in config_parse_dhcp_send_option /home/vagrant/systemd/build/../src/network/networkd-dhcp-common.c:517:21
#10 0x7faf3debed4e in next_assignment /home/vagrant/systemd/build/../src/shared/conf-parser.c:132:32
#11 0x7faf3deb7783 in parse_line /home/vagrant/systemd/build/../src/shared/conf-parser.c:270:16
#12 0x7faf3deb606c in config_parse /home/vagrant/systemd/build/../src/shared/conf-parser.c:395:21
#13 0x7faf3deb85ee in config_parse_many_files /home/vagrant/systemd/build/../src/shared/conf-parser.c:452:21
#14 0x7faf3deb8c57 in config_parse_many /home/vagrant/systemd/build/../src/shared/conf-parser.c:511:16
#15 0x57c2eb in network_load_one /home/vagrant/systemd/build/../src/network/networkd-network.c:470:13
#16 0x543490 in LLVMFuzzerTestOneInput /home/vagrant/systemd/build/../src/network/fuzz-network-parser.c:26:16
#17 0x44e3e8 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/vagrant/systemd/out/fuzz-network-parser+0x44e3e8)
#18 0x433505 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) (/home/vagrant/systemd/out/fuzz-network-parser+0x433505)
#19 0x43c449 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/vagrant/systemd/out/fuzz-network-parser+0x43c449)
#20 0x42c4a6 in main (/home/vagrant/systemd/out/fuzz-network-parser+0x42c4a6)
#21 0x7faf3d3ad1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
#22 0x42c4fd in _start (/home/vagrant/systemd/out/fuzz-network-parser+0x42c4fd)
NOTE: libFuzzer has rudimentary signal handlers.
Combine libFuzzer with AddressSanitizer or similar for better crash reports.
SUMMARY: libFuzzer: deadly signal
```
Zbigniew Jędrzejewski-Szmek [Fri, 22 May 2020 06:20:54 +0000 (08:20 +0200)]
Merge pull request #15869 from poettering/cant-auth
homed: fix logging into unfixated home directories
Evgeny Vereshchagin [Fri, 22 May 2020 04:06:37 +0000 (07:06 +0300)]
Merge pull request #15877 from mrc0mmand/meson-fuzz-test
meson: add fuzz-tests= option
Lennart Poettering [Wed, 20 May 2020 16:38:07 +0000 (18:38 +0200)]
homed: don't insist on authentication against host-copy user record
homed maintains two or three copies of the user's identity record per
home directory: one on the host, one inside the LUKS header, and one
embedded in the home directory.
Previously we'd insist that if a user logs in they have to authenticate
against all three, as a safety feature. This broke logging into
unfixated records however, since in that case the host version is
synthetic and thus does not carry any authentication data.
Let's hence losen the strictness here: accept authentication against
host records that carry no auth data. This should be safe as we know
after all that the second/third record will catch invalid accesses.
Fixes: #15178
Lennart Poettering [Wed, 20 May 2020 16:12:41 +0000 (18:12 +0200)]
homed: include error string when in log message if quota doesn't work
Lennart Poettering [Wed, 20 May 2020 16:07:23 +0000 (18:07 +0200)]
bus-util: actually register the object manager
Lennart Poettering [Wed, 20 May 2020 16:06:56 +0000 (18:06 +0200)]
homed: also fsync private/public key pair when storing it
Lennart Poettering [Wed, 20 May 2020 16:06:27 +0000 (18:06 +0200)]
homed: fix typo
Lennart Poettering [Wed, 20 May 2020 15:26:17 +0000 (17:26 +0200)]
homed: make sure we log about invalid user records we load
Lennart Poettering [Wed, 20 May 2020 15:25:50 +0000 (17:25 +0200)]
homed: automatically clean up empty user record files
See: #15178
Lennart Poettering [Wed, 20 May 2020 15:14:51 +0000 (17:14 +0200)]
homed: when updating local copy of user record, sync to disk
Apparently xfs needs us to sync explicitly, see #15178.
Lennart Poettering [Wed, 20 May 2020 15:14:48 +0000 (17:14 +0200)]
fileio: sync directory after rename, too
Lennart Poettering [Wed, 20 May 2020 15:02:12 +0000 (17:02 +0200)]
homed: return a better error when a home has no authentication information defined
We can't log into home entries that have no password or PKCS#11 token.
Return a proper, useful error in that case.
See: #15178
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 15:56:33 +0000 (17:56 +0200)]
Merge pull request #15433 from mrc0mmand/test-reintroduce-parallelization
test: copy the test image instead of symlinking it
Frantisek Sumsal [Thu, 21 May 2020 14:59:40 +0000 (16:59 +0200)]
meson: add fuzz-tests= option
The slow-tests= option already enables fuzzers as well, however, this
option can't be used in the "fully sanitized" runs, as certain slow
tests are affected by the performance quite significantly.
This option allows us to enable only fuzzers without the slow tests to
meet the needs of such runs.
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 13:55:42 +0000 (15:55 +0200)]
Merge pull request #15873 from evverx/pointer-overflow-oss-fuzz
oss-fuzz: turn on the pointer-overflow check
Susant Sahani [Sat, 18 Apr 2020 15:59:29 +0000 (17:59 +0200)]
network: Allow to configure addr_gen_mode
Defines how link-local and autoconf addresses are generated.
0: generate address based on EUI64 (default)
1: do no generate a link-local address, use EUI64 for addresses generated
from autoconf
2: generate stable privacy addresses, using the secret from
stable_secret (RFC7217)
3: generate stable privacy addresses, using a random secret if unset
codicodi [Thu, 21 May 2020 10:37:43 +0000 (12:37 +0200)]
Update resolvectl zsh completion
Jeremy Cline [Fri, 15 May 2020 20:28:35 +0000 (16:28 -0400)]
shared: treat generator units as vendor units
Units created with "systemctl edit --full" from generator units aren't
removed with "systemctl revert" because units in the generator,
generator_early, and generator_late paths aren't considered vendor
units.
Alter path_is_vendor() to return true if the given path is a
generator unit, which in turn causes "systemctl revert" to remove units
created with "systemctl edit --full" as they now have vendor versions.
Fixes #10053
Lidong Zhong [Tue, 14 Apr 2020 16:54:57 +0000 (00:54 +0800)]
udev: rename the persistent link for ATA devices
ATA devices should use the ATA ids like port number and (possibly)
master/slave or multiplier id, not the generic SCSI ID.
Currently only port number is included in the link. With this patch
the link would be able to support more cases, which are a) when the
device is behind a port multiplexer b) the distinction between master
and slave (distinguished by target id).
I tried to verify scenario a) with this patch, but I failed to find a
machine with PMP SATA devices attached. But the link below
https://github.com/systemd/systemd/issues/3943
could show what's the difference. Here is my test for scenario b)
Current version:
linux-ql21:~ # ll /sys/class/block/sd[ab]
lrwxrwxrwx 1 root root 0 May 8 20:46 /sys/class/block/sda ->
../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:0/3:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 May 8 20:46 /sys/class/block/sdb ->
../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:1/3:0:1:0/block/sdb
linux-ql21:~ # ll /dev/disk/by-path/pci-0000\:00\:01.1-ata-1
lrwxrwxrwx 1 root root 9 May 8 20:44
/dev/disk/by-path/pci-0000:00:01.1-ata-1 -> ../../sdb
linux-ql21:~ # udevadm info /sys/class/block/sda |grep by-path
S: disk/by-path/pci-0000:00:01.1-ata-1
E: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VB3649e885-
3e0cdd64
/dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VB3649e885-
3e0cdd64
/dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VB3649e885-
3e0cdd64
/dev/disk/by-path/pci-0000:00:01.1-ata-1
/dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB3649e885-
3e0cdd64
linux-ql21:~ # udevadm info /sys/class/block/sdb |grep by-path
S: disk/by-path/pci-0000:00:01.1-ata-1
E: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-path/pci-0000:00:01.1-ata-1
After patch applied:
linux-ql21:~ # ll /sys/class/block/sd[ab]
lrwxrwxrwx 1 root root 0 May 8 21:07 /sys/class/block/sda ->
../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:0/3:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 May 8 21:07 /sys/class/block/sdb ->
../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:1/3:0:1:0/block/sdb
linux-ql21:~ # ll /dev/disk/by-path/pci-0000\:00\:01.1-ata-*
lrwxrwxrwx 1 root root 9 May 8 21:07
/dev/disk/by-path/pci-0000:00:01.1-ata-1.0 -> ../../sda
lrwxrwxrwx 1 root root 9 May 8 21:07
/dev/disk/by-path/pci-0000:00:01.1-ata-1.1 -> ../../sdb
linux-ql21:~ # udevadm info /sys/class/block/sda |grep by-path
S: disk/by-path/pci-0000:00:01.1-ata-1.0
E: DEVLINKS=/dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VB3649e885-
3e0cdd64
/dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VB3649e885-
3e0cdd64
/dev/disk/by-id/ata-VBOX_HARDDISK_VB3649e885-
3e0cdd64
/dev/disk/by-path/pci-0000:00:01.1-ata-1.0
/dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB3649e885-
3e0cdd64
linux-ql21:~ # udevadm info /sys/class/block/sdb |grep by-path
S: disk/by-path/pci-0000:00:01.1-ata-1.1
E: DEVLINKS=/dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-id/ata-VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VBc53b2498-
d84ae8de
/dev/disk/by-path/pci-0000:00:01.1-ata-1.1
Changelog:
v5: add another parameter compat_link in handle_scsi()
v4: comment for ID_PATH_ATA_COMPAT
get string length with pointer difference
(suggested by Franck Bui<fbui@suse.com>)
v3: creating compatible link from env
variables type change
v2: remove udev rules modification for compatible link
setup a test scenario of master/slave ATA devices
v1: initial patch
Susant Sahani [Thu, 19 Mar 2020 11:54:57 +0000 (12:54 +0100)]
networkctl: Add a range to address genmode
Lennart Poettering [Tue, 19 May 2020 22:35:30 +0000 (00:35 +0200)]
rules: automatically pull in smartcard.target from all CCID devices
We apparently never matched the USB interface class. Let's fix that.
Prompted by: #15676
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 07:07:27 +0000 (09:07 +0200)]
Merge pull request #15870 from poettering/proc-cmdline-efi-fix
udev /proc/cmdline handling fixes
Evgeny Vereshchagin [Thu, 21 May 2020 07:00:53 +0000 (09:00 +0200)]
docs: add a link to the Fossies codespell report
Evgeny Vereshchagin [Thu, 21 May 2020 06:20:01 +0000 (08:20 +0200)]
oss-fuzz: turn on the pointer-overflow check
It's off by default on OSS-Fuzz but it should be safe to turn it on
manually: https://github.com/google/oss-fuzz/issues/659#issuecomment-
631897889
Just a follow-up to https://github.com/systemd/systemd/pull/15865.
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 05:51:33 +0000 (07:51 +0200)]
sd-path: fix systemd-system-generator-path lookup
CID#
1422164.
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 05:41:30 +0000 (07:41 +0200)]
network: reduce scope of variables, etc.
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 05:40:31 +0000 (07:40 +0200)]
network: fix signed/unsigned confusion
sd_dhcp_lease_get_servers() returns int, which would never be negative when
cast to size_t, so we condition check was wrong.
CID#
1425417.
Lennart Poettering [Wed, 20 May 2020 17:55:39 +0000 (19:55 +0200)]
homed: fix return value mix-up
We generally return > 1 if any of the actions we are doing is instantly
complete and == 0 when we started doing it asynchronously (by forking
off homework), in our functions that execute operations on homes.
Fix a mix-up where the test for this was reversed in
home_dispatch_release() and home_dispatch_lock_all().
Fixes: #15684
Anita Zhang [Thu, 21 May 2020 01:14:51 +0000 (18:14 -0700)]
Merge pull request #15557 from poettering/journal-zero-fix
journal: deal better with reading from zeroed out journal mmaps
Evgeny Vereshchagin [Thu, 21 May 2020 00:17:20 +0000 (03:17 +0300)]
Merge pull request #15865 from evverx/ubsan-to-the-rescue
build-system: build the fuzz targets with both ASan and UBSan
Anita Zhang [Wed, 20 May 2020 22:12:37 +0000 (15:12 -0700)]
Merge pull request #15854 from poettering/call-method-ret-error
explain async bus method callback ret_error parameter
Anita Zhang [Wed, 20 May 2020 22:01:52 +0000 (15:01 -0700)]
Merge pull request #15864 from poettering/pam-sudo-fixes-part3
two more pam_systemd fixes, split out of #15742
Lennart Poettering [Wed, 20 May 2020 19:07:47 +0000 (21:07 +0200)]
Merge pull request #15868 from keszybz/fix-failed-to-fix-up-pid1-environment
Fix bad errno checks
Lennart Poettering [Wed, 20 May 2020 17:22:09 +0000 (19:22 +0200)]
proc-cmdline: make checking of EFI options variable optional
And do not use it in the IMPORT{cmdline} udev code. Wherever we expose
direct interfaces to check the kernel cmdline, let's not consult our
systemd-specific EFI variable, but strictly use the actual kernel
variable, because that's what we claim we do. i.e. it's fine to use the
EFI variable for our own settings, but for the generic APIs to the
kernel cmdline we should not use it.
Specifically, this applies to IMPORT{cmdline} and
ConditionKernelCommandLine=. In the latter case we weren#t checking the
EFI variable anyway, hence let's do the same for the udev case, too.
Fixes: #15739
Lennart Poettering [Wed, 20 May 2020 17:18:45 +0000 (19:18 +0200)]
proc-cmdline: add checking of EFI options variable in proc_cmdline_get_key_many() too
Lennart Poettering [Wed, 20 May 2020 17:17:44 +0000 (19:17 +0200)]
proc-cmdline: fix return value clobbering in proc_cmdline_get_key()
Let's make sure proc_cmdline_get_key() follows our coding style: never
clobber return values on failure, and always initialize on success.
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 16:10:58 +0000 (18:10 +0200)]
tree-wide: fix bad errno checks
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 16:08:05 +0000 (18:08 +0200)]
basic/efivars: fix errno propagation
Fixup for
484f4e5b2d62e885998fa3c09ed4d58b6c38f987. Should fix #15730.
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 14:39:41 +0000 (16:39 +0200)]
Merge pull request #15274 from ssahani/network-issue-9610
DHCP4: Allow lease time to be set when missing from offer
Lennart Poettering [Wed, 20 May 2020 14:18:18 +0000 (16:18 +0200)]
Merge pull request #15490 from ssahani/dhcpv6-vendor-class
network: DHCPv6 - Add support to send vendor class information
Evgeny Vereshchagin [Wed, 20 May 2020 14:05:32 +0000 (16:05 +0200)]
fuzzit: turn on the pointer-overflow check
Now that https://github.com/systemd/systemd/issues/15583 is gone, it
should be safe to turn it on.
Evgeny Vereshchagin [Wed, 20 May 2020 09:33:12 +0000 (11:33 +0200)]
build-system: build the fuzz targets with both ASan and UBSan
Just a follow-up to https://github.com/systemd/systemd/pull/15860
Lennart Poettering [Tue, 19 May 2020 17:06:22 +0000 (19:06 +0200)]
man: let's document explicitly that method reply handlers won't get ret_error set to method error
Fixes: #8108
Lennart Poettering [Tue, 19 May 2020 17:05:03 +0000 (19:05 +0200)]
man: include sd_bus_message_handler_t prototype in synopsys of all man pages that reference the type
The type is not trivial, and kinda important to understand things, hence
import it everywhere where appropriate.
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 13:53:28 +0000 (15:53 +0200)]
Merge pull request #15860 from keszybz/bus-message-empty-fields
Fix crash on message with empty fields structure
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 13:48:04 +0000 (15:48 +0200)]
Merge pull request #15661 from hundeboll/mount-read-write-only
Mount read write only
Susant Sahani [Sun, 19 Apr 2020 23:34:36 +0000 (01:34 +0200)]
sd-network: DHCPv4 - Add user class, extra option and send generic options in request state