]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
18 months agoMerge pull request #26820 from DaanDeMeyer/dir-fd-is-root
Daan De Meyer [Wed, 15 Mar 2023 11:48:14 +0000 (12:48 +0100)] 
Merge pull request #26820 from DaanDeMeyer/dir-fd-is-root

fd-util: Add dir_fd_is_root()

18 months agoAdd rebrands of Medion Akoya notebooks/tablets
bri [Sat, 11 Mar 2023 22:38:35 +0000 (17:38 -0500)] 
Add rebrands of Medion Akoya notebooks/tablets

18 months agoMerge pull request #26804 from fbuihuu/fixes-for-test-58-repart
Luca Boccassi [Wed, 15 Mar 2023 10:56:07 +0000 (10:56 +0000)] 
Merge pull request #26804 from fbuihuu/fixes-for-test-58-repart

Fixes for test 58 repart

18 months agofd-util: Add dir_fd_is_root() 26820/head
Daan De Meyer [Wed, 1 Feb 2023 12:14:29 +0000 (13:14 +0100)] 
fd-util: Add dir_fd_is_root()

18 months agomountpoint-util: Add path_get_mnt_id_at()
Daan De Meyer [Tue, 14 Mar 2023 21:00:11 +0000 (22:00 +0100)] 
mountpoint-util: Add path_get_mnt_id_at()

18 months agoMerge pull request #26825 from keszybz/log-message-fix
Luca Boccassi [Wed, 15 Mar 2023 10:49:35 +0000 (10:49 +0000)] 
Merge pull request #26825 from keszybz/log-message-fix

Log message fix

18 months agocore: fix "(null)" in output 26825/head
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 21:56:42 +0000 (22:56 +0100)] 
core: fix "(null)" in output

We want an empty string, not NULL. I made some brainfart here.
Fixup for 1980a25dc03aa500d4ee2725d696f68d265cd4ca.

18 months agocore: reduce scope of variable
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 15:52:18 +0000 (16:52 +0100)] 
core: reduce scope of variable

18 months agoMerge pull request #26800 from t-8ch/memfd_create
Lennart Poettering [Wed, 15 Mar 2023 08:28:09 +0000 (09:28 +0100)] 
Merge pull request #26800 from t-8ch/memfd_create

memfd: add support for exec flags

18 months agoMerge pull request #26794 from bluca/log_extra_fields
Lennart Poettering [Wed, 15 Mar 2023 08:27:47 +0000 (09:27 +0100)] 
Merge pull request #26794 from bluca/log_extra_fields

core: append LogExtraFields= values to log_unit* messages

18 months agocore: make the memory pressure cgroup path writable when ProtectControlGroups=yes
Luca Boccassi [Tue, 14 Mar 2023 20:12:33 +0000 (20:12 +0000)] 
core: make the memory pressure cgroup path writable when ProtectControlGroups=yes

The interface requires services to write to the cgroup file to activate notifications,
but with ProtectControlGroups=yes we make it read-only. Add a writable bind mount.

Follow-up for 6bb0084204bd93122c9f04391b80aea5a8a0ff08

18 months agotest: assume run-unit-tests.py and unit tests are installed in the same directory
Franck Bui [Thu, 26 Jan 2023 15:14:01 +0000 (16:14 +0100)] 
test: assume run-unit-tests.py and unit tests are installed in the same directory

This avoids hard coding the path of the directory where the unit tests are
installed.

18 months agotreewide: memfd_create: use exec flags 26800/head
Thomas Weißschuh [Tue, 14 Mar 2023 03:42:23 +0000 (03:42 +0000)] 
treewide: memfd_create: use exec flags

Use the flags MEMFD_EXEC or MEMFD_NOEXEC_SEAL as applicable.

These warnings instruct the kernel wether the memfd is executable or
not.

Without specifying those flags the kernel will emit the following
warning since version 6.3,
commit 105ff5339f49 ("mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC"):

    kernel: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=1 'systemd'

18 months agomemfd-util: add wrapper for memfd_create
Thomas Weißschuh [Tue, 14 Mar 2023 03:42:05 +0000 (03:42 +0000)] 
memfd-util: add wrapper for memfd_create

The wrapper removes the flags MFD_EXEC and MFD_NOEXEC_SEAL when running
on kernels not understanding those flags.

18 months agomissing: add memfd exec flags
Thomas Weißschuh [Mon, 13 Mar 2023 14:14:21 +0000 (14:14 +0000)] 
missing: add memfd exec flags

18 months agostub: Remove overlapping PE section warning
Jan Janssen [Tue, 14 Mar 2023 13:32:43 +0000 (14:32 +0100)] 
stub: Remove overlapping PE section warning

Now that we always create PE images with a non-zero image base we cannot
run into this issue anymore. Any tool that still uses the old hard-coded
section offsets will end up creating bad images with sections below the
image base. objcopy will warn about this and any PE loader will simply
refuse to load such an image. Meanwhile updated tools do not use
hard-coded offsets anymore.

18 months agoMerge pull request #26815 from keszybz/cgls-no-xattrs-by-default
Luca Boccassi [Wed, 15 Mar 2023 00:24:02 +0000 (00:24 +0000)] 
Merge pull request #26815 from keszybz/cgls-no-xattrs-by-default

Do not show xattrs and cgroup ids in cgls by default

18 months agoMerge pull request #26808 from keszybz/no-controllers-followup
Luca Boccassi [Wed, 15 Mar 2023 00:23:05 +0000 (00:23 +0000)] 
Merge pull request #26808 from keszybz/no-controllers-followup

Docs and dump output follow-up for the case of delegation with no controllers

18 months agomkfs-util: Redirect mksquashfs output to /dev/null
Daan De Meyer [Tue, 14 Mar 2023 13:32:37 +0000 (14:32 +0100)] 
mkfs-util: Redirect mksquashfs output to /dev/null

The -quiet option for mksquashfs was added somewhat recently so to
support older versions, let's redirect stdout of mksquashfs to
/dev/null instead.

18 months agoMerge pull request #26683 from YHNdnzj/systemctl-shutdown-when
Luca Boccassi [Wed, 15 Mar 2023 00:19:50 +0000 (00:19 +0000)] 
Merge pull request #26683 from YHNdnzj/systemctl-shutdown-when

systemctl: add --when for scheduled poweroff/halt/reboot/kexec support

18 months agosrc: changed instances of sd_bus_call_method() to bus_call_method() (#26819)
OMOJOLA JOSHUA [Wed, 15 Mar 2023 00:12:57 +0000 (01:12 +0100)] 
src: changed instances of sd_bus_call_method() to bus_call_method() (#26819)

* src: changed instances of sd_bus_call_method() to bus_call_method()

18 months agoupdate TODO
Lennart Poettering [Tue, 14 Mar 2023 21:36:14 +0000 (22:36 +0100)] 
update TODO

18 months agodissect: make all paths we operation on absolute
Lennart Poettering [Mon, 13 Mar 2023 12:09:46 +0000 (13:09 +0100)] 
dissect: make all paths we operation on absolute

Let's avoid any ambiguities around paths, and make them absolute when
accepting them, like we do in most our tools now. This makes us
independent of the current working directory and allows us to change it
without issues or pass around the paths elsewhere if need be.

18 months agocore: fix mount flag help output, it only takes one argument
Lennart Poettering [Tue, 14 Mar 2023 10:03:48 +0000 (11:03 +0100)] 
core: fix mount flag help output, it only takes one argument

18 months agodissect: mark UID/GIDs that are surprising in DDIs with colors
Lennart Poettering [Tue, 14 Mar 2023 10:04:46 +0000 (11:04 +0100)] 
dissect: mark UID/GIDs that are surprising in DDIs with colors

DDIs should not contain files owned by dynamic users or the nobody
users. Let's subtly highlight those entries in mtree output.

18 months agocgls: add -x and -c options 26815/head
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 16:58:08 +0000 (17:58 +0100)] 
cgls: add -x and -c options

-x is short for --xattrs=yes and
-c is short for --cgroup-id=yes.

18 months agocgls: stop showing cgroup ids and xattrs by default
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 16:51:24 +0000 (17:51 +0100)] 
cgls: stop showing cgroup ids and xattrs by default

Those are rather specialized bits of information, useful mostly for debugging.
I use cgls quite often but never had the need to use either of those…
But they take up a significant amount of screen real estate, esp. when
executed as root:

-.slice
├─user.slice (#1683)
│ → user.invocation_id: 74b0bd1258c5485eb969016384e0d06a
│ → trusted.invocation_id: 74b0bd1258c5485eb969016384e0d06a
│ └─user-1000.slice (#6488)
│   → user.invocation_id: b0261a14fe74490d9a9d5266c52cceb6
│   → trusted.invocation_id: b0261a14fe74490d9a9d5266c52cceb6
│   ├─user@1000.service … (#6590)
│   │ → user.invocation_id: 9e1fb54ad07940d8b92c33c81d169f11
│   │ → user.delegate: 1
│   │ → trusted.invocation_id: 9e1fb54ad07940d8b92c33c81d169f11
│   │ → trusted.delegate: 1
│   │ ├─session.slice (#6874)
...

Let's not show them by default, so we can show more cgroups.

(Also, on a terminal, we already highlight delegate units via underlining and
an ellipsis, so 'user.delegate:1' is redundant.)

18 months agocgtop: drop counterproductive bitfields
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 16:24:43 +0000 (17:24 +0100)] 
cgtop: drop counterproductive bitfields

The variable after the bitfields has 8 byte alignment, so we weren't saving any
memory, but the code to serve the bitfields was more complicated.

18 months agocgtop: split out the main loop into a separate function
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 16:24:07 +0000 (17:24 +0100)] 
cgtop: split out the main loop into a separate function

This way the initial setup is nicely separated from the main loop logic.

18 months agocore: append LogExtraFields= values to log_unit* messages 26794/head
Luca Boccassi [Mon, 13 Mar 2023 21:34:37 +0000 (21:34 +0000)] 
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.

18 months agolog: add iov helpers for log_context
Luca Boccassi [Mon, 13 Mar 2023 21:33:58 +0000 (21:33 +0000)] 
log: add iov helpers for log_context

18 months agomanager: in dump, show no controllers as "(none)" 26808/head
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 11:35:33 +0000 (12:35 +0100)] 
manager: in dump, show no controllers as "(none)"

https://github.com/systemd/systemd/commit/7b3693e4e4c9cae50fca65136278a62fae11327e#r103711181

18 months agoman: document "Delegate=" a bit more
Zbigniew Jędrzejewski-Szmek [Tue, 14 Mar 2023 11:27:37 +0000 (12:27 +0100)] 
man: document "Delegate=" a bit more

This case is a bit surprising, even if logical if one understands how the
parser works. Let's be more explicit.

Follow-up for 7b3693e4e4c9cae50fca65136278a62fae11327e.

18 months agotest-time-util: add test cases to invalidate "show" and "cancel" 26683/head
Mike Yuan [Mon, 13 Mar 2023 23:16:18 +0000 (07:16 +0800)] 
test-time-util: add test cases to invalidate "show" and "cancel"

Ensure that systemctl reboot --when=show and --when=cancel will not result in ambiguities

18 months agosystemctl: add option --when for scheduled shutdown
Mike Yuan [Sun, 5 Mar 2023 15:27:44 +0000 (23:27 +0800)] 
systemctl: add option --when for scheduled shutdown

Pass an empty string or "cancel" will cancel the action.
Pass "show" will show the scheduled actions.

Replaces #17258

18 months agosystemctl: logind: make logind_schedule_shutdown accept action as param
Mike Yuan [Sun, 5 Mar 2023 15:11:48 +0000 (23:11 +0800)] 
systemctl: logind: make logind_schedule_shutdown accept action as param

18 months agosystemctl: logind: add missing asserts
Mike Yuan [Mon, 13 Mar 2023 22:56:17 +0000 (06:56 +0800)] 
systemctl: logind: add missing asserts

18 months agoMerge pull request #26662 from yuwata/test-execute-network-namespace-path
Daan De Meyer [Tue, 14 Mar 2023 10:16:15 +0000 (11:16 +0100)] 
Merge pull request #26662 from yuwata/test-execute-network-namespace-path

test-execute: add tests for NetworkNamespacePath=

18 months agotests: don't use absolute paths when installing binaries in TEST-58-REPART 26804/head
Franck Bui [Tue, 14 Mar 2023 09:08:11 +0000 (10:08 +0100)] 
tests: don't use absolute paths when installing binaries in TEST-58-REPART

Let image_install figures the binary paths out itself as not all distributions
ship the mkfs.* tools in the same location. For example openSUSE ships
mksquashfs in /usr/bin/.

18 months agotests: fix inverted condition in testsuite-58.sh
Franck Bui [Tue, 14 Mar 2023 09:06:39 +0000 (10:06 +0100)] 
tests: fix inverted condition in testsuite-58.sh

18 months agohwdb: 60-keyboard.hwdb: Fix modalias for Thinkpad X200 Tablet (#26795)
EinBaum [Tue, 14 Mar 2023 08:41:21 +0000 (10:41 +0200)] 
hwdb: 60-keyboard.hwdb: Fix modalias for Thinkpad X200 Tablet (#26795)

This fixes the tablet buttons on the Thinkpad X200 Tablet.
My Lenovo ThinkPad X200 Tablet is called "ThinkPadX200T" instead of "ThinkPadX200Tablet":
```
$ cat /sys/devices/virtual/dmi/id/modalias
dmi:bvnLENOVO:bvr7WET71WW(3.21):bd11/29/2012:br3.33:efr1.6:svnLENOVO:pn7453WVK:pvrThinkPadX200T:rvnLENOVO:rn7453WVK:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:sku:
```
This patch makes both strings work correctly to support the extra tablet keys.

18 months agotest-process-util: port to detach_mount_namespace()
Lennart Poettering [Mon, 13 Mar 2023 14:22:38 +0000 (15:22 +0100)] 
test-process-util: port to detach_mount_namespace()

18 months agoMerge pull request #26767 from yuwata/udev-rule-rework-logging
Yu Watanabe [Tue, 14 Mar 2023 04:14:49 +0000 (13:14 +0900)] 
Merge pull request #26767 from yuwata/udev-rule-rework-logging

udev-rule: rework logging about udev rules

18 months agopo: Translated using Weblate (Punjabi)
A S Alam [Tue, 14 Mar 2023 02:20:31 +0000 (03:20 +0100)] 
po: Translated using Weblate (Punjabi)

Currently translated at 6.2% (12 of 193 strings)

Co-authored-by: A S Alam <amanpreet.alam@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pa/
Translation: systemd/main

18 months agonamespace-util: set mounts back to MS_SHARED in detach_mount_namespace()
Lennart Poettering [Mon, 13 Mar 2023 14:16:55 +0000 (15:16 +0100)] 
namespace-util: set mounts back to MS_SHARED in detach_mount_namespace()

For nspawn and services we first turn off two-way propagation of mounts
from host to sandbox via MS_SLAVE, and then set MS_SHARED again, so that
we create a new mount prop peer group again, and that we provide
behaviour similar to what we provide on the host further down the tree.

Let's do the same in detach_mount_namespace(), which we use for the
temporary mounts in the implementation of --image= in various tools.

This doesn't fix any immediate issue, but ensures we expose somewhat
systematic behaviour: whenever we detach mount namespaces we always set
things back to MS_SLAVE in the child.

18 months agocore: rename "mount_flags" → "mount_propagation_flag" internally where appropriate
Lennart Poettering [Mon, 13 Mar 2023 14:14:11 +0000 (15:14 +0100)] 
core: rename "mount_flags" → "mount_propagation_flag" internally where appropriate

ExecContext has a field that controls the mount propagation flag of the
mounts in the resulting namespace. This is exposed as "MountFlags="
which is super confusing, as it suggests one could control more than
propagation, and that it was actually a flags field. It's an enum
though only, and nothing else.

We might want to rename this externally one day, but given the compat
kludges this requires and the fact this is somewhat nichey it might not
be worth it. But internally let's rename it, as it makes things much
easier to grok, in particular as part of the codebase already exposed
the concept as mount_propagation_flag.

No actual code flow changes, just some renaming.

18 months agonamespace: use ERRNO_IS_PRIVILEGE()/ERRNO_IS_NOT_SUPPORTED() where appropriate
Lennart Poettering [Mon, 13 Mar 2023 14:19:56 +0000 (15:19 +0100)] 
namespace: use ERRNO_IS_PRIVILEGE()/ERRNO_IS_NOT_SUPPORTED() where appropriate

18 months agotest: testsuite-26: remove duplicate source
Mike Yuan [Mon, 13 Mar 2023 18:01:43 +0000 (02:01 +0800)] 
test: testsuite-26: remove duplicate source

18 months agouserbd: manager doesn't actually use varlink, only workers do
Lennart Poettering [Tue, 7 Mar 2023 21:51:23 +0000 (22:51 +0100)] 
userbd: manager doesn't actually use varlink, only workers do

18 months agoman: add missing tags in udevadm(8)
Yu Watanabe [Mon, 13 Mar 2023 17:53:09 +0000 (02:53 +0900)] 
man: add missing tags in udevadm(8)

18 months agoexecute: use prctl(PR_SET_MDWE) for MemoryDenyWriteExecute=yes
Topi Miettinen [Sun, 6 Nov 2022 19:12:45 +0000 (21:12 +0200)] 
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.

18 months agoMerge pull request #26749 from DaanDeMeyer/more-cleanups
Yu Watanabe [Mon, 13 Mar 2023 18:34:37 +0000 (03:34 +0900)] 
Merge pull request #26749 from DaanDeMeyer/more-cleanups

execute: Some modernizations

18 months agoconf: replace config_parse_many_nulstr() with config_parse_config_file()
Franck Bui [Fri, 27 Jan 2023 10:32:27 +0000 (11:32 +0100)] 
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.

18 months agoMerge pull request #26781 from mrc0mmand/tests-again
Yu Watanabe [Mon, 13 Mar 2023 18:27:45 +0000 (03:27 +0900)] 
Merge pull request #26781 from mrc0mmand/tests-again

test: add a couple of tests for systemd-path

18 months agohwdb: update 70-mouse.hwdb (#26782)
tofylion [Mon, 13 Mar 2023 18:27:02 +0000 (18:27 +0000)] 
hwdb: update 70-mouse.hwdb (#26782)

Add Logitech G502 X wired and wireless configurations with correct pid and vid.

18 months agonetwork: ipv4acd: update MAC address on change (#26753)
Brett Holman [Mon, 13 Mar 2023 15:21:30 +0000 (09:21 -0600)] 
network: ipv4acd: update MAC address on change (#26753)

Commit 76a86ffdbee2dd9ef0f2b5338e14eb6ba7671456 added function
ipv4acd_update_mac() but invoked ipv4ll_update_mac(), which doesn't
align with debug or commit messages.

18 months agoman: Fix user generator output paths
Daan De Meyer [Mon, 13 Mar 2023 10:26:06 +0000 (11:26 +0100)] 
man: Fix user generator output paths

These are all under $XDG_RUNTIME_DIR/systemd instead of directly
under $XDG_RUNTIME_DIR.

18 months agoudevadm-verify: fix indentation of help message 26767/head
Yu Watanabe [Mon, 13 Mar 2023 12:30:44 +0000 (21:30 +0900)] 
udevadm-verify: fix indentation of help message

18 months agoudevadm: enable colorized logging
Yu Watanabe [Mon, 13 Mar 2023 12:20:29 +0000 (21:20 +0900)] 
udevadm: enable colorized logging

18 months agoudev-rules: inline rule_line_append_token()
Yu Watanabe [Mon, 13 Mar 2023 10:31:40 +0000 (19:31 +0900)] 
udev-rules: inline rule_line_append_token()

18 months agoudev-rules: modernize free functions
Yu Watanabe [Mon, 13 Mar 2023 10:31:20 +0000 (19:31 +0900)] 
udev-rules: modernize free functions

18 months agoudev-rules: do not set 'issues' tag when applying rules to event device
Yu Watanabe [Mon, 13 Mar 2023 11:43:27 +0000 (20:43 +0900)] 
udev-rules: do not set 'issues' tag when applying rules to event device

The tagging is used by `udevadm verify` and the command only parses
udev rules but not apply them.

18 months agoudev-rules: introduce log_event_truncated() helper function
Yu Watanabe [Mon, 13 Mar 2023 12:10:49 +0000 (21:10 +0900)] 
udev-rules: introduce log_event_truncated() helper function

18 months agoudev-rule: rework logging about udev rules
Yu Watanabe [Mon, 13 Mar 2023 11:57:50 +0000 (20:57 +0900)] 
udev-rule: rework logging about udev rules

This makes the loggers take the most relevant object, i.e. when
applying udev rules to a device, the loggers take sd_device and
UdevRuleToken object, and when parsing udev rules, they take
UdevRuleLine or UdevRuleFile object.

To achieve that, this drops 'iterators' in UdevRules or friends named
`current_file` or so. Instead of that, each object now has its
parent object, e.g. UdevRuleToken.rule_line that references the
UdevRuleLine object the token belonging to. And each function previously
took UdevRules object now takes the most relevant object, e.g. UdevRuleToken.

Solves the discussion in https://github.com/systemd/systemd/pull/26698#discussion_r1129261193.

18 months agonamespace: Modernize shareable namespace functions 26749/head
Daan De Meyer [Wed, 8 Mar 2023 14:30:19 +0000 (15:30 +0100)] 
namespace: Modernize shareable namespace functions

18 months agodynamic-user: Revert back to using POSIX locks
Daan De Meyer [Mon, 13 Mar 2023 12:05:19 +0000 (13:05 +0100)] 
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.

18 months agolock-util: Add posix_lock()
Daan De Meyer [Mon, 13 Mar 2023 12:03:32 +0000 (13:03 +0100)] 
lock-util: Add posix_lock()

POSIX locks with the same interface as flock().

18 months agoexecute: Use log_unit_error_errno() instead of log_error_errno()
Daan De Meyer [Fri, 10 Mar 2023 11:25:42 +0000 (12:25 +0100)] 
execute: Use log_unit_error_errno() instead of log_error_errno()

18 months agosystemctl: refuse to acquire dbus connection with --global
Yu Watanabe [Sat, 11 Mar 2023 08:03:37 +0000 (17:03 +0900)] 
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.

18 months agotest: add a couple of tests for systemd-path 26781/head
Frantisek Sumsal [Thu, 9 Mar 2023 19:58:21 +0000 (20:58 +0100)] 
test: add a couple of tests for systemd-path

18 months agoMerge pull request #26772 from yuwata/time-util-adjust-formattable-timestamp-max
Luca Boccassi [Sun, 12 Mar 2023 23:06:39 +0000 (23:06 +0000)] 
Merge pull request #26772 from yuwata/time-util-adjust-formattable-timestamp-max

time-util: adjust formattable timestamp max

18 months agoadded a unit test for a function in "argv-utils.c" (#26760)
OMOJOLA JOSHUA [Sun, 12 Mar 2023 23:03:52 +0000 (00:03 +0100)] 
added a unit test for a function in "argv-utils.c" (#26760)

* added a unit test for argv-utils.c

18 months agotest-time-util: do not fail on DST change 26772/head
Yu Watanabe [Sun, 12 Mar 2023 18:47:45 +0000 (03:47 +0900)] 
test-time-util: do not fail on DST change

18 months agotime-util: add note about on DST change
Yu Watanabe [Sun, 12 Mar 2023 18:47:15 +0000 (03:47 +0900)] 
time-util: add note about on DST change

18 months agotest: add more testcases for formatting/parsing timestamp
Yu Watanabe [Sun, 12 Mar 2023 11:59:38 +0000 (20:59 +0900)] 
test: add more testcases for formatting/parsing timestamp

18 months agotime-util: make USEC_TIMESTAMP_FORMATTABLE_MAX for 32bit system off by one day
Yu Watanabe [Sun, 12 Mar 2023 11:57:16 +0000 (20:57 +0900)] 
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.

18 months agoMerge pull request #26775 from DaanDeMeyer/ext-default
Yu Watanabe [Sun, 12 Mar 2023 19:04:09 +0000 (04:04 +0900)] 
Merge pull request #26775 from DaanDeMeyer/ext-default

mkfs-util: Always use "default" usage type for ext filesystems

18 months agoMerge pull request #26776 from YHNdnzj/edit-util-more-cleanup
Yu Watanabe [Sun, 12 Mar 2023 19:01:02 +0000 (04:01 +0900)] 
Merge pull request #26776 from YHNdnzj/edit-util-more-cleanup

edit-util: some more cleanups

18 months agoedit-util: include the correct header 26776/head
Mike Yuan [Sun, 12 Mar 2023 17:44:51 +0000 (01:44 +0800)] 
edit-util: include the correct header

18 months agoedit-util: rename trim_edit_marker to strip_edit_temp_file
Mike Yuan [Sun, 12 Mar 2023 16:39:07 +0000 (00:39 +0800)] 
edit-util: rename trim_edit_marker to strip_edit_temp_file

with some minor cleanups

18 months agoedit-util: always create temp file
Mike Yuan [Sun, 12 Mar 2023 10:06:02 +0000 (18:06 +0800)] 
edit-util: always create temp file

even if neither original_path nor comment_paths is specified.

18 months agoedit-util: minor cleanups
Mike Yuan [Sat, 11 Mar 2023 14:52:39 +0000 (22:52 +0800)] 
edit-util: minor cleanups

Reuse unlink_and_free() and avoid unnecessary
call to rmdir()

18 months agomkfs-util: Redirect mkfs.vfat stdout to /dev/null 26775/head
Daan De Meyer [Sun, 12 Mar 2023 15:20:38 +0000 (16:20 +0100)] 
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.

18 months agomkfs-util: Don't explicitly enable has_journal for ext3/ext4
Daan De Meyer [Sun, 12 Mar 2023 14:36:08 +0000 (15:36 +0100)] 
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.

18 months agomkfs-util: Always use "default" usage type for ext filesystems
Daan De Meyer [Sun, 12 Mar 2023 14:15:35 +0000 (15:15 +0100)] 
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.

18 months agoMerge pull request #26756 from yuwata/edit-util-cleanups
Mike Yuan [Sun, 12 Mar 2023 11:23:19 +0000 (19:23 +0800)] 
Merge pull request #26756 from yuwata/edit-util-cleanups

edit-util: several cleanups

18 months agosd-boot: fix incompatible type
Yu Watanabe [Sun, 12 Mar 2023 07:40:18 +0000 (16:40 +0900)] 
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;
      |                        ^~~~~
```

18 months agoedit-util: unlink temporary file on failure 26756/head
Yu Watanabe [Sat, 11 Mar 2023 13:20:51 +0000 (22:20 +0900)] 
edit-util: unlink temporary file on failure

Addresses the suggestion
https://github.com/systemd/systemd/pull/26756#discussion_r1133078705.

18 months agoedit-util: fix potentical crash when no edit markers
Yu Watanabe [Sat, 11 Mar 2023 08:38:03 +0000 (17:38 +0900)] 
edit-util: fix potentical crash when no edit markers

This also makes trim_edit_markers() take EditFile as the argument.

18 months agoedit-util: make create_edit_temp_file() take EditFile as the argument
Yu Watanabe [Sat, 11 Mar 2023 08:35:55 +0000 (17:35 +0900)] 
edit-util: make create_edit_temp_file() take EditFile as the argument

No functional changes, just refactoring.

18 months agoedit-util: make EditFile take reference of EditFileContext
Yu Watanabe [Sat, 11 Mar 2023 08:42:34 +0000 (17:42 +0900)] 
edit-util: make EditFile take reference of EditFileContext

No functional change, just preparation for later commits.

18 months agosystemctl-edit: invert one error check
Yu Watanabe [Sat, 11 Mar 2023 08:19:35 +0000 (17:19 +0900)] 
systemctl-edit: invert one error check

18 months agosystemctl-edit: shorten code a bit
Yu Watanabe [Sat, 11 Mar 2023 08:18:29 +0000 (17:18 +0900)] 
systemctl-edit: shorten code a bit

18 months agomkosi: Update to latest
Daan De Meyer [Sat, 11 Mar 2023 12:32:29 +0000 (13:32 +0100)] 
mkosi: Update to latest

18 months agoMerge pull request #26641 from medhefgo/boot-elf2efi
Yu Watanabe [Sat, 11 Mar 2023 08:15:01 +0000 (17:15 +0900)] 
Merge pull request #26641 from medhefgo/boot-elf2efi

boot: Drop gnu-efi / Add elf2efi.py

18 months agoMerge pull request #26303 from YHNdnzj/edit-util
Yu Watanabe [Sat, 11 Mar 2023 08:13:27 +0000 (17:13 +0900)] 
Merge pull request #26303 from YHNdnzj/edit-util

shared: add edit-util (part of which extracted from systemctl-edit)

18 months agoMerge pull request #26739 from ldv-alt/udevadm-verify
Yu Watanabe [Sat, 11 Mar 2023 08:12:57 +0000 (17:12 +0900)] 
Merge pull request #26739 from ldv-alt/udevadm-verify

udevadm verify: introduce --root option

18 months agoMerge pull request #26752 from Foxboron/morten/fix-manpage
Yu Watanabe [Sat, 11 Mar 2023 08:12:47 +0000 (17:12 +0900)] 
Merge pull request #26752 from Foxboron/morten/fix-manpage

src: Fixup copy-paste error for terminal_urlify_man

18 months agoman: Fix pcrphase.service manvolnum from 1 to 8 26752/head
Morten Linderud [Fri, 10 Mar 2023 19:29:56 +0000 (20:29 +0100)] 
man: Fix pcrphase.service manvolnum from 1 to 8

18 months agosrc: Fixup copy-paste error for terminal_urlify_man
Morten Linderud [Fri, 10 Mar 2023 19:20:44 +0000 (20:20 +0100)] 
src: Fixup copy-paste error for terminal_urlify_man

Signed-off-by: Morten Linderud <morten@linderud.pw>