Lennart Poettering
47eeb381c8
Merge pull request #15909 from keszybz/sd-network-serialization
...
networkd link serialization fix
2020-05-26 15:37:57 +02:00
Andreas Rammhold
3544f65f0c
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.
2020-05-26 15:37:05 +02:00
Norbert Lange
6589a56972
dont install systemd-initctl, runlevel, telinit if no SYSV compat
...
systemd-initctl executable is still built.
2020-05-26 15:04:36 +02:00
Evgeny Vereshchagin
a53a85b35e
Merge pull request #15914 from poettering/ubsan-float-check
...
json: disable ubsan float checking
2020-05-26 15:11:16 +03:00
Zbigniew Jędrzejewski-Szmek
d8bff5cc37
network: simplify how initial space is handled
2020-05-26 10:19:31 +02:00
Zbigniew Jędrzejewski-Szmek
d5e172d2fb
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.
2020-05-26 10:08:54 +02:00
Lennart Poettering
253acc229c
Merge pull request #15840 from Werkov/mkosi-opensuse
...
mkosi: openSUSE updates
2020-05-26 10:02:29 +02:00
Zbigniew Jędrzejewski-Szmek
00813316b0
sd-dhcp6: constify output arguments in get_{ntp,nds}_addr
...
This matches what we do for ipv4 and is in general better.
2020-05-26 09:47:45 +02:00
Zbigniew Jędrzejewski-Szmek
dddc8d1e1e
sd-network: reduce scope of some variables
2020-05-26 09:47:45 +02:00
Lennart Poettering
ffec8658db
Merge pull request #15862 from hunger/master
...
repart: Add Uuid option to config files
2020-05-26 09:32:22 +02:00
Lennart Poettering
6ae8c6f5d7
update TODO
2020-05-26 09:21:40 +02:00
Evgeny Vereshchagin
e5af586f49
add a test triggering https://github.com/systemd/systemd/issues/15907
2020-05-26 09:01:26 +02:00
Lennart Poettering
8e2fa6e223
json: turn off ubsan for json_variant_has_type()
...
Fixes : #15907
2020-05-26 09:01:26 +02:00
Lennart Poettering
6028d766d1
macro: introduce DISABLE_WARNING_TYPE_LIMITS and make use of it everywhere
2020-05-25 18:25:09 +02:00
Lennart Poettering
56e577c62f
tree-wide: use DISABLE_WARNING_FORMAT_NONLITERAL where appropriate
2020-05-25 18:25:05 +02:00
Lennart Poettering
6a5b28def2
json: use our regular way to turn off compiler warnings
2020-05-25 18:23:50 +02:00
Lennart Poettering
1283366a90
Merge pull request #15167 from ssahani/address-gen-mode
...
networkctl: Add a range to address genmode
2020-05-25 17:32:00 +02:00
Lennart Poettering
a177f05a5c
Merge pull request #15872 from keszybz/networkd-types
...
Type and parsing fixes for networkd
2020-05-25 17:31:00 +02:00
Tobias Hunger
7b5cb4ceb4
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.
2020-05-25 15:48:59 +02:00
Tobias Hunger
129635333d
repart: Add UUID option to config files
...
Add a option to provide a UUID for the partition that will get
created and document that.
2020-05-25 15:48:59 +02:00
Zbigniew Jędrzejewski-Szmek
10b20e5a93
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.
2020-05-25 14:52:04 +02:00
Zbigniew Jędrzejewski-Szmek
d273579667
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.
2020-05-25 14:52:00 +02:00
Zbigniew Jędrzejewski-Szmek
2206aa5c35
sd-network: fix inverted error message
...
We get -ENOMSG when there is no lease.
2020-05-25 11:14:54 +02:00
Frantisek Sumsal
15dd451535
tree-wide: codespell fixes
...
Another batch of codespell fixes as reported by Fossies.org
2020-05-25 10:29:28 +02:00
Dana Olson
639375e0b6
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.
2020-05-24 23:27:26 +02:00
Topi Miettinen
cc1c85fbc3
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.
2020-05-24 22:54:17 +02:00
Tudor Roman
6a220cdb0b
home: respect user record mount flags
2020-05-24 22:48:50 +02:00
Peter Hutterer
9f50cdd34a
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
2020-05-24 12:24:16 +02:00
Evgeny Vereshchagin
3c60fb077f
Merge pull request #15886 from mrc0mmand/travis-enable-fuzz-tests
...
travis: enable fuzzer regression tests under sanitizers
2020-05-23 19:21:44 +03:00
Frantisek Sumsal
87666b31f9
meson: pass the optimization level to the fuzzer build
2020-05-23 14:19:25 +02:00
Frantisek Sumsal
e9158b254c
travis: enable fuzzer regression tests under sanitizers
2020-05-22 19:12:59 +02:00
Evgeny Vereshchagin
0aeb407cb4
Merge pull request #15889 from evverx/15885
...
network: Fix crash when SendOption= is invalid
2020-05-22 20:08:55 +03:00
Evgeny Vereshchagin
0d5266541c
tests: add a testcase for https://github.com/systemd/systemd/issues/15885
2020-05-22 13:35:00 +02:00
Susant Sahani
1eb73422f2
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
```
2020-05-22 11:57:22 +02:00
Zbigniew Jędrzejewski-Szmek
fbc6d1716f
Merge pull request #15869 from poettering/cant-auth
...
homed: fix logging into unfixated home directories
2020-05-22 08:20:54 +02:00
Evgeny Vereshchagin
5dd1469ef1
Merge pull request #15877 from mrc0mmand/meson-fuzz-test
...
meson: add fuzz-tests= option
2020-05-22 07:06:37 +03:00
Lennart Poettering
c8f145adbb
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
2020-05-21 23:39:30 +02:00
Lennart Poettering
1a53adb3ab
homed: include error string when in log message if quota doesn't work
2020-05-21 23:39:30 +02:00
Lennart Poettering
2fcbf417b6
bus-util: actually register the object manager
2020-05-21 23:39:30 +02:00
Lennart Poettering
fa3709c5fb
homed: also fsync private/public key pair when storing it
2020-05-21 23:39:30 +02:00
Lennart Poettering
e8dd54ab3c
homed: fix typo
2020-05-21 23:39:30 +02:00
Lennart Poettering
b847192699
homed: make sure we log about invalid user records we load
2020-05-21 23:39:30 +02:00
Lennart Poettering
20f4a308bf
homed: automatically clean up empty user record files
...
See: #15178
2020-05-21 23:39:30 +02:00
Lennart Poettering
e4005ffe00
homed: when updating local copy of user record, sync to disk
...
Apparently xfs needs us to sync explicitly, see #15178 .
2020-05-21 23:28:49 +02:00
Lennart Poettering
5b3f4a20ea
fileio: sync directory after rename, too
2020-05-21 23:28:48 +02:00
Lennart Poettering
cbffdcecae
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
2020-05-21 23:28:48 +02:00
Zbigniew Jędrzejewski-Szmek
766507972b
Merge pull request #15433 from mrc0mmand/test-reintroduce-parallelization
...
test: copy the test image instead of symlinking it
2020-05-21 17:56:33 +02:00
Frantisek Sumsal
c56463fdb4
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.
2020-05-21 16:59:40 +02:00
Zbigniew Jędrzejewski-Szmek
e72ecbf506
Merge pull request #15873 from evverx/pointer-overflow-oss-fuzz
...
oss-fuzz: turn on the pointer-overflow check
2020-05-21 15:55:42 +02:00
Susant Sahani
a6f1848a23
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
2020-05-21 14:41:04 +02:00