Commit Graph
69389 Commits
Author SHA1 Message Date
Topi Miettinen 1ce2ffac6c test-network: fix racy test for address_static
NFT sets must be installed before starting networkd, otherwise some sets may be
installed too late.

Closes #30427
2023-12-17 17:59:53 +02:00
QuonXF 6902da549b Add Bosto BT-12HD series to hwdb 2023-12-17 16:57:42 +09:00
Ronan Pigott f5de77fa08 resolved-util: NUL-terminate host label
In case the host has a 63-byte hostname, we must have enough space for a
NUL terminator as well.
2023-12-17 16:56:43 +09:00
Diego Viola e6267e832b meson: make lines more consistent 2023-12-16 13:43:44 +01:00
Luca Boccassi 1905d621db Merge pull request #30484 from mrc0mmand/test-tweaks
A couple of test-related tweaks
2023-12-15 12:20:35 +01:00
Andrew Sayers ff47602f5e Fix a typo in the org.freedesktop.systemd1 man page 2023-12-15 07:39:05 +09:00
Frantisek Sumsal 438c7cb20e test: tell delv to load anchors from /etc/bind.keys explicitly
Since [0] delv no longer does that automagically, so we have to that
explicitly with each delv invocation.

Resolves: #30477

[0] https://github.com/isc-projects/bind9/commit/c144fd2871206d209ccdb916f5959a3ceab1d44c
2023-12-14 23:11:12 +01:00
Frantisek Sumsal 58bcbad86c test: don't check for -Dinstall-tests=true with NO_BUILD=1 2023-12-14 23:11:12 +01:00
Frantisek Sumsal fdd380dde2 test: install empty directories with NO_BUILD=1
Resolves: #30478
2023-12-14 23:11:12 +01:00
Frantisek Sumsal c15e51bde2 test: update comment style & drop one extraneous newline
Follow-up to 9fb2a61830.
2023-12-14 23:08:44 +01:00
Frantisek Sumsal 8f7c876bdc test: forward journal messages to console during sd-bsod tests
Since we nuke the journal multiple times during that, which makes
potential fails undebugable.
2023-12-14 23:08:44 +01:00
Yu Watanabe ae3fb96d1f Merge pull request #30440 from yuwata/network-nexthop-cleanups-2
network/nexthop: several cleanups
2023-12-14 21:44:02 +09:00
Yu Watanabe 5f6ab79571 sd-netlink: the kernel ignores NLM_F_APPEND in RTM_NEWNEXTHOP message but uses NLM_F_REPLACE
See insert_nexthop() in net/ipv4/nexthop.c of the kernel.
2023-12-14 18:58:26 +09:00
Yu Watanabe 68149118cb network/nexthop: check existing nexthop can be replaced with requested one 2023-12-14 18:58:26 +09:00
Yu Watanabe cdf3bee6a2 network/nexthop: do not add NextHop object to Link on requesting
Then, all nexthops managed by networkd really exist (unless the kernel
silently removes a nexthop).

This is the same for nexthop already done by
3c283289ae and
0a0c2672db (for address), and
5d098f5d36 (for neighbor).
2023-12-14 18:58:26 +09:00
Yu Watanabe 352eba2e49 network/nexthop: manage all nexthops by manager
The kernel manages nexthops by their IDs. Previously networkd manages
nexthops in three ways:
- by the corresponding link, if a nexthop has ifindex,
- by the manager, if a nexthop does not have ifindex,
- by the manager with their IDs.

This unifies the three managements of nexthops into one, and use the
same way as the kernel uses.

This is the one for nexthop already done by
aa9626ee3b for neighbor.
2023-12-14 18:58:26 +09:00
Yu Watanabe ac21790335 network/nexthop: rename manager_get_nexthop_by_id() -> nexthop_get_by_id() 2023-12-14 18:58:26 +09:00
Yu Watanabe 84faee4141 network/nexthop: rename nexthop_owned_by_link() -> nexthop_bound_to_link()
No functional change.
2023-12-14 18:58:19 +09:00
Yu Watanabe a533473a48 network/nexthop: NextHop.id is always positive when nexthop_configure() is called
If a nexthop is requested without a valid ID, then nexthop_acquire_id()
assigns an unused ID. So, at the time nexthop_configure() is called, the
ID is always valid.
2023-12-14 18:57:43 +09:00
Yu Watanabe c624143b59 network/nexthop: do not assign invalid ID
This also reduces the scope of the iterator.
2023-12-14 18:57:43 +09:00
Yu Watanabe 58830ef5eb network/nexthop: split-out nexthop_update_group()
No functional change, just refactoring and preparation for later
commits.
2023-12-14 18:57:43 +09:00
Yu Watanabe c2aed12836 network: do not trigger assertion when link_get_by_index() called with an invalid ifindex
Should not change any behavior. Preparation for later commit.
2023-12-14 18:57:43 +09:00
Daan De Meyer 3d11b46bf7 Add $SYSTEMD_HWDB_UPDATE_BYPASS (#30463)
Same as $KERNEL_INSTALL_BYPASS, but for hwdb. This will speed up
cross architecture image builds in mkosi as I can disable package
managers from running the costly hwdb update stuff in qemu user
mode and run it myself with a native systemd-hwdb with --root=.
2023-12-14 18:57:05 +09:00
Mike Yuan bd546b9b48 machine-credential: introduce MachineCredentialContext
This allows more straightforward memory management and
the use of static destructor.

Requested (by me) in https://github.com/systemd/systemd/pull/30143#discussion_r1401980763
2023-12-14 08:50:44 +00:00
Luca Boccassi 266e8d0eb6 Merge pull request #30417 from YHNdnzj/unit-log-resource
core/unit: clean up unit_log_resources
2023-12-14 08:45:26 +00:00
Artur Pak 5f1cc125a8 Add three Dell platforms to sensor accel location base 2023-12-14 08:41:28 +00:00
Daan De Meyer 9ce4dad81f Merge pull request #30467 from poettering/loop-block-tweaks
various tweaks to block device ioctls, and loop device mgmt
2023-12-14 09:38:17 +01:00
Lennart Poettering 21c43631d7 rlimit-util: add pid_getrlimit() helper
This is gets the resource limits off a specified process, and is very
similar to prlimit() with a NULL new_rlimit argument. In fact, it tries
that first. However, it then falls back to use /proc/$PID/limits. Why?
Simply because Linux prohibits access to prlimit() for processes with a
different UID, but /proc/$PID/limits still works.

This is preparation to allow nspawn to run unprivileged.
2023-12-14 08:31:29 +00:00
Luca Boccassi 1845fccada Merge pull request #30469 from poettering/userdbd-tweaks2
userdb: some smaller userdb tweaks
2023-12-14 08:19:51 +00:00
Colin Walters 47374e0601 docs/CREDENTIALS: Don't write authorized_keys with executable bits
No reason to make this file executable.
2023-12-14 07:58:30 +00:00
Lennart Poettering bb59b92256 mount-util: make sure mount_switch_root() works as clean NOP when '/' is specified as target 2023-12-14 13:13:45 +09:00
Lennart Poettering 3d33798803 userdbd: split out function to find listener fd
no actual code changes, just some refactoring and modernization
2023-12-13 18:25:10 +01:00
Lennart Poettering 523121d543 userbd: modernize process_connection() fd possession logic 2023-12-13 18:19:42 +01:00
Lennart Poettering 404a12e1d6 userdbd: realign table 2023-12-13 18:19:20 +01:00
Lennart Poettering 43185f5dc0 userdbd: drop redundant empty line 2023-12-13 18:19:00 +01:00
Lennart Poettering 0e3cb8cf88 userdbd: properly close the listener fd on exit 2023-12-13 18:18:39 +01:00
Lennart Poettering 1fdab6c306 update TODO 2023-12-13 18:04:55 +01:00
Lennart Poettering 7c695beadc userwork: port to pidref_set_parent() 2023-12-13 18:00:14 +01:00
Lennart Poettering a1796e9bd8 pidref: add pidref_set_parent() for race-freely getting pidref on ppid 2023-12-13 18:00:14 +01:00
Lennart Poettering 64cd3d13ea dissect-tool: hide device column if it's a short-lived loopback device
It's pointless showing info that isn#t going to survive the current
invocation, hence hide it.

The "partition number" column is more useful since it kinda shows the
same information, but without the device node name prefixed that is
local to the currentl invocation.
2023-12-13 17:41:18 +01:00
Lennart Poettering 5b1b37c86a dissect-tool: show sector/image size from DissectedImage object
The information is provided to us already in the structure now, hence
use it.
2023-12-13 17:35:22 +01:00
Lennart Poettering 51778dea0d dissect-image: also store the image size in DissectedImage
That way we can easily access it the same way regardless if we operate
on a block device or on a regular file.
2023-12-13 17:35:22 +01:00
Lennart Poettering 6bc201343f loop-util: remember if we created the LoopDevice
Let's store in a bool whether a LoopDevice object was created via
loop_device_open() or loop_device_make().
2023-12-13 17:35:22 +01:00
Lennart Poettering c961a8c605 loop-util: also store the device size in LoopDevice
That makes the field easily accessible, just as the sector size.
2023-12-13 17:35:22 +01:00
Lennart Poettering 01db9c85cf blockdev-util: add new helper blockdev_get_device_size()
This function is just a wrapper around the BLKGETSIZE64. Which is a
pretty simple ioctl. The only reason to wrap it, is that the headers we
need to call it are a bit messy (as "linux/fs.h" is incompatible with
certain glibc headers). Hence add the simple helper that wraps it and
allows us to do the header mess needed in one file only.

It's also nicely symmetric to blockdev_get_sector_size().
2023-12-13 17:35:22 +01:00
Frantisek Sumsal f9ba9d3eb7 test: install all necessary units & generators for LVM on Debian
And derivates.

Replaces: #30458
2023-12-13 23:56:14 +09:00
Luca Boccassi b896058883 Merge pull request #30450 from poettering/cgroups-delegate-attr-update
cgroup: bring list of delegated cgroup attributes up-to-date with cur…
2023-12-13 13:50:41 +00:00
Zbigniew Jędrzejewski-Szmek 0b4cf0a540 Merge pull request #30232 from keszybz/ukify-imports
Use exec() to import ukify
2023-12-13 14:38:03 +01:00
Mike Yuan 3e5b96eed3 core/unit: clean up unit_log_resources
* Use a unified struct to store accounting fields/suffixes
* Use strextendf_with_separator where appropriate
* Don't mix stack and heap allocation for one iovec array
2023-12-13 20:42:06 +08:00
Mike Yuan b1b84bc590 core/unit: raise log level for unit_log_resources on certain memory thresholds
We already do this for all other types of accountings. Let's
make this nicer for memory accounting too.
2023-12-13 20:42:06 +08:00