Luca Boccassi
1092e82bb7
core: append LogExtraFields= values to log_unit* messages
...
This ensure messages from PID1 regarding a unit also contain those
fields. For example, portable services have PORTABLE=<image> as
extra fields, which is useful to identify which version of a portable
image produced a log message like an error or an oomd kill.
2023-03-14 16:38:23 +00:00
Luca Boccassi
2461943b84
log: add iov helpers for log_context
2023-03-14 16:37:03 +00:00
Lennart Poettering
97cff6cd5f
userbd: manager doesn't actually use varlink, only workers do
2023-03-13 22:43:25 +00:00
Yu Watanabe
a6ca54ed94
man: add missing tags in udevadm(8)
2023-03-13 19:29:58 +00:00
Topi Miettinen
7a114ed4b3
execute: use prctl(PR_SET_MDWE) for MemoryDenyWriteExecute=yes
...
On some ARM platforms, the dynamic linker could use PROT_BTI memory protection
flag with `mprotect(..., PROT_BTI | PROT_EXEC)` to enable additional memory
protection for executable pages. But `MemoryDenyWriteExecute=yes` blocks this
with seccomp filter denying all `mprotect(..., x | PROT_EXEC)`.
Newly preferred method is to use prctl(PR_SET_MDWE) on supported kernels. Then
in-kernel implementation can allow PROT_BTI as necessary, without weakening
MDWE. In-kernel version may also be extended to more sophisticated protections
in the future.
2023-03-13 18:44:36 +00:00
Yu Watanabe
cbcdc582f3
Merge pull request #26749 from DaanDeMeyer/more-cleanups
...
execute: Some modernizations
2023-03-14 03:34:37 +09:00
Franck Bui
07e0ffc823
conf: replace config_parse_many_nulstr() with config_parse_config_file()
...
All daemons use a similar scheme to read their main config files and theirs
drop-ins. The main config files are always stored in /etc/systemd directory and
it's easy enough to construct the name of the drop-in directories based on the
name of the main config file.
Hence the new helper does that internally, which allows to reduce and simplify
the args passed previously to config_parse_many_nulstr().
Besides the overall code simplification it results:
16 files changed, 87 insertions(+), 159 deletions(-)
it allows to identify clearly the locations in the code where configuration
files are parsed.
2023-03-14 03:31:21 +09:00
Yu Watanabe
4fed028ae4
Merge pull request #26781 from mrc0mmand/tests-again
...
test: add a couple of tests for systemd-path
2023-03-14 03:27:45 +09:00
tofylion
dede07d3d0
hwdb: update 70-mouse.hwdb ( #26782 )
...
Add Logitech G502 X wired and wireless configurations with correct pid and vid.
2023-03-14 03:27:02 +09:00
Brett Holman
0a14f83a0e
network: ipv4acd: update MAC address on change ( #26753 )
...
Commit 76a86ffdbe added function
ipv4acd_update_mac() but invoked ipv4ll_update_mac(), which doesn't
align with debug or commit messages.
2023-03-14 00:21:30 +09:00
Daan De Meyer
80c7d4b8fa
man: Fix user generator output paths
...
These are all under $XDG_RUNTIME_DIR/systemd instead of directly
under $XDG_RUNTIME_DIR.
2023-03-13 13:51:48 +00:00
Daan De Meyer
13339577c3
namespace: Modernize shareable namespace functions
2023-03-13 13:07:32 +01:00
Daan De Meyer
1fe15cb7a9
dynamic-user: Revert back to using POSIX locks
...
unposix locks are shared between child and parent after fork() which
is precisely what we don't want in this case so revert back to POSIX
locks which are not shared between parent and child.
2023-03-13 13:06:42 +01:00
Daan De Meyer
846c9c12e7
lock-util: Add posix_lock()
...
POSIX locks with the same interface as flock().
2023-03-13 13:04:08 +01:00
Daan De Meyer
dcebb015fb
execute: Use log_unit_error_errno() instead of log_error_errno()
2023-03-13 12:33:11 +01:00
Yu Watanabe
d77d42ed3a
systemctl: refuse to acquire dbus connection with --global
...
Maybe, better to check the runtime scope each verb for better log
message, but this is a good start point to not trigger assertion.
Fixes oss-fuzz#56915 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56915 ).
Fixes #26402 and #26754 .
2023-03-13 12:27:34 +01:00
Frantisek Sumsal
8093693275
test: add a couple of tests for systemd-path
2023-03-13 11:59:18 +01:00
Luca Boccassi
560900be67
Merge pull request #26772 from yuwata/time-util-adjust-formattable-timestamp-max
...
time-util: adjust formattable timestamp max
2023-03-12 23:06:39 +00:00
OMOJOLA JOSHUA
cde4322b3a
added a unit test for a function in "argv-utils.c" ( #26760 )
...
* added a unit test for argv-utils.c
2023-03-12 23:03:52 +00:00
Yu Watanabe
cfacd245e7
test-time-util: do not fail on DST change
2023-03-13 04:43:51 +09:00
Yu Watanabe
37c6a3dc1a
time-util: add note about on DST change
2023-03-13 04:43:51 +09:00
Yu Watanabe
6bed374280
test: add more testcases for formatting/parsing timestamp
2023-03-13 04:43:51 +09:00
Yu Watanabe
bd5770da76
time-util: make USEC_TIMESTAMP_FORMATTABLE_MAX for 32bit system off by one day
...
As the same reason why we take one day off for 64bit case.
This also makes both upper bounds always defined for testing.
2023-03-13 04:43:19 +09:00
Yu Watanabe
af339540ec
Merge pull request #26775 from DaanDeMeyer/ext-default
...
mkfs-util: Always use "default" usage type for ext filesystems
2023-03-13 04:04:09 +09:00
Yu Watanabe
a23561293b
Merge pull request #26776 from YHNdnzj/edit-util-more-cleanup
...
edit-util: some more cleanups
2023-03-13 04:01:02 +09:00
Mike Yuan
78e3200354
edit-util: include the correct header
2023-03-13 01:44:51 +08:00
Mike Yuan
978e222f72
edit-util: rename trim_edit_marker to strip_edit_temp_file
...
with some minor cleanups
2023-03-13 00:44:34 +08:00
Mike Yuan
52073ba247
edit-util: always create temp file
...
even if neither original_path nor comment_paths is specified.
2023-03-13 00:41:11 +08:00
Mike Yuan
8992667fef
edit-util: minor cleanups
...
Reuse unlink_and_free() and avoid unnecessary
call to rmdir()
2023-03-13 00:40:15 +08:00
Daan De Meyer
49f2e129f8
mkfs-util: Redirect mkfs.vfat stdout to /dev/null
...
mkfs.vfat does not have a --quiet option so let's redirect its
stdout to /dev/null instead.
2023-03-12 16:20:38 +01:00
Daan De Meyer
2417fa8ef5
mkfs-util: Don't explicitly enable has_journal for ext3/ext4
...
It's enabled by default anyway and removing it allows merging the ext
conditionals into one.
2023-03-12 15:36:08 +01:00
Daan De Meyer
59c3c195f4
mkfs-util: Always use "default" usage type for ext filesystems
...
If no usage type is explicitly specified, ext will choose one based
on the filesystem size. Let's override this and always use the
"default" usage type so that we can create filesystems that are
initially small but might grow later without opting in to the "small"
usage type.
2023-03-12 15:15:35 +01:00
Mike Yuan
7d28e496e8
Merge pull request #26756 from yuwata/edit-util-cleanups
...
edit-util: several cleanups
2023-03-12 19:23:19 +08:00
Yu Watanabe
5654a4f9c5
sd-boot: fix incompatible type
...
Fixes the following build error:
```
../src/boot/efi/vmm.c: In function ‘get_smbios_table’:
../src/boot/efi/vmm.c:217:24: error: incompatible types when returning type ‘_Bool’ but ‘const SmbiosHeader *’ was expected
217 | return false;
| ^~~~~
```
2023-03-12 19:49:16 +09:00
Yu Watanabe
0a742f3622
edit-util: unlink temporary file on failure
...
Addresses the suggestion
https://github.com/systemd/systemd/pull/26756#discussion_r1133078705 .
2023-03-11 22:20:54 +09:00
Yu Watanabe
aec8200b12
edit-util: fix potentical crash when no edit markers
...
This also makes trim_edit_markers() take EditFile as the argument.
2023-03-11 22:19:22 +09:00
Yu Watanabe
c629a5bc44
edit-util: make create_edit_temp_file() take EditFile as the argument
...
No functional changes, just refactoring.
2023-03-11 22:19:22 +09:00
Yu Watanabe
043db3400c
edit-util: make EditFile take reference of EditFileContext
...
No functional change, just preparation for later commits.
2023-03-11 22:19:22 +09:00
Yu Watanabe
321291d82b
systemctl-edit: invert one error check
2023-03-11 22:19:22 +09:00
Yu Watanabe
7a2a7f2c00
systemctl-edit: shorten code a bit
2023-03-11 22:19:22 +09:00
Daan De Meyer
9c34405241
mkosi: Update to latest
2023-03-11 13:55:41 +01:00
Yu Watanabe
c9501b03cd
Merge pull request #26641 from medhefgo/boot-elf2efi
...
boot: Drop gnu-efi / Add elf2efi.py
2023-03-11 17:15:01 +09:00
Yu Watanabe
91e07dd476
Merge pull request #26303 from YHNdnzj/edit-util
...
shared: add edit-util (part of which extracted from systemctl-edit)
2023-03-11 17:13:27 +09:00
Yu Watanabe
5b23987eaf
Merge pull request #26739 from ldv-alt/udevadm-verify
...
udevadm verify: introduce --root option
2023-03-11 17:12:57 +09:00
Yu Watanabe
dcbe37ca2f
Merge pull request #26752 from Foxboron/morten/fix-manpage
...
src: Fixup copy-paste error for terminal_urlify_man
2023-03-11 17:12:47 +09:00
Morten Linderud
9e60dc0daf
man: Fix pcrphase.service manvolnum from 1 to 8
2023-03-10 20:29:56 +01:00
Morten Linderud
6dadf31d61
src: Fixup copy-paste error for terminal_urlify_man
...
Signed-off-by: Morten Linderud <morten@linderud.pw >
2023-03-10 20:21:30 +01:00
Yu Watanabe
c3600c380a
generator: fix comment
2023-03-11 03:32:23 +09:00
Mike Yuan
f8970df54b
edit-util: several cleanups for run_editor
...
run_editor is now switched to heap allocation
for simplicity. The code for child is made into
an individual function for simpler error handling.
2023-03-11 02:02:51 +08:00
Mike Yuan
90c462bdd1
systemctl: edit: several cleanups
2023-03-11 02:02:44 +08:00