Yu Watanabe
6554f56361
wait-online: downgrade log level of failure that interface is removed or unmanaged during processing it
...
Closing #27145 .
2023-05-22 19:06:06 +09:00
Yu Watanabe
e7432ed7ca
Merge pull request #27726 from yuwata/network-wireguard-doc
...
network: update doc
2023-05-22 16:46:38 +09:00
Yu Watanabe
f8c5301e44
man: AllowedIPs= can be specified multiple times
...
Closes #27507 .
2023-05-22 14:18:46 +09:00
Yu Watanabe
54189b2ec3
network/wireguard: make AllowedIPs= cleared by specifying an empty string
2023-05-22 14:15:49 +09:00
Yu Watanabe
23ff8a776c
test: install test specific modules in test_append_files()
2023-05-22 12:40:05 +09:00
Yu Watanabe
a94149601a
sd-journal: save correct location specifier
2023-05-22 02:54:40 +09:00
Yu Watanabe
43e460a584
test-journal-interleaving: extend tests to clarify the issue in sd_journal_next() or friends
...
This illustrates bug in sd_journal_next() or friends;
calling sd_jounral_next() followed by sd_journal_seek_tail() makes the
location saved in sd-journal something corrupted, and subsequent
sd_journal_previous() or friends may fail or provides unexpected result.
2023-05-22 02:49:25 +09:00
Yu Watanabe
ddf0d5cc0d
Merge pull request #27157 from YHNdnzj/networkctl-edit
...
networkctl: add verb edit and cat to operate on network configs
2023-05-21 21:36:56 +09:00
Yu Watanabe
70b53893f1
cryptenroll: update log messages
2023-05-20 14:21:10 +09:00
Yu Watanabe
cefa4a02ab
cryptenroll: drop unmet condition
2023-05-20 14:21:10 +09:00
Yu Watanabe
b3bd6ccd1e
Merge pull request #27707 from mrc0mmand/tests
...
test: provide coverage for a couple of recent-ish issues
2023-05-20 08:40:01 +09:00
Yu Watanabe
294c20198b
test: replace Makefile for several tests with symlink to the one for TEST-01-BASIC
2023-05-20 05:42:24 +09:00
Yu Watanabe
396f6900ae
Merge pull request #27676 from ldv-alt/udevadm-verify
...
udevadm-verify: add support for directory arguments
2023-05-20 05:41:05 +09:00
Yu Watanabe
24d724087f
Merge pull request #27701 from poettering/switch-root-same-file
...
switch-root: use same_files() logic when checking whether new and old root dir are actually the same
2023-05-20 05:39:28 +09:00
Yu Watanabe
b4e2fcb6bb
core/device: downgrade error when units specified in SYSTEMD_WANTS= not found
...
Closes #27693 .
2023-05-19 15:25:28 +08:00
Yu Watanabe
d0e3ae838f
unit: add conditions and deps to make oomd.socket and .service consistent
...
Fixes #27690 .
2023-05-19 08:58:56 +02:00
Yu Watanabe
47f4ddaf28
Merge pull request #27686 from keszybz/make-boot-output-nicer
...
Make boot output nicer
2023-05-19 03:50:45 +09:00
Yu Watanabe
65f2ff7998
Merge pull request #27685 from keszybz/the-semiannual-excercise-in-output-narrowing
...
The semiannual excercise in output narrowing
2023-05-19 03:04:47 +09:00
Yu Watanabe
ec0bd9611a
Merge pull request #27684 from mrc0mmand/more-nspawn-tests
...
test: further extend systemd-nspawn coverage
2023-05-19 03:00:54 +09:00
Yu Watanabe
837dfea5ed
Merge pull request #27673 from YHNdnzj/restartsteps-transient
...
core,bus-unit-util: add missing RestartSteps and RestartMaxDelaySec to bus_append_service_property
2023-05-18 17:54:33 +09:00
Yu Watanabe
7aeafa93df
README: drop busybox requirement
...
Follow-up for 5656759d06 .
2023-05-18 10:51:49 +02:00
Yu Watanabe
f0485be000
Merge pull request #27677 from mrc0mmand/test-followups
...
test: get rid of the busybox stuff
2023-05-18 17:47:02 +09:00
Yu Watanabe
89572df859
Merge pull request #27664 from mrc0mmand/test-merge
...
test: let's merge more tests together
2023-05-17 09:53:58 +09:00
Yu Watanabe
871a41f0ef
Merge pull request #27606 from YHNdnzj/loginctl-list-show-state
...
loginctl: list-{users,sessions}: add a column for showing state
2023-05-17 01:41:13 +09:00
Yu Watanabe
8c7dd49ad1
Merge pull request #27655 from yuwata/udev-net-assign-alternative-names-only-on-add-event
...
udev/net: assign alternative names only on add event
2023-05-17 01:39:40 +09:00
Yu Watanabe
3418ca21ed
test: add basic test for memfd_set_sealed() and memfd_get_sealed()
2023-05-16 18:59:25 +09:00
Yu Watanabe
52e2672af2
memfd-util: set F_SEAL_EXEC flag if supported
2023-05-16 18:50:39 +09:00
Yu Watanabe
17915ea5b3
memfd-util: memfd may also have F_SEAL_EXEC flag
...
Follow-up for c29715a8f7 .
Fixes #27608 .
2023-05-16 18:48:32 +09:00
Yu Watanabe
8e3303333f
missing: add more F_SEAL_XYZ flags
2023-05-16 18:46:16 +09:00
Yu Watanabe
40b6b448bd
test: add tests for renaming network interface
2023-05-16 18:28:18 +09:00
Yu Watanabe
9094ae52ca
udev/net: assign alternative names only on add uevent
...
Previously, we first assign alternative names to a network interface,
then later change its main name if requested. So, we could not assign
the name that currently assigned as the main name of an interface as an
alternative name. So, we retry to assign the previous main name as an
alternative name on later move uevent.
However, that causes some confusing situation. E.g. if a .link file has
```
Name=foo
AlternativeNames=foo baz
```
then even if the interface is renamed by a user e.g. by invoking 'ip link'
command manually, the interface can be still referenced as 'foo', as the
name is now assigned as an alternative name.
This makes the order of name assignment inverse: the main name is first
changed, and then the requested alternative names are assigned. And
udevd do not assign alternative names on move uevent.
Replaces #27506 .
2023-05-16 16:37:31 +09:00
Yu Watanabe
8182445500
sd-netlink: make rtnl_set_link_name() optionally append alternative names
2023-05-16 16:37:31 +09:00
Yu Watanabe
cd941e6596
udev/net: generate new network interface name only on add uevent
...
On other uevents, the name will be anyway ignored in rename_netif() in
udev-event.c.
2023-05-16 16:37:31 +09:00
Yu Watanabe
e65c6c1baa
udev/net: verify ID_NET_XYZ before trying to assign it as an alternative name
2023-05-16 16:37:31 +09:00
Yu Watanabe
5668f3a7cf
udev: make udev_builtin_run() take UdevEvent*
...
No functional change, preparation for later commits.
2023-05-16 16:37:31 +09:00
Yu Watanabe
b3cfe59001
udev: use SYNTHETIC_ERRNO() at one more place
2023-05-16 16:37:28 +09:00
Yu Watanabe
5571048919
meson: fix description for link-udev-shared option
2023-05-16 14:14:06 +08:00
Yu Watanabe
0c3ea0c222
sd-dhcp-server: also send DNS servers or friends on DHCPOFFER
...
From RFC 2131 section 4.3.1 (https://www.rfc-editor.org/rfc/rfc2131#section-4.3.1 ):
----
The server MUST return to the client:
- Parameters requested by the client, according to the following rules:
-- IF the server has been explicitly configured with a default
value for the parameter, the server MUST include that value
in an appropriate option in the 'option' field,
----
The sentence is not only for ACK, but for all (positive) responses, that
is DHCPOFFER and DHCPACK.
Fixes #27471 .
2023-05-13 12:37:17 +01:00
Yu Watanabe
f466e828db
Merge pull request #27618 from DaanDeMeyer/fstab-generator
...
Fstab generator fixes
2023-05-12 04:23:54 +09:00
Yu Watanabe
82c60c939c
test-network: add tests for static lease matching with chaddr
...
Follow-up for 4646cdaa37 (#27313 ).
2023-05-12 03:07:10 +09:00
Yu Watanabe
db4afb95c2
Merge pull request #27611 from yuwata/core-mount-escape-utf8
...
core/mount: escape invalid utf8 chars
2023-05-12 01:40:32 +09:00
Yu Watanabe
4804da5853
core/mount: escape invalid UTF8 char in dbus reply
...
When What= or Options= may contain invalid UTF8 chars.
Replaces aaf7b0e411 (#27541 ).
2023-05-11 19:25:38 +09:00
Yu Watanabe
bcf58ff559
Revert "core/mount: replace invalid UTF-8 code points in "what" and "options""
...
This reverts commit aaf7b0e411 .
Not only /proc/mountinfo, .mount units not started yet may contain
invalid UTF-8 chars.
2023-05-11 19:24:42 +09:00
Yu Watanabe
d698679112
Merge pull request #27596 from yuwata/drop-pure
...
drop two more inappropriate _pure_ attributes and several cleanups
2023-05-11 16:49:40 +09:00
Yu Watanabe
531a6233d1
Merge pull request #27603 from mrc0mmand/more-test-shenanigans
...
test: merge PID1-related tests into TEST-07-PID1
2023-05-11 16:48:13 +09:00
Yu Watanabe
39a39f18f2
udev: do not set ID_PATH and by-path symlink for nvmf disks
...
Prompted by #27391 .
2023-05-10 19:42:49 +08:00
Yu Watanabe
6112c86139
core: replace hashmap_get() with hashmap_contains() where appropriate
2023-05-10 15:06:44 +09:00
Yu Watanabe
735f0645db
core: drop unused argument
2023-05-10 15:06:39 +09:00
Yu Watanabe
fcd7e0b7ed
core: several cleanups for job_get_timeout()
...
- add missing assertion,
- rename the argument for storing result,
- always initialize result on success.
2023-05-10 15:06:39 +09:00
Yu Watanabe
bc52801034
tree-wide: drop _pure_ attribute from non-pure functions
...
Prompted by #27595 .
Follow-ups for 6723c28f36 .
2023-05-10 15:06:24 +09:00
Yu Watanabe
18449960b9
Merge pull request #27597 from mrc0mmand/more-test-shenanigans
...
test: slightly extend systemd-cryptenroll coverage
2023-05-10 08:16:29 +09:00
Yu Watanabe
251ca88230
sd-dhcp-client: client ID always has non-zero data
...
Follow-up for f04c991a2f .
Fixes CID#1510978.
2023-05-09 14:41:55 +01:00
Yu Watanabe
c093bfe0ad
Merge pull request #27534 from keszybz/deperlify
...
Rewrite udev-test.pl in Python
2023-05-09 18:06:51 +09:00
Yu Watanabe
9695b0c01b
static-destruct: introduce STATIC_ARRAY_DESTRUCTOR_REGISTER()
2023-05-09 17:53:42 +09:00
Yu Watanabe
555ead8985
static-destruct: several cleanups
...
No functional changes, preparation for later commits.
2023-05-09 17:53:42 +09:00
Yu Watanabe
3facdc7da8
memory-util: make ArrayCleanup passed to array_cleanup() const
...
Should not change any behavior, preparation for later commits.
2023-05-09 17:53:42 +09:00
Yu Watanabe
d94027ad16
bus-util: drop unnecessary continue
2023-05-09 08:08:53 +09:00
Yu Watanabe
d421db6e8b
units: add/fix Documentation= about bus interface
2023-05-09 06:10:23 +09:00
Yu Watanabe
8d3beb00c0
Merge pull request #27579 from YHNdnzj/refuse-dbus-activation
...
core: refuse dbus activation if dbus is not running
2023-05-09 06:09:25 +09:00
Yu Watanabe
aa7b8755b6
Merge pull request #27578 from yuwata/sd-dhcp-client-client-id-len
...
sd-dhcp-client: several cleanups for client_id_len
2023-05-09 06:08:32 +09:00
Yu Watanabe
f86a388de3
core/service: fix error cause in the log
...
Fixes a bug caused by a5648b8094 .
Fixes #27575 .
2023-05-09 06:08:14 +09:00
Yu Watanabe
e69c281ad2
sd-dhcp-client: do not use implicit cast to boolean
2023-05-09 00:37:29 +09:00
Yu Watanabe
f04c991a2f
sd-dhcp-client: make return arguments for sd_dhcp_client_get_client_id() optional
2023-05-09 00:34:06 +09:00
Yu Watanabe
22e299fc5e
sd-dhcp-client: drop redundant condition
...
Closes #27561 .
2023-05-09 00:27:24 +09:00
Yu Watanabe
16cda99c73
nulstr-util: make ret_size in strv_make_nulstr() optional
2023-05-08 21:40:56 +08:00
Yu Watanabe
210cb8d690
core/unit: check the validity of unit type with activation_details_vtable
...
Follow-up for 24e91e08f8 .
2023-05-08 09:49:55 +02:00
Yu Watanabe
d2132d3d8d
parse-util: make parse_fd() return -EBADF
...
The previous error code -ERANGE is slightly ambiguous, and use more
specific one. This also drops unnecessary error handlings.
Follow-up for 754d8b9c33 and
e652663a04 .
2023-05-08 09:49:55 +02:00
Yu Watanabe
fa1071819c
sd-journal: split out generic_array_bisect_one() from generic_array_bisect()
...
This also makes journal corruption always handled gracefully, and drop
potentially unsatisfied assertion on corrupted journal.
Fixes #27533 .
2023-05-07 00:28:19 +09:00
Yu Watanabe
e562f13158
sd-journal: re-read entry array object
...
`test_object()` may call `journal_file_move_to_object()` and thus
the `array` object may be invalidated.
2023-05-07 00:26:49 +09:00
Yu Watanabe
03fdf95714
sd-journal: drop unnecessary initialization
2023-05-07 00:26:49 +09:00
Yu Watanabe
de6b162d35
sd-journal: rebreak comments
2023-05-07 00:26:49 +09:00
Yu Watanabe
dd03d91527
sd-journal: fix comment
2023-05-07 00:26:49 +09:00
Yu Watanabe
5b5e54e058
hwdb: do not include '#' in modalias
...
Follow-up for 7bd3d6e35a .
Fixes #27516 .
2023-05-06 10:27:34 +02:00
Yu Watanabe
6cb105b877
core: fix use of uninitialized value
...
Fixes https://github.com/systemd/systemd/pull/27504#issuecomment-1533354787 .
2023-05-04 00:33:33 +01:00
Yu Watanabe
a76dc1f3a0
Merge pull request #27504 from mrc0mmand/fuzz-manager-serialize
...
test: add a simple fuzzer for manager serialization
2023-05-03 21:45:26 +09:00
Yu Watanabe
406004a6c3
Merge pull request #27499 from yuwata/sd-journal-fix-loop
...
sd-journal: check .next_entry_array_offset earlier
2023-05-03 13:30:47 +09:00
Yu Watanabe
de6eb806ff
Revert "sd-journal: introduce simple loop detection for entry array objects"
...
This reverts commit a8fbcc0e3c .
The commit is not necessary, as the invalid entry array object is
filtered earlier by the previous commit.
2023-05-03 06:41:25 +09:00
Yu Watanabe
b5335da7a5
sd-journal: check .next_entry_array_offset earlier
...
Then, if it is invalid, refuse to use the entry array object.
Follow-up for a8fbcc0e3c .
Fixes #27489 .
2023-05-03 06:41:21 +09:00
Yu Watanabe
c19b827802
Merge pull request #27493 from poettering/generate-sym-test-tweaks
...
fixes/additions for generate-sym-test
2023-05-03 00:12:48 +09:00
Yu Watanabe
e94756c566
test: replace sleep with timeout
...
If the test environment is too slow, then sleeping 2 seconds may not be
sufficient.
2023-05-02 11:09:18 +02:00
Yu Watanabe
ecf82f74b6
Merge pull request #27455 from yuwata/test-lib-sym
...
test: check all public functions are listed in .sym file
2023-05-02 04:45:30 +09:00
Yu Watanabe
8e2449a5c9
test-network: add workaround for bug in iproute2 v6.2.0
...
Closes #27473 .
2023-05-01 20:02:15 +02:00
Yu Watanabe
5c519a56f5
Merge pull request #27458 from mrc0mmand/test-corrupted-journals
...
test: test journalctl with corrupted journals
2023-05-01 19:14:22 +09:00
Yu Watanabe
a8fbcc0e3c
sd-journal: introduce simple loop detection for entry array objects
...
If .next_entry_array_offset points to one of the previous entry or the
self entry, then the loop for entry array objects may run infinitely.
Let's assume that the offsets of each entry array object are in
increasing order, and check that in loop.
Fixes #27470 .
2023-05-01 15:46:59 +09:00
Yu Watanabe and Frantisek Sumsal
4c1b6e699f
test: also test all _public_ functions are listed in .sym files
...
Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz >
2023-05-01 15:40:18 +09:00
Yu Watanabe
e758735d33
sd-journal: tighten variable scope
2023-05-01 14:25:38 +09:00
Yu Watanabe
d9b61db922
sd-journal: read entry array object again
...
Otherwise, the object may be invalidated by the previous call of
journal_file_move_to_object().
2023-05-01 14:25:38 +09:00
Yu Watanabe
b72fd2af86
sd-journal: check validity of object type more strictly
...
Otherwise, the object with invalid type may pass check_object_header()
when the requested type is OBJECT_UNUSED.
2023-05-01 14:25:38 +09:00
Yu Watanabe
3092eaa72e
sd-journal: add _OBJECT_TYPE_INVALID as usual
2023-05-01 14:25:38 +09:00
Yu Watanabe
deb87cc80e
sd-journal: align table
2023-05-01 14:25:38 +09:00
Yu Watanabe
5b895f56c6
sd-journal: check that the journal file is not stored in .newest_by_boot_id on free
2023-05-01 14:24:55 +09:00
Yu Watanabe
f11de491ca
sd-journal: unset prioq index on failure
...
Otherwise, potentially, the assertion in
journal_file_unlink_newest_by_bood_id() will be triggered.
2023-05-01 14:24:55 +09:00
Yu Watanabe
e28d825127
sd-journal: fix use-after-free
...
As commented in the code, we need to replace the pointer to the key,
hence, hashmap_replace() must be used, instead of hashmap_update().
Fixes #27459 .
2023-05-01 14:24:55 +09:00
Yu Watanabe
ebd6384d57
Merge pull request #27461 from bluca/coredumpctl_completion
...
coredumpctl: fix bash completion
2023-04-30 04:28:45 +09:00
Yu Watanabe
9857de4f1c
libsystemd: add missing _public_ attributes
2023-04-29 21:25:12 +09:00
Yu Watanabe
9857bc4cea
libsystemd: drop _public_ attribute for non-exported functions
2023-04-29 21:25:08 +09:00
Yu Watanabe
8c59feed5e
missing_fs: also define struct file_clone_range
...
Follow-up for b640e274a7 .
Addresses https://github.com/systemd/systemd/commit/b640e274a7c363a2b6394c9dce5671d9404d2e2a#r110996661 .
2023-04-29 07:03:09 +02:00
Yu Watanabe
843cb225ad
test: add tests for "systemctl stop" vs triggering by path unit
2023-04-29 09:10:28 +09:00
Yu Watanabe
2e701a7946
test: create temporary units under /run
2023-04-29 09:10:28 +09:00
Yu Watanabe
bc6377762c
core/path: do not enqueue new job in .trigger_notify callback
...
Otherwise,
1. X.path triggered X.service, and the service has waiting start job,
2. systemctl stop X.service
3. the waiting start job is cancelled to install new stop job,
4. path_trigger_notify() is called, and may reinstall new start job,
5. the stop job cannot be installed, and triggeres assertion.
So, instead, let's add a defer event source, then enqueue the new start
job after the stop (or any other type) job finished.
Fixes https://github.com/systemd/systemd/issues/24577#issuecomment-1522628906 .
2023-04-29 08:54:29 +09:00