Zbigniew Jędrzejewski-Szmek [Sun, 7 Mar 2021 11:46:15 +0000 (12:46 +0100)]
Merge pull request #18907 from mrc0mmand/test-dissect-sanitizers
test: fix TEST-50-DISSECT under sanitizers
Anita Zhang [Sun, 7 Mar 2021 06:37:01 +0000 (22:37 -0800)]
Merge pull request #18910 from yuwata/socket-util-initialize-variable
socket-util: initialize variable with cleanup attribute
Yu Watanabe [Sun, 7 Mar 2021 01:31:26 +0000 (10:31 +0900)]
socket-util: initialize variable with cleanup attribute
Follow-up for
83e03c4fc23dae0cbb3fd4e7c2f9ef533fc26160.
Fixes CID#
1448460.
Frantisek Sumsal [Sat, 6 Mar 2021 21:22:32 +0000 (22:22 +0100)]
test: fix TEST-50-DISSECT under sanitizers
This test would normally get stuck when trying to mount the verity image
due to:
systemd-udevd[299]: dm-0: '/usr/sbin/dmsetup udevflags
6293812'(err) '==371==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.'
systemd-udevd[299]: dm-0: Process '/usr/sbin/dmsetup udevflags
6293812' failed with exit code 1
...
systemd-udevd[299]: dm-0: '/usr/sbin/dmsetup udevcomplete
6293812'(err) '==372==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.'
systemd-udevd[299]: dm-0: Process '/usr/sbin/dmsetup udevcomplete
6293812' failed with exit code 1.
systemd-udevd[299]: dm-0: Command "/usr/sbin/dmsetup udevcomplete
6293812" returned 1 (error), ignoring.
so let's add a simple udev rule which sets $LD_PRELOAD for the block
subsystem.
Also, install the ASan library along with necessary dependencies into
the verity minimal image, to get rid of the annoying (yet harmless)
errors about missing library from $LD_LIBRARY.
Frantisek Sumsal [Sat, 6 Mar 2021 21:21:30 +0000 (22:21 +0100)]
test: tidy up the ASan-related stuff
Yu Watanabe [Sat, 6 Mar 2021 18:03:27 +0000 (03:03 +0900)]
Merge pull request #18892 from poettering/cname-tweaks
resolved: properly handle stub replies for chains of multiple CNAMEs
Yu Watanabe [Sat, 6 Mar 2021 15:05:03 +0000 (00:05 +0900)]
dissect: fix memleak
Fixes #18903.
Carlo Wood [Sat, 6 Mar 2021 17:54:33 +0000 (18:54 +0100)]
Manual page fixes (#18906)
Lennart Poettering [Sat, 6 Mar 2021 13:32:46 +0000 (14:32 +0100)]
Merge pull request #18891 from keszybz/size_t-cast-removal
size_t cast removal
Lennart Poettering [Fri, 5 Mar 2021 17:20:59 +0000 (18:20 +0100)]
resolved: when synthesizing stub replies from multiple upstream packet, let's avoid RR duplicates
If we synthesize a stub reply from multiple upstream packet (i.e. a
series of CNAME/DNAME redirects), it might happen that we add the same
RR to a different reply section at a different CNAME/DNAME redirect
chain element. Let's clean this up once we are about to send the reply
message to the client: let's remove sections from "lower-priority"
sections when they are already listed in a "higher-priority" section.
Lennart Poettering [Fri, 5 Mar 2021 15:50:04 +0000 (16:50 +0100)]
resolved: fully follow CNAMEs in the DNS stub after all
In
2f4d8e577ca7bc51fb054b8c2c8dd57c2e188a41 I argued that following
CNAMEs in the stub is not necessary anymore. However, I think it' better
to revert to the status quo ante and follow it after all, given it is
easy for us and makes sure our D-Bus/varlink replies are more similar to
our DNS stub replies that way, and we save clients potential roundtrips.
Hence, whenever we hit a CNAME/DNAME redirect, let's restart the query
like we do for the D-Bus/Varlink case, and collect replies as we go.
Lennart Poettering [Fri, 5 Mar 2021 17:01:27 +0000 (18:01 +0100)]
resolved: split out helper that checks whether we shall reply with EDNS0 DO
Just some refactoring, no actual code changes.
Lennart Poettering [Fri, 5 Mar 2021 16:53:31 +0000 (17:53 +0100)]
resolved: handle multiple CNAME redirects in a single reply from upstream
www.netflix.com responds with a chain of CNAMEs in the same packet.
Let's handle that properly (so far we only followed CNAMEs a single step
when in the same packet)
Fixes: #18819
Lennart Poettering [Fri, 5 Mar 2021 16:48:43 +0000 (17:48 +0100)]
resolved: tighten checks in dns_resource_record_get_cname_target()
Let's refuse to consider CNAME/DNAME replies matching for RR types where
that is not really conceptually allow (i.e. on CNAME/DNAME lookups
themselves).
(And add a similar check to dns_resource_key_match_cname_or_dname() too,
which implements a smilar match)
Lennart Poettering [Fri, 5 Mar 2021 16:47:45 +0000 (17:47 +0100)]
dns-query: export CNAME_MAX, so that we can use it in other files, too
Let's rename it a bit, to be more explanatory while exporting it.
(And let's bump the CNAME limit to 16 — 8 just sounded so little)
Yu Watanabe [Sat, 6 Mar 2021 11:35:38 +0000 (20:35 +0900)]
Merge pull request #18890 from keszybz/fuzz-bus-match
Add fuzzers for bus match parsing code
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 15:36:37 +0000 (16:36 +0100)]
sd-bus: remove unnecessary variable
Also use structued initialization in one more place, use '\0' for NUL bytes,
and move variable to the right block (the code was OK, but it is strange to
have 'char *value' defined in a different scope then 'size_t value_allocated').
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 15:06:15 +0000 (16:06 +0100)]
docs: document fuzzer variables
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 15:01:50 +0000 (16:01 +0100)]
fuzz-main: allow the number of runs to be overridden
This is useful when debugging.
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 14:16:18 +0000 (15:16 +0100)]
sd-bus: fix memleak in failure path in bus_match_parse()
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 16:10:53 +0000 (17:10 +0100)]
fuzz-bus-match: add example from bugzilla#
1935084
The fuzzer seems to have no trouble with this sample. It seems that the
problem reported in the bug is not caused by the match parsing code. But
let's add the sample just in case.
https://bugzilla.redhat.com/show_bug.cgi?id=
1935084
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 20:29:48 +0000 (21:29 +0100)]
fuzz-bus-match: new fuzzer
This fuzzer is based on test-bus-match. Even the initial corpus is
derived entirely from it.
https://bugzilla.redhat.com/show_bug.cgi?id=
1935084 shows an crash
in bus_match_parse(). I checked the coverage stats on oss-fuzz, and
sadly existing fuzzing did not cover this code at all.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 20:25:14 +0000 (21:25 +0100)]
test-bus-match: small modernization
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 20:22:47 +0000 (21:22 +0100)]
sd-bus: avoid alloc and missing oom check in bus_match_dump()
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 20:20:00 +0000 (21:20 +0100)]
sd-bus: let bus_match_dump() take an output file
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 20:19:02 +0000 (21:19 +0100)]
sd-bus: fix memstream buffer extraction
I'm getting the following error under valgrind:
==305970== Invalid free() / delete / delete[] / realloc()
==305970== at 0x483E9F1: free (vg_replace_malloc.c:538)
==305970== by 0x4012CD: mfree (alloc-util.h:48)
==305970== by 0x4012EF: freep (alloc-util.h:83)
==305970== by 0x4017F4: LLVMFuzzerTestOneInput (fuzz-bus-match.c:58)
==305970== by 0x401A58: main (fuzz-main.c:39)
==305970== Address 0x59972f0 is 0 bytes inside a block of size 8,192 free'd
==305970== at 0x483FCE4: realloc (vg_replace_malloc.c:834)
==305970== by 0x4C986F7: _IO_mem_finish (in /usr/lib64/libc-2.33.so)
==305970== by 0x4C8F5E0: fclose@@GLIBC_2.2.5 (in /usr/lib64/libc-2.33.so)
==305970== by 0x49D2CDB: fclose_nointr (fd-util.c:108)
==305970== by 0x49D2D3D: safe_fclose (fd-util.c:124)
==305970== by 0x4A4BCCC: fclosep (fd-util.h:41)
==305970== by 0x4A4E00F: bus_match_to_string (bus-match.c:859)
==305970== by 0x4016C2: LLVMFuzzerTestOneInput (fuzz-bus-match.c:58)
==305970== by 0x401A58: main (fuzz-main.c:39)
==305970== Block was alloc'd at
==305970== at 0x483FAE5: calloc (vg_replace_malloc.c:760)
==305970== by 0x4C98787: open_memstream (in /usr/lib64/libc-2.33.so)
==305970== by 0x49D56D6: open_memstream_unlocked (fileio.c:97)
==305970== by 0x4A4DEC5: bus_match_to_string (bus-match.c:859)
==305970== by 0x4016C2: LLVMFuzzerTestOneInput (fuzz-bus-match.c:58)
==305970== by 0x401A58: main (fuzz-main.c:39)
==305970==
So the fclose() which is called from _cleanup_fclose_ clearly reallocates the
buffer (maybe to save memory?). open_memstream(3) says:
The locations referred to by these pointers are updated each time the
stream is flushed (fflush(3)) and when the stream is closed (fclose(3)).
This seems to mean that we should close the stream first before grabbing the
buffer pointer.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 13:40:55 +0000 (14:40 +0100)]
fuzz-bus-message: move sources to src/libsystemd/
There's also fuzz-bus-label, but despite the name, it tests code that is in
src/shared/, so it shouldn't move.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 13:35:46 +0000 (14:35 +0100)]
bus/bus-match: use "ret_" prefix for output parameters
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 13:33:42 +0000 (14:33 +0100)]
bus/bus-match: inline iterator variable declarations
Yu Watanabe [Sat, 6 Mar 2021 01:10:31 +0000 (10:10 +0900)]
format-table: fix potentail memleak and invalid-free
Yu Watanabe [Sat, 6 Mar 2021 01:12:55 +0000 (10:12 +0900)]
fstab-generator: fix typo
Michal Sekletar [Thu, 4 Mar 2021 16:35:22 +0000 (17:35 +0100)]
udev: run link_update() with increased retry count in second invocation
In PR #17431 we have introduced retry loop in link_update() in order to
maximize the chance that we end up with correct target when there are
multiple contenders for given symlink.
Number of iterations in retry loop is either 1 or
LINK_UPDATE_MAX_RETRIES, depending on the value of 'initialized' db
flag. When device appears for the first time we need to set the
flag before calling link_update() via update_devnode() for the second
time to make sure we run the second invocation with higher retry loop
counter.
Yu Watanabe [Sat, 6 Mar 2021 02:28:38 +0000 (11:28 +0900)]
Merge pull request #18896 from poettering/no-localhost-ipv6
if ipv6 is turned off, don't synthesize localhost as ::1 ever
Frantisek Sumsal [Fri, 5 Mar 2021 22:20:45 +0000 (23:20 +0100)]
test: disable at_exit LSan check for dbus.service
When running integration tests under sanitizers D-Bus fails to
shutdown cleanly, causing unnecessary noise in the logs:
```
dbus-daemon[272]: ==272==LeakSanitizer has encountered a fatal error.
dbus-daemon[272]: ==272==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
dbus-daemon[272]: ==272==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
```
Since we're not "sanitizing" D-Bus anyway let's disable LSan's at_exit
check for the dbus.service to get rid of this error.
Luca Boccassi [Fri, 5 Mar 2021 20:19:44 +0000 (20:19 +0000)]
dissect: avoid overflow access by NULLSTR_FOREACH
NULLSTR_FOREACH expects two terminating NULs, but the joined string
for extension-release.d only had the canonical one.
Use a placeholder when joining and fix it manually.
Lennart Poettering [Fri, 5 Mar 2021 19:33:15 +0000 (20:33 +0100)]
socket-util: refuse "all" and "default" as valid ifnames
Let's avoid collisions with special sysctls.
Luca Boccassi [Fri, 5 Mar 2021 22:50:41 +0000 (22:50 +0000)]
Merge pull request #18875 from keszybz/localed-error
localed: return error when setting a non-installed keymap
ChopperRob [Fri, 5 Mar 2021 21:11:26 +0000 (22:11 +0100)]
Update 60-sensor.hwdb (#18884)
added support for the Lenovo IdeaPad D330-10IGM screen orientation
Lennart Poettering [Fri, 5 Mar 2021 17:47:10 +0000 (18:47 +0100)]
resolved: never return ::1 when localhost or local hostname is resolved while IPv6 is off in the kernel
Fixes: #18812
Lennart Poettering [Fri, 5 Mar 2021 19:37:24 +0000 (20:37 +0100)]
socket-util: add helper for checking if IPv6 is enabled
Lennart Poettering [Fri, 5 Mar 2021 17:46:31 +0000 (18:46 +0100)]
socket-util: cache result of socket_ipv6_is_supported()
And while we are at it, log about unexpected errors.
Lennart Poettering [Fri, 5 Mar 2021 19:39:58 +0000 (20:39 +0100)]
basic: move shared/sysctl-util.[ch] → basic/
This is self-contained ans allows us later to use the provided APIs from
other code in src/basic/
Lennart Poettering [Fri, 5 Mar 2021 19:34:16 +0000 (20:34 +0100)]
sysctl-util: use read_full_virtual_file() for reading sysctls
Given these files are part of procfs, let's use the correct API calls
for reading them.
This changes one occasion of read_one_line_file() to
read_full_virtual_file(), which superficially is a different thing, but
shouldn't actually be a difference, since sysctls can't be longer than
4K anyway, and the piecemeal logic behind read_one_line_file() cannot
work with the special semantics of procfs anyway.
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 17:02:28 +0000 (18:02 +0100)]
Drop some (size_t) casts
Upcasts of the same type are automatic, so no need for an explicit cast.
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 16:57:14 +0000 (17:57 +0100)]
Drop parens from around already-parenthesized defines
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 16:53:34 +0000 (17:53 +0100)]
network-wait-online: use sd_event_add_time_relative()
Zbigniew Jędrzejewski-Szmek [Fri, 5 Mar 2021 16:51:34 +0000 (17:51 +0100)]
Merge pull request #18852 from yuwata/tree-wide-use-UINT64_MAX
tree-wide: use UINT64_MAX or friends
Frantisek Sumsal [Fri, 5 Mar 2021 13:19:21 +0000 (14:19 +0100)]
Merge pull request #18885 from yuwata/udev-fix-import-program-rhbz-
1935062
udev: fix importing program result
Yu Watanabe [Fri, 5 Mar 2021 02:32:49 +0000 (11:32 +0900)]
test: add test for IMPORT{program}= udev rule
Yu Watanabe [Fri, 5 Mar 2021 09:36:04 +0000 (18:36 +0900)]
test: merge udev tests
Yu Watanabe [Fri, 5 Mar 2021 02:34:54 +0000 (11:34 +0900)]
Merge pull request #18873 from yuwata/use-config-parse-many-and-null-or-empty-path
tree-wide: use config_parse_many() and null_or_empty_path()
Yu Watanabe [Thu, 4 Mar 2021 08:51:25 +0000 (17:51 +0900)]
dhcp-server: also append specified additional options and vendor specific option on DHCP_OFFER
Fixes #15780.
Yu Watanabe [Fri, 5 Mar 2021 02:31:30 +0000 (11:31 +0900)]
udev: also not unescape command result on debug log
Yu Watanabe [Fri, 5 Mar 2021 00:37:24 +0000 (09:37 +0900)]
udev: do not unescape command result
This fixes a bug introduced by
28a5065149c31a8689738ddcd1100502371a7c34.
Fixes RHBZ#
1935062 (https://bugzilla.redhat.com/show_bug.cgi?id=
1935062).
Yu Watanabe [Fri, 5 Mar 2021 00:29:57 +0000 (09:29 +0900)]
strv: introduce strv_split_newlines_full()
Alastair Pharo [Fri, 5 Mar 2021 00:10:54 +0000 (11:10 +1100)]
hwdb: add fuzz for Dell Latitude E7470 (#18876)
Yu Watanabe [Thu, 4 Mar 2021 08:21:22 +0000 (17:21 +0900)]
install: use null_or_empty_path()
Yu Watanabe [Thu, 4 Mar 2021 08:25:22 +0000 (17:25 +0900)]
network: use null_or_empty_path()
This also drops unnecessary fseek().
Yu Watanabe [Thu, 4 Mar 2021 08:10:08 +0000 (17:10 +0900)]
udev/net: use null_or_empty_path()
Yu Watanabe [Thu, 4 Mar 2021 07:48:57 +0000 (16:48 +0900)]
udev/net: make .link files support drop-in config
Lennart Poettering [Thu, 4 Mar 2021 17:52:10 +0000 (18:52 +0100)]
copy: move sync_rights() to copy.c and rename copy_rights()
It's so similar to copy_access(), hence let's move it over and rename it
in similar style to the rest of the functions.
No change in behaviour, just moving things over.
Lennart Poettering [Mon, 1 Feb 2021 16:50:56 +0000 (17:50 +0100)]
copy: simplify error paths when creating temporary files
Yu Watanabe [Wed, 3 Mar 2021 04:40:28 +0000 (13:40 +0900)]
efi: introduce UINT32_MAX and UINT64_MAX
Yu Watanabe [Wed, 3 Mar 2021 04:07:10 +0000 (13:07 +0900)]
tree-wide: use UINT64_MAX or friends
Yu Watanabe [Wed, 3 Mar 2021 05:01:02 +0000 (14:01 +0900)]
table: drop last SIZE_MAX from table_set_sort() and table_set_display()
Yu Watanabe [Wed, 3 Mar 2021 03:56:52 +0000 (12:56 +0900)]
tree-wide: use usec_add() and usec_sub_unsigned()
Yu Watanabe [Thu, 4 Mar 2021 07:38:18 +0000 (16:38 +0900)]
journal: make namespace invocation also support drop-in config
Lennart Poettering [Thu, 4 Mar 2021 15:23:46 +0000 (16:23 +0100)]
run: tweak algorithm for generating unit name from dbus unique name
This reverts behaviour of systemd-run's unit name generation to the
status quo ante of #18871: we chop off the ":1." prefix if we can.
However, to address the issue that the unique name can overrun we then
do what #18871 did as fallback: only chop off the ":" prefix.
This way we should have pretty names that look like they always looked
in the common case, but in the case of a unique name overrun we still
will have names that work.
Follow-up for #18871
Lennart Poettering [Thu, 4 Mar 2021 15:03:07 +0000 (16:03 +0100)]
rm-rf: fix up chmod in the _cleanup_ rm_rf() destructors
REMOVE_CHMOD is necessary to remove files/dirs that are owned by us but
have an access mode that would not allow us to remove them. In generic
destructor calls for use with `_cleanup_` that are "fire-and-forget"
style we should make use of that, to maximize the chance we can actually
remove the files/dirs.
(Also, add in REMOVE_MISSING_OK. Just because prettier, we ignore the
return codes anyway, but it' a bit nicer to ignore a bit fewer errors.)
Lennart Poettering [Wed, 3 Mar 2021 16:28:09 +0000 (17:28 +0100)]
man: document how to use --network-interface= during boot
Fixes: #18793
Lennart Poettering [Thu, 4 Mar 2021 14:59:46 +0000 (15:59 +0100)]
fileio: minor read_full_stream_full() optimization
If we shall read as much of a file/stream as we can, then it makes sense
to use the full malloc()ed memory, not just the part we asked for.
Lennart Poettering [Thu, 4 Mar 2021 17:04:28 +0000 (18:04 +0100)]
Merge pull request #18615 from xry111/private-ipc-1
New directives PrivateIPC and IPCNamespacePath
caoxia [Thu, 28 Jan 2021 12:50:08 +0000 (20:50 +0800)]
trans_time sec is int32,it will overflow if local system time is later than 2038.
Lennart Poettering [Thu, 4 Mar 2021 16:23:17 +0000 (17:23 +0100)]
Merge pull request #18840 from yuwata/libudev-monitor-tiny-cleanup
io-util: introduce ppoll_usec()
Lennart Poettering [Thu, 4 Mar 2021 15:06:06 +0000 (16:06 +0100)]
install: include OS headers before our own definition
Doesn't matter much, but matches more our usual coding style where our
definition are done after all headers provided by the OS are included.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 11:25:59 +0000 (12:25 +0100)]
Merge pull request #18773 from yuwata/network-move-several-functions
network: move several functions
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 10:52:25 +0000 (11:52 +0100)]
shared/kbd-util: simplify suffix stripping
It only came to me now that this can be prettified.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 10:27:05 +0000 (11:27 +0100)]
localed: refuse to set a keymap which is not installed
In https://bugzilla.redhat.com/show_bug.cgi?id=
1933873 a keymap was set without
the package that provides it being installed (it2 is in kbd-legacy, which is
not installed by default). Setting a non-installed keymap is problematic,
because it results in nasty failures afterward (*). So let's to the same as
e.g. for locale data, and refuse a setting if the definition doesn't exists in
the filesystem.
The implementation using nftw() is not the most efficient, but I think it's OK
in this case. This is definitely not in any kind of hot path, and I prefer not
to duplicate the filename manipulation logic in a second function.
(*) If the keymap is not found, vconsole-setup.service will fail.
dracut-cmdline-ask.service has Requires=vconsole-setup.service, so it will also
fail, and this breaks boot. dracut-cmdline-ask.service having a hard dependency
is appropriate though: we sadly don't display what the keymap is, and with a wrong
keymap, any attempts to enter a password are likely to fail.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 09:50:32 +0000 (10:50 +0100)]
shared/kbd-util: return error on resource errors
I guess we should still not fail on failure to access a directory and such.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 09:42:53 +0000 (10:42 +0100)]
shared/kbd-util: fix return value confusion with nftw()
We would return a real error sometimes from the callback, and FTW_STOP other
times. Because of FTW_ACTIONRETVAL, everything except FTW_STOP would be
ignored. I don't think using FTW_ACTIONRETVAL is useful.
nftw() can only be used meaningfully with errno. Even if we return a proper
value ourselves from the callback, it will be propagated as a return value from
nftw(), but there is no way to distinguish this from a value generated by
nftw() itself, which is -1/-EPERM on error. So let's set errno ourselves so the
caller can at least look at that.
The code still ignores all errors.
Anita Zhang [Thu, 4 Mar 2021 01:25:40 +0000 (17:25 -0800)]
run: update dbus unique names check
Some code in systemd-run checks that a bus's unique name must start with
`:1.`. However the dbus specification on unique connection names only specifies
that it must begin with a colon. And the freedesktop/dbus implementation allows
allows unique names to go up to `:INT_MAX.INT_MAX`. So update the
current check to only look for a colon at the beginning.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 08:39:29 +0000 (09:39 +0100)]
Move basic/kbd-util to shared/
It is (or should be used) in localectl, localed, and a few other places,
no reason to keep it in basic/.
Zbigniew Jędrzejewski-Szmek [Wed, 3 Mar 2021 23:36:24 +0000 (00:36 +0100)]
core: fix mtime calculation of dropin files
Nominally, the bug was in unit_load_dropin(), which just took the last mtime
instead of calculating the maximum. But instead of adding code to wrap the
loop, this patch goes in the other direction.
All (correct) callers of config_parse() followed a very similar pattern to
calculate the maximum mtime. So let's simplify things by making config_parse()
assume that mtime is initialized and update it to the maximum. This makes all
the callers that care about mtime simpler and also fixes the issue in
unit_load_dropin().
config_parse_many_nulstr() and config_parse_many() are different, because it
makes sense to call them just once, and current ret_mtime behaviour make sense.
Fixes #17730, https://bugzilla.redhat.com/show_bug.cgi?id=
1933137.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Mar 2021 00:09:42 +0000 (01:09 +0100)]
coredumpctl: show container hostame
Fixes #18321. I don't see any point in showing the hostname in
_HOSTNAME: it's either the same as COREDUMP_HOSTNAME or irrelevant.
Yu Watanabe [Thu, 4 Mar 2021 05:51:10 +0000 (14:51 +0900)]
Merge pull request #18864 from poettering/fsync-tweaks
make sure fsync_directory_of_file() + fsync_full() work on more inode types reasonably
Lennart Poettering [Tue, 26 Jan 2021 15:47:07 +0000 (16:47 +0100)]
rm-rf: fstatat() might fail if containing dir has limited access mode, patch that too
Lennart Poettering [Mon, 1 Feb 2021 16:11:26 +0000 (17:11 +0100)]
fs-util: when opening arbitrary inodes, better use O_NONBLOCK
In case this is a device node where opening might block.
Lennart Poettering [Wed, 6 Jan 2021 14:50:14 +0000 (15:50 +0100)]
gpt: generalize validator for GPT partition labels
This adds a proper validator function.
No change in behaviour, just some minor refactoring (this should be
useful elsewhere later on though)
Lennart Poettering [Mon, 1 Feb 2021 16:04:47 +0000 (17:04 +0100)]
fs-util: port open_parent() to path_extract_directory()
Hela Basa [Wed, 3 Mar 2021 20:54:21 +0000 (21:54 +0100)]
po: Added translation using Weblate (Sinhala)
Co-authored-by: Hela Basa <r45xveza@pm.me>
Yu Watanabe [Tue, 2 Mar 2021 19:11:45 +0000 (04:11 +0900)]
tree-wide: use ppoll_usec()
Yu Watanabe [Tue, 2 Mar 2021 18:55:22 +0000 (03:55 +0900)]
io-util: introduce ppoll_usec() helper function
Yu Watanabe [Tue, 2 Mar 2021 08:17:16 +0000 (17:17 +0900)]
libudev: shorten code a bit
fd_wait_for_event() or ppoll() does not return -EAGAIN.
Lennart Poettering [Fri, 26 Feb 2021 21:44:39 +0000 (22:44 +0100)]
fs-util: handle gracefully if fsync_full() is called on block devices and such
Lennart Poettering [Wed, 3 Feb 2021 19:40:40 +0000 (20:40 +0100)]
fs-util: allow fsync_directory_of_file() on directories too
(in which case the parent dir is synced)
Xℹ Ruoyao [Wed, 3 Mar 2021 16:08:09 +0000 (00:08 +0800)]
Remount /dev/mqueue in unshared mount namespace for PrivateIPC
Xℹ Ruoyao [Tue, 16 Feb 2021 15:58:56 +0000 (23:58 +0800)]
New directives PrivateIPC and IPCNamespacePath
Xℹ Ruoyao [Tue, 16 Feb 2021 12:49:15 +0000 (20:49 +0800)]
Refactor network namespace specific functions in generic helpers
Xℹ Ruoyao [Tue, 16 Feb 2021 12:58:03 +0000 (20:58 +0800)]
fuzz: add NetworkNamespacePath= into directives.service
Vincent Pelletier [Sat, 27 Feb 2021 00:17:06 +0000 (00:17 +0000)]
rules: Move ID_SMARTCARD_READER definition to a <70 configuration.
70-uaccess.rules sets the uaccess tag on devices with ID_SMARTCARD_READER
set, but it is set in 99-systemd.rules .
Move this to a 60-*.rules which already matches USB CCID class, factorising
the matching, so 70-uaccess.rules sets up these devices as expected.