1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 21:55:36 +03:00
Commit Graph

61900 Commits

Author SHA1 Message Date
Franck Bui
2aba77057e journal: give the ability to enable/disable systemd-journald-audit.socket
Before this patch the only way to prevent journald from reading the audit
messages was to mask systemd-journald-audit.socket. However this had main
drawback that downstream couldn't ship the socket disabled by default (beside
the fact that masking units is not supposed to be the usual way to disable
them).

Fixes #15777
2023-01-11 17:18:57 +01:00
Zbigniew Jędrzejewski-Szmek
8112c91e48 github: use 'meson setup'
Meson started warning when 'setup' is not used:
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

Also add more quoting in output to make the message clearer.
2023-01-11 16:46:24 +01:00
Spindle Security
c9c35a3ffa hwdb: Add mount matrix for Linx 1020 2023-01-11 22:19:57 +09:00
Lennart Poettering
5596331a32
Merge pull request #26016 from poettering/base64mem-ret-fix
base64mem() return type fix
2023-01-11 13:57:03 +01:00
Lennart Poettering
5e476b8512 tree-wide: fix return value handling of base64mem()
This returns an ssize_t, not an int. On populare archs that's the
difference between 64bit and 32bit. hence, let's be more careful here,
and not silently drop half the bits on the ground by assigning the
return value to "int".

As noticed by @malikabhi05:

https://github.com/systemd/systemd/pull/24754#discussion_r1062903159
2023-01-11 10:46:08 +01:00
Lennart Poettering
a71e17f3e0 hexdecoct: modernize base64mem() variable naming a bit
Just some renaming addressing the fact we otherwise always call return
parameters "ret", and the local error variable "r".

no change in behaviour.
2023-01-11 10:46:08 +01:00
Luca Boccassi
fae081492e
Merge pull request #26014 from yuwata/network-l2tp-fixes
network: L2TP fixlets
2023-01-11 09:32:50 +00:00
Jan Janssen
c8add4c2e8 ukify: Fix tools detection if --tools was not passed
In 789a642738 llvm-objcopy was given
higher priority over objcopy, but this would only work if --tools was
also passed.
2023-01-11 09:29:41 +01:00
Lennart Poettering
833504f061
Merge pull request #25916 from poettering/reload-notify
pid1: add new Type=notify-reload service type for a service reload protocol based on SIGHUP
2023-01-11 09:23:47 +01:00
Yu Watanabe
bf4a5ac804 network/l2tp: parse address or address type from correct string
Fixes a bug introduced by 8b49ee2dcd.

Fixes #26011.
2023-01-11 13:20:14 +09:00
Yu Watanabe
4da53043a6 network/l2tp: fix error code in log message 2023-01-11 13:11:00 +09:00
Luca Boccassi
c32b049dfb
Merge pull request #25986 from yuwata/test-netlink
test-netlink: cleanups
2023-01-10 21:21:24 +00:00
Lennart Poettering
6fee784964 update TODO 2023-01-10 18:28:38 +01:00
Lennart Poettering
ee52bbc68f test: add Type=notify-reload testcase 2023-01-10 18:28:38 +01:00
Lennart Poettering
fd0f4da545 notify: add --stopping + --reloading switches
These wrap RELOADING=1 and STOPPING=1 messages. The former is
particularly useful, since we want to insert the MONOTONIC_USEC= field
into the message automatically, which is easy from C but harder from
shell.
2023-01-10 18:28:38 +01:00
Lennart Poettering
5d71e463f4 logind: implement Type=notify-reload protocol properly
So close already. Let's add the two missing notifications too.

Fixes: #18484
2023-01-10 18:28:38 +01:00
Lennart Poettering
f84331539d udevd: implement the full Type=notify-reload protocol
We are basically already there, just need to add MONOTONIC_USEC= to the
RELOADING=1 message, and make sure the message is generated in really
all cases.
2023-01-10 18:28:38 +01:00
Lennart Poettering
0e07cdb0e7 networkd: implement Type=notify-reload protocol 2023-01-10 18:28:38 +01:00
Lennart Poettering
dd0ab174c3 pid1: make sure we send our calling service manager RELOADING=1 when reloading
And send READY=1 again when we are done with it.

We do this not only for "daemon-reload" but also for "daemon-reexec" and
"switch-root", since from the perspective of an encapsulating service
manager these three operations are not that different.
2023-01-10 18:28:38 +01:00
Lennart Poettering
81e19b6f65 man: document Type=notify-reload 2023-01-10 18:28:38 +01:00
Lennart Poettering
3bd28bf721 pid1: add new Type=notify-reload service type
Fixes: #6162
2023-01-10 18:28:38 +01:00
Lennart Poettering
7fa49280bc manager: add one more assert() 2023-01-10 18:28:38 +01:00
Lennart Poettering
a6edc20fa6
Merge pull request #26003 from keszybz/efi-ifdefs
Fix one compile-time conditional and refactor SD_BOOT definition
2023-01-10 18:28:10 +01:00
Ludwig Nussel
2e76ca79b3 bootctl: honor $KERNEL_INSTALL_CONF_ROOT
Honor $KERNEL_INSTALL_CONF_ROOT for reading config files, as
kernel-install does.
2023-01-10 15:17:07 +01:00
Richard Phibel
cd48e23f6a core: add OpenFile setting 2023-01-10 15:16:26 +01:00
Daan De Meyer
81315baa68 ci: Remove a bunch of labels when a PR is merged 2023-01-10 14:52:53 +01:00
Lennart Poettering
9914ae6038 shutdown: don't close pipe fds.
Man, I royally screwed this one up! 😳

Fixes: #25998
2023-01-10 14:51:46 +01:00
Zbigniew Jędrzejewski-Szmek
9b87ccd4ab man: restore example formatting in systemd-coredump(8)
Fixup for 4f57f77267.
2023-01-10 14:32:25 +01:00
Daan De Meyer
68634c2665
Merge pull request #24939 from msizanoen1/journal-realtime-enforce-consistency
journal: enforce strict consistency for realtime timestamps on write
2023-01-10 14:30:53 +01:00
Zbigniew Jędrzejewski-Szmek
493cd5034c meson: use 0|1 for SD_BOOT
We converted to not using #ifdef for most of our defines because the syntax is
nicer and we are protected against typos and can set -Werror=undef. Let's do
the same for SD_BOOT. The define is nicely hidden in build.h for normal builds,
and for EFI builds we were already setting SD_BOOT on the commandline.
2023-01-10 14:25:57 +01:00
Zbigniew Jędrzejewski-Szmek
5deb391c6e fundamental: fix compile check for explicit_bzero
Our HAVE_* variables are defined to 0 or 1, so '#if defined(HAVE_*)' is always true.
The variable is not defined when compiling for EFI though, so we need the
additional guard.

Fixup for 3f92dc2fd4.

(I don't want to do something like add -DHAVE_EXPLICIT_BZERO=0 to the commandline
in src/efi/boot/meson.build, because this quite verbose. Our compilation commandlines
are very long already. Let's instead keep this localized in this one spot in the
source file.)x
2023-01-10 14:23:27 +01:00
Ludwig Nussel
5fe34dbfeb kernel-install: refactor some variables
In preparation for plugin support
2023-01-10 13:49:31 +01:00
Yu Watanabe
5ccbe7fb19 test-netlink: use dummy interface to test assigning new interface name
Fixes #25981.
2023-01-10 21:01:59 +09:00
Yu Watanabe
5afaf40712 shutdown: propagate the original errno
Follow-up for b293bb2316.
2023-01-10 12:06:49 +01:00
Kai-Chuan Hsieh
8d4f1337e8 hwdb: Mark Dell platform accel sensor location to base
Dell would like to disable screen rotation for the platform eternally.
Mark the aceel sensor location base to disable it.
2023-01-10 18:13:11 +09:00
drosdeck
6152de293a Fix Positivo MASTER-N1110 key toggle touchpad 2023-01-10 09:45:38 +01:00
Lennart Poettering
4afe2fb2f8
Merge pull request #25980 from yuwata/udev-fail-to-rename-netif
udev,pid1: gracefully handle failure in renaming network interface
2023-01-10 09:44:42 +01:00
Ulrich Ölmann
fe0bdcacd1 man: exec,nspawn: fix typo 2023-01-10 16:45:22 +09:00
Yu Watanabe
2d0d75b279 test: add tests for failure in renaming network interface 2023-01-10 14:25:20 +09:00
Yu Watanabe
e9336d6ac3 core/device: ignore failed uevents
When udevd failed to process the device, SYSTEMD_ALIAS or any other
properties may contain invalid values. Let's refuse to handle the uevent.
2023-01-10 14:25:20 +09:00
Yu Watanabe
58b0a3e511 core/device: downgrade log level for ignored errors 2023-01-10 14:25:20 +09:00
Yu Watanabe
eedfef0f0d sd-device: introduce device_get_property_int() 2023-01-10 14:25:20 +09:00
Yu Watanabe
210033847c udev: restore syspath and properties on failure
Otherwise, invalid sysname or properties may be broadcast to udev
listeners.
2023-01-10 14:25:16 +09:00
Lennart Poettering
b293bb2316 shutdown: propagate mount() failures from child to parent
Let's propagate the actual error code up, as we usual do.

Inspired by: #25168
2023-01-09 22:17:04 +01:00
Lennart Poettering
e29684a1ba
Merge pull request #25982 from mrc0mmand/curl-scheme
Fix build with the latest libcurl
2023-01-09 18:59:20 +01:00
Jan Janssen
3f92dc2fd4 boot: Simplify object erasure
This erase_obj() machinery looks like voodoo and creates an awful lot of
noise as soon as we get back to building with -O0. We can do this in a
more simple way by introducing a struct that holds the information we
need on cleanup. When building with optimization enabled, all this gets
inlined and the eraser vanishes.
2023-01-09 18:58:54 +01:00
msizanoen1
e18722375b journal: handle clock rollback error in managed_journal_file_open_reliably
-EREMCHG was introduced to denote a clock rollback detection error.
Handle this in managed_journal_file_open_reliably.
2023-01-09 23:05:19 +07:00
msizanoen1
9cd80d8a58 test-journal-flush: don't fail on -EREMCHG
-EREMCHG on write is now used to denote clock rollback conditions
detected during journal write.
2023-01-09 22:57:50 +07:00
msizanoen1
1d8d483f59 journal: enforce strict consistency for realtime timestamps on write
Ensure all realtime timestamps in a journal file are strictly
ordered on write as a defense-in-depth measure. All known callers of
journal_file_append_entry and journal_file_copy_entry, which call this
function, should be able to handle the error by rotating the journal.

This is especially helpful for systems with RTC local time enabled,
where all log entries from initramfs might be recorded as several hours
later than it actually is, which won't get caught by journald during log
flushing. In those cases, the resulting inconsistency can cause libsystemd
to loop infinitely through journal files as observed in
`abrt-dump-journal-oops`.
2023-01-09 22:57:30 +07:00
Frantisek Sumsal
e61a4c0b7c import: use CURLOPT_PROTOCOLS_STR with libcurl >= 7.85.0
CURLOPT_PROTOCOLS [0] was deprecated in libcurl 7.85.0 with
CURLOPT_PROTOCOLS_STR [1] as a replacement, causing build warnings/errors:

../build/src/import/curl-util.c: In function ‘curl_glue_make’:
../build/src/import/curl-util.c:255:9: error: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
  255 |         if (curl_easy_setopt(c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_FILE) != CURLE_OK)
      |         ^~
In file included from ../build/src/import/curl-util.h:4,
                 from ../build/src/import/curl-util.c:6:
/usr/include/curl/curl.h:1749:3: note: declared here
 1749 |   CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
      |   ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Since there's no grace period between the two symbols, let's resort
to a light if-def-ery to resolve this.

[0] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS.html
[1] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS_STR.html
2023-01-09 13:36:42 +01:00