1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00
Commit Graph

57667 Commits

Author SHA1 Message Date
Alex Henrie
6e40d0e458 network: clarify the relationship between DHCP= and WithoutRA=
Just setting DHCP=ipv6 is not enough to get DHCPv6 working without RA.
The WithoutRA option must also be changed from its default of "no".
2022-05-06 14:01:53 -06:00
Alex Henrie
0bcc6557fb network: clarify the relationship between RA flags and DHCPv6 modes
In the documentation, using the term "managed" for both the RA flag and
the DHCPv6 mode is confusing because the mode is referred to as
"solicit" both in the official DHCPv6 documentation (see RFC 8415) and
in the WithoutRA option.

Furthermore, calling the other RA flag "other information" or "other
address configuration" is confusing because its official name is simply
"other configuration" (see RFC 4861 and RFC 5175) and it isn't used to
assign IP addresses.

Rewrite the documentation for DHCPv6Client and WithoutRA to make it
clear that getting the "managed" RA flag triggers the same kind of DHCP
request as WithoutRA=solicit, whereas getting the "other configuration"
RA flag triggers the same kind of DHCP request as
WithoutRA=information-request.
2022-05-06 14:01:53 -06:00
Yu Watanabe
ad11dd94fd README: mention kernel requirement for ambient capabilities
Closes #23231.
2022-05-06 09:33:49 +01:00
Khem Raj
0dd5ec58fa resolve: Use sockaddr pointer type for bind()
bind() expects sockaddr* but SERVER_ADDRESS is sockaddr_in type struct

Fixes errors with clang e.g.

../git/src/resolve/test-resolved-stream.c:112:32: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
        assert_se(bind(bindfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
                               ^~~~~~~~~~~~~~~
../git/src/resolve/test-resolved-stream.c:251:39: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
                r = connect(clientfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS));

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-05-06 17:29:59 +09:00
Thomas Weißschuh
15d4c239f4 userdbctl: initialize parameter n for uid_range_load_userns()
uid_range_load_userns() dereferences the n parameter.

Passing unitialized memory may lead to crashes, for example with version
251rc2-1 on ArchLinux.
2022-05-06 13:48:51 +09:00
Zbigniew Jędrzejewski-Szmek
e654d4316c
Merge pull request #23277 from keszybz/news-and-hwdb-update
News and hwdb update
2022-05-05 19:02:49 +02:00
Zbigniew Jędrzejewski-Szmek
9aa3d6b41e Revert "shared/install: create relative symlinks for enablement and aliasing"
This reverts commit d6c9411072.

I still think this is something that needs to be done, but we're hitting some
unexplained failures, e.g. https://github.com/systemd/systemd/issues/22920.
So let's revert this for now, so -rc2 can be released, with a plan to return
to this after a release.

Closes #22920.
2022-05-05 19:02:26 +02:00
Jakob Lell
14736ab6ff Amend documentation for LimitNPROC= 2022-05-05 18:04:54 +02:00
Daan De Meyer
5517607ad7 journal: Make journal_default_metrics() static
Only caller resides in the same file as were it's defined so no
need to have it be public.
2022-05-05 16:32:24 +02:00
Zbigniew Jędrzejewski-Szmek
7000a8c3bc
Merge pull request #23273 from keszybz/bootctl-quiet
bootctl --quiet and --graceful
2022-05-05 16:30:53 +02:00
Zbigniew Jędrzejewski-Szmek
da2f26b2cb hwdb: run "update-hwdb" 2022-05-05 16:28:46 +02:00
Zbigniew Jędrzejewski-Szmek
211b564a32 NEWS: update with final changes 2022-05-05 16:28:46 +02:00
Andreas Rammhold
66c38cd053 core: handle lookup paths being symlinks
With a recent change paths leaving the statically known lookup paths would be
treated differently then those that remained within those. That was done
(AFAIK) to consistently handle alias names. Unfortunately that means that on
some distributions, especially those where /etc/ consists mostly of symlinks,
would trigger that new detection for every single unit in /etc/systemd/system.
The reason for that is that the units directory itself is already a symlink.

Rebased-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
2022-05-05 14:46:52 +02:00
Zbigniew Jędrzejewski-Szmek
14e6e444dd bootctl: add --quiet
It's useful for installation scripts and suchlike.
Raised in https://bugzilla.redhat.com/show_bug.cgi?id=2079784#c9.
2022-05-05 12:30:06 +02:00
Zbigniew Jędrzejewski-Szmek
18eb56c3c0 bootctl: support --graceful in is-installed 2022-05-05 12:30:06 +02:00
Lennart Poettering
a8796773b0 update TODO 2022-05-05 10:55:18 +02:00
Sonali Srivastava
a5efbf468c terminal-util: get_color_mode checks COLORTERM 2022-05-05 09:18:51 +02:00
Evgeny Vereshchagin
51cef2b56f
Merge pull request #23246 from medhefgo/check-compilation
meson: Improve public header tests
2022-05-05 01:53:28 +03:00
Daan De Meyer
746ea80b77 basic: Add some missing headers to compress.h 2022-05-04 22:47:58 +01:00
Matthijs van Duin
b0221bb6a4 Fix placement of TTL TLV in LLDP transmit
The LLDP spec (IEEE 802.1AB) requires the three mandatory TLVs (Chassis
ID, Port ID, and TTL) to be the first three TLVs in the packet, in that
specific order, whereas systemd put the TTL near the end of the packet.

This violation caused the ethernet switch in our office to discard these
packets as malformed, and Wireshark's packet parser also chokes on them.
2022-05-05 01:19:02 +09:00
Evgeny Vereshchagin
a2e37d5231 timedatectl: fix a memory leak
```
timedatectl list-timezones --no-pager
...
==164329==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 8192 byte(s) in 1 object(s) allocated from:
    #0 0x7fe8a74b6f8c in reallocarray (/lib64/libasan.so.6+0xaef8c)
    #1 0x7fe8a63485dc in strv_push ../src/basic/strv.c:419
    #2 0x7fe8a6349419 in strv_consume ../src/basic/strv.c:490
    #3 0x7fe8a634958d in strv_extend ../src/basic/strv.c:542
    #4 0x7fe8a643d787 in bus_message_read_strv_extend ../src/libsystemd/sd-bus/bus-message.c:5606
    #5 0x7fe8a643db9d in sd_bus_message_read_strv ../src/libsystemd/sd-bus/bus-message.c:5628
    #6 0x4085fb in list_timezones ../src/timedate/timedatectl.c:314
    #7 0x7fe8a61ef3e1 in dispatch_verb ../src/shared/verbs.c:103
    #8 0x410f91 in timedatectl_main ../src/timedate/timedatectl.c:1025
    #9 0x41111c in run ../src/timedate/timedatectl.c:1043
    #10 0x411242 in main ../src/timedate/timedatectl.c:1046
    #11 0x7fe8a489df1f in __libc_start_call_main (/lib64/libc.so.6+0x40f1f)
```
2022-05-05 00:05:57 +09:00
Lennart Poettering
8dd11be77f
Merge pull request #23261 from poettering/dir-is-empty
dir_is_empty() fixes
2022-05-04 16:36:34 +02:00
Yu Watanabe
9b260c967b
Merge pull request #23264 from keszybz/shorten-test-names
Shorten test names
2022-05-04 23:25:47 +09:00
Jan Janssen
ee8052c137 meson: Add -Wall and -Wextra to header checks
This should ensure public headers are free from any warnings.
2022-05-04 16:11:41 +02:00
Jan Janssen
14056a52c6 meson: Use meson test suite feature
This makes it easier to only test a subset of tests without having
to specify them all on the command line:
    meson test -C build --suite headers
2022-05-04 16:11:34 +02:00
Jan Janssen
911c15087c meson: Remove check-compilation.sh
No need to involve a trivial shell script for this.

We could call the compiler directly, but test() expects arguments
to be passed separately and cc.cmd_array() can contain arguments
itself. Using env is easier than manually slicing the array because
meson has no builtins for that.
2022-05-04 15:59:51 +02:00
Jan Janssen
3d35c6d47e meson: Exit early with subdir_done() 2022-05-04 15:59:03 +02:00
Yu Watanabe
c322cfafba man/networkctl: mention initialized state
Closes #23262.
2022-05-04 14:44:13 +01:00
Zbigniew Jędrzejewski-Szmek
d7ff524039 tree-wide: drop manually-crafted message for missing variables
Bash will generate a very nice message for us:
/tmp/ff.sh: line 1: SOMEVAR: parameter null or not set

Let's save some keystrokes by not replacing this with our own inferior
messages.
2022-05-04 20:53:46 +09:00
Lennart Poettering
0af6ce9ab3 stat-util: drop dir_is_populated() which is apparently not used 2022-05-04 13:29:14 +02:00
Lennart Poettering
db55bbf29b stat-util: fix dir_is_empty() with hidden/backup files
This is a follow-up for f470cb6d13 which in
turn is a follow-up for a068aceafb.

The latter started to honour hidden files when deciding whether a
directory is empty. The former reverted to the old behaviour to fix
issue #23220.

It introduced a bug though: when a directory contains a larger number of
hidden entries the getdents64() buffer will not suffice to read them,
since we just allocate three entries for it (which is definitely enough
if we just ignore the . + .. entries, but not ig we ignore more).

I think it's a bit confusing that dir_is_empty() can return true even if
rmdir() on the dir would return ENOTEMPTY. Hence, let's rework the
function to make it optional whether hidden files are ignored or not.
After all, I looking at the users of this function I am pretty sure in
more cases we want to honour hidden files.
2022-05-04 13:29:14 +02:00
Zbigniew Jędrzejewski-Szmek
080b8c2ace
Merge pull request #23260 from yuwata/libsystemd-network-raw-size
libsystemd-network: two fixlets
2022-05-04 13:11:26 +02:00
Zbigniew Jędrzejewski-Szmek
3e8caa34d6 docs: use lowercase "qemu" and other minor tweaks to test docs
We used both "qemu" and "QEMU", let's use the lower-case version everywhere
since it's also the name of the binary and the version that people are
most familiar with.

The stuff under test/ is not only for the integeration tests, but also
for various other test-related stuff, so adjust the docs a bit.
2022-05-04 12:58:43 +02:00
Zbigniew Jędrzejewski-Szmek
c656265d8f docs: say that fuzzer input samples should have short names 2022-05-04 12:58:43 +02:00
Zbigniew Jędrzejewski-Szmek
41d992cf51 fuzz-network-parser: drop ".network" and shorten names
All fuzzer inputs as .network files. Some had the suffix, others didn't.
So drop it everywhere, and also shorten some other names.
2022-05-04 12:57:48 +02:00
Zbigniew Jędrzejewski-Szmek
a5398c774b fuzz: rename test cases for brevity and meaning
Those long indentifiers make test output very wide, and they are ultimately
not very useful for humans to look at. Let's use some short string to identify
the test failure instead.
2022-05-04 11:51:15 +02:00
Lennart Poettering
be1e659291 update NEWS for 251-rc2 2022-05-04 10:32:10 +02:00
Lennart Poettering
05681510c6 units: remove spurious empty line 2022-05-04 10:17:05 +02:00
Yu Watanabe
87bd4b79e6 sd-lldp: use memcpy_safe() as the buffer size may be zero 2022-05-04 16:05:04 +09:00
Yu Watanabe
9a44966e63 sd-ndisc: drop unused function 2022-05-04 16:03:57 +09:00
Yu Watanabe
4e88a46bfe libsystemd-network: refuse too large raw_size
Closes #23258.
2022-05-04 15:46:19 +09:00
Yu Watanabe
fa2ba7aea8
Merge pull request #23205 from DaanDeMeyer/tmpfiles-networkd
tmpfiles: Split networkd entries into a separate file
2022-05-04 11:48:21 +09:00
Yu Watanabe
e370edbefc
Merge pull request #23257 from evverx/install-valgrind
tests: make it possible to install valgrind
2022-05-04 11:47:59 +09:00
Daan De Meyer
206c0897a2 sd-network: Keep inotify watch if watch descriptor didn't change
In sd_network_monitor_flush(), we shouldn't remove the inotify
watch for the current directory if the directory the network
monitor is waiting for wasn't created yet.

inotify_add_watch() returns the same unique watch descriptor if a
path is already being watched. Let's return the watch descriptor
from monitor_add_inotify_watch() so we can check if it's the same
as the watch descriptor of the inotify event. If they are equal,
we're still watching the same path and we don't need to remove the
inotify watch just yet.
2022-05-04 07:00:56 +09:00
Evgeny Vereshchagin
8e78dca982 tests: make valgrind_wrapper track file descriptors 2022-05-03 20:51:56 +00:00
Evgeny Vereshchagin
c66e2f6c2c tests: make it possible to install valgrind 2022-05-03 20:50:39 +00:00
rodin-ia
d31b8a66d1
Adding a description of the keyboard shortcut Fn+F12 for the HP EliteBook 845 G7 device. (#23253)
udevadm info /dev/input/event4
P: /devices/platform/i8042/serio0/input/input4/event4
N: input/event4
L: 0
S: input/by-path/platform-i8042-serio-0-event-kbd
E: DEVPATH=/devices/platform/i8042/serio0/input/input4/event4
E: DEVNAME=/dev/input/event4
E: MAJOR=13
E: MINOR=68
E: SUBSYSTEM=input
E: USEC_INITIALIZED=4165584
E: KEYBOARD_KEY_81=f20
E: KEYBOARD_KEY_89=battery
E: KEYBOARD_KEY_8a=screenlock
E: KEYBOARD_KEY_8b=camera
E: KEYBOARD_KEY_8c=media
E: KEYBOARD_KEY_8e=dvd
E: KEYBOARD_KEY_92=brightnessdown
E: KEYBOARD_KEY_97=brightnessup
E: KEYBOARD_KEY_b1=help
E: KEYBOARD_KEY_b3=unknown
E: KEYBOARD_KEY_d7=wlan
E: KEYBOARD_KEY_ee=switchvideomode
E: KEYBOARD_KEY_68=unknown
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_BUS=i8042
E: ID_SERIAL=noserial
E: ID_PATH=platform-i8042-serio-0
E: ID_PATH_TAG=platform-i8042-serio-0
E: XKBMODEL=pc105
E: XKBLAYOUT=us
E: BACKSPACE=guess
E: LIBINPUT_DEVICE_GROUP=11/1/1:isa0060/serio0
E: DEVLINKS=/dev/input/by-path/platform-i8042-serio-0-event-kbd
E: TAGS=:power-switch:
E: CURRENT_TAGS=:power-switch:
2022-05-04 05:40:55 +09:00
Daan De Meyer
52fdbf8ce7 meson: Sort lines in tmpfiles.d/meson.build 2022-05-03 20:46:16 +02:00
Daan De Meyer
eb1446f8f1 tmpfiles: Split networkd entries into a separate file
Many distributions ship systemd-networkd as a separate file so we
need to be able to ship the tmpfiles networkd entries as part of
that separate networkd package. Let's split the networkd entries
into a separate file to make that possible.
2022-05-03 20:46:14 +02:00
Daan De Meyer
4374d7eaac journal: Use header macros everywhere instead of JournalFile fields
Let's standardize on the journal header as a single source of truth
and remove redundant information from the JournalFile struct.
2022-05-03 17:23:02 +02:00