]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
21 months agowireguard: verify routes configured in .netdev file 30916/head
Yu Watanabe [Tue, 9 Jan 2024 02:45:37 +0000 (11:45 +0900)] 
wireguard: verify routes configured in .netdev file

Then, scope and friends are correctly adjusted, and the behavior should
be matched when the same route is configured in .network file.

21 months agonetwork/route: split out route_section_verify_nexthops()
Yu Watanabe [Sat, 13 Jan 2024 01:06:21 +0000 (10:06 +0900)] 
network/route: split out route_section_verify_nexthops()

No effective functional change, just refactoring and preparation for
later commits.

21 months agonetwork/route: relocate route_type_is_reject() and friends
Yu Watanabe [Sat, 13 Jan 2024 01:05:29 +0000 (10:05 +0900)] 
network/route: relocate route_type_is_reject() and friends

No functional change, preparation for later commits.

21 months agoMerge pull request #30895 from yuwata/network-drop-object-even-on-fail
Yu Watanabe [Sat, 13 Jan 2024 00:03:07 +0000 (09:03 +0900)] 
Merge pull request #30895 from yuwata/network-drop-object-even-on-fail

network: remove Address object even when we failed to remove relevant address

21 months agoMerge pull request #30902 from YHNdnzj/run-accounting
Luca Boccassi [Fri, 12 Jan 2024 23:43:57 +0000 (23:43 +0000)] 
Merge pull request #30902 from YHNdnzj/run-accounting

run: small improvements for accounting data output

21 months agoMerge pull request #30897 from yuwata/network-route-expiration
Luca Boccassi [Fri, 12 Jan 2024 23:32:12 +0000 (23:32 +0000)] 
Merge pull request #30897 from yuwata/network-route-expiration

network: several cleanups for route expiration handling

21 months agoMerge pull request #30896 from yuwata/network-route-conf-parser
Luca Boccassi [Fri, 12 Jan 2024 23:27:39 +0000 (23:27 +0000)] 
Merge pull request #30896 from yuwata/network-route-conf-parser

network: minor cleanups for conf parsers

21 months agomodprobe: set 'ifb numifbs=0' to avoid autocreating ifb0
Luca Boccassi [Fri, 12 Jan 2024 21:44:51 +0000 (21:44 +0000)] 
modprobe: set 'ifb numifbs=0' to avoid autocreating ifb0

Fixes https://github.com/systemd/systemd/issues/30913

21 months agotest: skip TEST-43-PRIVATEUSER-UNPRIV if unprivileged userns is restricted
Nick Rosbrook [Fri, 12 Jan 2024 19:02:17 +0000 (14:02 -0500)] 
test: skip TEST-43-PRIVATEUSER-UNPRIV if unprivileged userns is restricted

With newer versions of AppArmor, unprivileged user namespace creation
may be restricted by default, in which case user manager instances will
not be able to apply PrivateUsers=yes (or the settings which require it).

This can be tested with the kernel.apparmor_restrict_unprivileged_userns
sysctl.

21 months agoMerge pull request #30908 from poettering/nsid
Yu Watanabe [Fri, 12 Jan 2024 21:54:32 +0000 (06:54 +0900)] 
Merge pull request #30908 from poettering/nsid

networkd: expose netns "nsid" together with inode id

21 months agonetwork: fix 6rd tunnel link section name
Frantisek Sumsal [Fri, 12 Jan 2024 18:43:28 +0000 (19:43 +0100)] 
network: fix 6rd tunnel link section name

Spotted randomly when going through CI logs:

systemd-udevd[658]: /usr/lib/systemd/network/80-6rd-tunnel.link:21: Unknown section 'Network'. Ignoring.

Follow-up for 658169e6d30.

21 months agonetworkd: expose the nsid in the GetNamespaceId() varlink call 30908/head
Lennart Poettering [Fri, 12 Jan 2024 10:47:45 +0000 (11:47 +0100)] 
networkd: expose the nsid in the GetNamespaceId() varlink call

Let's return both ids in the GetNamespaceID(), since they are pretty
much the same concept.

21 months agonetworkd: expose nsid via dbus
Lennart Poettering [Fri, 12 Jan 2024 10:49:12 +0000 (11:49 +0100)] 
networkd: expose nsid via dbus

21 months agosocket-util: add netns_get_nsid() helper to show nsid of netns
Lennart Poettering [Fri, 12 Jan 2024 10:49:35 +0000 (11:49 +0100)] 
socket-util: add netns_get_nsid() helper to show nsid of netns

21 months agosd-netlink: hook up nsid APIs
Lennart Poettering [Fri, 12 Jan 2024 10:36:49 +0000 (11:36 +0100)] 
sd-netlink: hook up nsid APIs

21 months agoMerge pull request #30911 from poettering/vmspawn-tweaks
Lennart Poettering [Fri, 12 Jan 2024 17:32:40 +0000 (18:32 +0100)] 
Merge pull request #30911 from poettering/vmspawn-tweaks

vmspawn: various clean-ups

21 months agoudev: distinguish host-managed zoned block in scsi_id
chenjiayi [Mon, 8 Jan 2024 11:45:18 +0000 (19:45 +0800)] 
udev: distinguish host-managed zoned block in scsi_id

According to SPC4, the value of 0x14 is reserved to distinguish
host managed zoned block, e.g., some SMR (Shingled Magnetic Recording)
disks.

Other utilities such as sg3_utils can successfully recognize such
kind of disks. This patch implements the same ability.

21 months agoMerge pull request #30904 from YHNdnzj/no-selinux-reload
Luca Boccassi [Fri, 12 Jan 2024 15:51:54 +0000 (15:51 +0000)] 
Merge pull request #30904 from YHNdnzj/no-selinux-reload

core/execute: don't reload selinux before spawning executor

21 months agomkosi: Build a directory image by default
Daan De Meyer [Thu, 7 Dec 2023 18:52:41 +0000 (19:52 +0100)] 
mkosi: Build a directory image by default

Both building and booting a directory image is much faster than
building or booting a disk image so let's default to a directory
image.

In CI, we stick to a disk image to make sure that keeps working as
well.

The only extra dependency this introduces is virtiofsd which is
packaged in all distributions except Debian stable. For users
hacking on systemd on Debian stable, a disk image can be built by
writing the following to mkosi.local.conf:

```
[Output]
Format=disk
```

21 months agovmspawn: suppress unnecessary '-' 30911/head
Lennart Poettering [Fri, 12 Jan 2024 15:02:29 +0000 (16:02 +0100)] 
vmspawn: suppress unnecessary '-'

21 months agovmspawn: use SD_EVENT_SIGNAL_PROCMASK flag where possible
Lennart Poettering [Fri, 12 Jan 2024 14:57:13 +0000 (15:57 +0100)] 
vmspawn: use SD_EVENT_SIGNAL_PROCMASK flag where possible

21 months agovmspawn: use our generic vsock CID parser, instead of a howngrown one
Lennart Poettering [Fri, 12 Jan 2024 14:55:05 +0000 (15:55 +0100)] 
vmspawn: use our generic vsock CID parser, instead of a howngrown one

Let's also use 'unsigned' as type for the CID everywhere, and
VMADDR_CID_ANY as marker for "invalid CID", as that's what the vsock
APIs natively do.

21 months agovmspawn: fix empty lines before section titles in --help text
Lennart Poettering [Fri, 12 Jan 2024 14:37:43 +0000 (15:37 +0100)] 
vmspawn: fix empty lines before section titles in --help text

Always put an empty line before section titles (one was missing so far)

21 months agovmspawn: make sure are fine with ovmf metadata extensions
Lennart Poettering [Fri, 12 Jan 2024 14:37:15 +0000 (15:37 +0100)] 
vmspawn: make sure are fine with ovmf metadata extensions

The JSON ovmf data on Fedora at least has more fields than we expect,
ignore it.

21 months agonetwork/ndisc: do not try to set too large value for ICMP ratelimting
Yu Watanabe [Fri, 12 Jan 2024 01:00:31 +0000 (10:00 +0900)] 
network/ndisc: do not try to set too large value for ICMP ratelimting

Follow-up for 6197db53ba3c61de2268eb723a7a9cd4b3f5f87c.

When we set too large value, the kernel just refuse it. So, this does
not change the net behavior.

Prompted by https://github.com/systemd/systemd/pull/30490#discussion_r1449477125.

21 months agojson: downgrade extension log message to LOG_DEBUG
Lennart Poettering [Fri, 12 Jan 2024 11:03:00 +0000 (12:03 +0100)] 
json: downgrade extension log message to LOG_DEBUG

This is not supposed to be something we should complain about loudly
after all.

Follow-up for: a617fd904789cd3a05cf4cb2f54649e2a1f73d33

21 months agoAdd --root= support for list and prepare add-all for --root= support
Daan De Meyer [Fri, 12 Jan 2024 08:55:40 +0000 (09:55 +0100)] 
Add --root= support for list and prepare add-all for --root= support

Let's make sure these follow the rest of kernel-install and always
operate on the given root directory, even if the verb itself can't
support --root= just yet.

21 months agotest: use systemd-id128 from the build dir
Frantisek Sumsal [Fri, 12 Jan 2024 09:27:43 +0000 (10:27 +0100)] 
test: use systemd-id128 from the build dir

As distro sd-id128 might not have all the options we need.

Follow-up for: 378712c
Replaces: #30901

21 months agoman: fix typo AV_VSOCK → AF_VSOCK
Lennart Poettering [Fri, 12 Jan 2024 09:03:55 +0000 (10:03 +0100)] 
man: fix typo AV_VSOCK → AF_VSOCK

A reported by Arian van Putten:

https://github.com/systemd/systemd/pull/30777#pullrequestreview-1816817988

21 months agorun: don't show IP/IO accounting data if 0 30902/head
Mike Yuan [Fri, 12 Jan 2024 09:35:21 +0000 (17:35 +0800)] 
run: don't show IP/IO accounting data if 0

21 months agocore/execute: don't reload selinux before spawning executor 30904/head
Mike Yuan [Fri, 12 Jan 2024 07:13:29 +0000 (15:13 +0800)] 
core/execute: don't reload selinux before spawning executor

With the introduction of sd-executor, SELinux needs to be re-initialized
after execve() anyway.

21 months agoselinux-util: reorder functions
Mike Yuan [Fri, 12 Jan 2024 09:16:44 +0000 (17:16 +0800)] 
selinux-util: reorder functions

21 months agorun: show accounting data of same type in the same line
Mike Yuan [Fri, 12 Jan 2024 08:57:13 +0000 (16:57 +0800)] 
run: show accounting data of same type in the same line

22 months agonetwork/route-nexthop: always reset gateway address when _dhcp or friends is specifie... 30896/head
Yu Watanabe [Fri, 12 Jan 2024 06:29:11 +0000 (15:29 +0900)] 
network/route-nexthop: always reset gateway address when _dhcp or friends is specified to Gateway=

Just for safety.

22 months agonetwork/dhcp4: use route_configure_handler_internal() at one more place 30897/head
Yu Watanabe [Tue, 9 Jan 2024 07:22:42 +0000 (16:22 +0900)] 
network/dhcp4: use route_configure_handler_internal() at one more place

22 months agonetwork/route: update expiration timer only when we know the route exists
Yu Watanabe [Tue, 9 Jan 2024 07:20:39 +0000 (16:20 +0900)] 
network/route: update expiration timer only when we know the route exists

22 months agonetwork/route: save if the route expiration is managed by the kernel
Yu Watanabe [Tue, 9 Jan 2024 04:44:15 +0000 (13:44 +0900)] 
network/route: save if the route expiration is managed by the kernel

Otherwise, our own expiration timer will be setup on updating a route.
See comment in link_request_route().

22 months agonetwork/route: unconditionally call route_setup_timer() for managed routes
Yu Watanabe [Tue, 9 Jan 2024 04:36:22 +0000 (13:36 +0900)] 
network/route: unconditionally call route_setup_timer() for managed routes

For foreign routes, we do not set lifetime, as it is foreign.
So, this should not change any behavior. Preparation for later commits.

22 months agonetwork/route: use specified error message
Yu Watanabe [Tue, 9 Jan 2024 04:10:43 +0000 (13:10 +0900)] 
network/route: use specified error message

Previously, specified error message was not used.

22 months agonetwork/route-nexthop: make GatewayOnLink= support an empty string
Yu Watanabe [Tue, 9 Jan 2024 03:20:41 +0000 (12:20 +0900)] 
network/route-nexthop: make GatewayOnLink= support an empty string

And invalidate the route section if an invalid string is specified.

22 months agonetwork/route: move two more conf parsers to networkd-route-nexthop.[ch]
Yu Watanabe [Tue, 9 Jan 2024 02:23:42 +0000 (11:23 +0900)] 
network/route: move two more conf parsers to networkd-route-nexthop.[ch]

Let's manage nexthop (gateway) handling in networkd-route-nexthop.[ch].

22 months agonetwork/nexthop: drop NextHop object even if we fail to remove the nexthop 30895/head
Yu Watanabe [Tue, 2 Jan 2024 19:41:58 +0000 (04:41 +0900)] 
network/nexthop: drop NextHop object even if we fail to remove the nexthop

22 months agonetwork/neighbor: drop Neighbor object even if we fail to remove the neighbor
Yu Watanabe [Tue, 2 Jan 2024 19:41:50 +0000 (04:41 +0900)] 
network/neighbor: drop Neighbor object even if we fail to remove the neighbor

22 months agonetwork/address: forget address even if we could not remove it
Yu Watanabe [Tue, 2 Jan 2024 19:41:42 +0000 (04:41 +0900)] 
network/address: forget address even if we could not remove it

If we could not remove an address, then previously the corresponding
Address object was never removed, as it was freed only when we receive
remove notification from the kernel. So, we might confused that the
address still exists and being removed, and might block reconfiguring
the address.

With this change, even if we fail to remove an address, the
corresponding Address object will be freed.

22 months agonetwork/queue: introduce RemoveRequest and relevant functions
Yu Watanabe [Tue, 2 Jan 2024 19:41:34 +0000 (04:41 +0900)] 
network/queue: introduce RemoveRequest and relevant functions

This is similar to Request, but will be used on removing configuration
(e.g. address, route, and so on).

By using another queue for removing configuration, then we can avoid to
fill the reply callback buffer in sd-netlink by remove message calls.

Follow-up for 4e6a35e2b2fad0f167a71b63525f4210bc858bc6.

22 months agohomed: add helpers for checking reference status of homes
Lennart Poettering [Fri, 13 May 2022 22:04:08 +0000 (00:04 +0200)] 
homed: add helpers for checking reference status of homes

Just some refactoring to make things more readable.

22 months agoupdate TODO
Lennart Poettering [Thu, 11 Jan 2024 21:44:13 +0000 (22:44 +0100)] 
update TODO

22 months agoMerge pull request #30867 from dtardon/udev-conf-dropins
Yu Watanabe [Thu, 11 Jan 2024 21:37:23 +0000 (06:37 +0900)] 
Merge pull request #30867 from dtardon/udev-conf-dropins

Allow dropins for udev.conf

22 months agoMerge pull request #30893 from yuwata/add-trailing-NUL
Yu Watanabe [Thu, 11 Jan 2024 21:36:46 +0000 (06:36 +0900)] 
Merge pull request #30893 from yuwata/add-trailing-NUL

json,netlink: add trailing NUL byte when we read binary data

22 months agoMerge pull request #30777 from poettering/ssh-generator
Lennart Poettering [Thu, 11 Jan 2024 20:31:28 +0000 (21:31 +0100)] 
Merge pull request #30777 from poettering/ssh-generator

ssh-generator which makes VMs and containers accessible to ssh via AF_UNIX and AF_VSOCK

22 months agoMerge pull request #30884 from poettering/logind-background-light
Lennart Poettering [Thu, 11 Jan 2024 20:20:01 +0000 (21:20 +0100)] 
Merge pull request #30884 from poettering/logind-background-light

logind: add "background-light" + "manager" session classes

22 months agotest: use dropin dir 30867/head
David Tardon [Fri, 5 Jan 2024 15:10:50 +0000 (16:10 +0100)] 
test: use dropin dir

22 months agoman: update udev.conf man page
David Tardon [Wed, 10 Jan 2024 14:54:28 +0000 (15:54 +0100)] 
man: update udev.conf man page

22 months agoudev: factor out config parser call into function
David Tardon [Fri, 5 Jan 2024 15:11:24 +0000 (16:11 +0100)] 
udev: factor out config parser call into function

... which is then called from both places. This makes sure that the
configuration is parsed by udevd and other tools in exactly the same
way.

22 months agoudev-util: drop unused function
David Tardon [Fri, 5 Jan 2024 14:48:31 +0000 (15:48 +0100)] 
udev-util: drop unused function

22 months agoudev-util: use config. parser to parse udev.conf
David Tardon [Fri, 5 Jan 2024 14:45:04 +0000 (15:45 +0100)] 
udev-util: use config. parser to parse udev.conf

22 months agoudevd: use config. parser to parse udev.conf
David Tardon [Fri, 5 Jan 2024 14:31:24 +0000 (15:31 +0100)] 
udevd: use config. parser to parse udev.conf

This adds support for the usual config. file hierarchy (including
dropins).

Fixes #30460.

22 months agosd-netlink: add trailing NUL byte for safety in sd_netlink_message_read_data() 30893/head
Yu Watanabe [Thu, 11 Jan 2024 19:48:23 +0000 (04:48 +0900)] 
sd-netlink: add trailing NUL byte for safety in sd_netlink_message_read_data()

Then, drop sd_netlink_message_read_data_suffix0().

22 months agojson: add trailing NUL byte in json_dispatch_byte_array_iovec()
Yu Watanabe [Thu, 11 Jan 2024 19:44:48 +0000 (04:44 +0900)] 
json: add trailing NUL byte in json_dispatch_byte_array_iovec()

For safety.

Addresses https://github.com/systemd/systemd/pull/30879#discussion_r1448518226.

22 months agotest: use correct type for the root partition
Frantisek Sumsal [Thu, 11 Jan 2024 13:37:29 +0000 (14:37 +0100)] 
test: use correct type for the root partition

22 months agoMerge pull request #30887 from poettering/id128-no-legend
Yu Watanabe [Thu, 11 Jan 2024 18:46:48 +0000 (03:46 +0900)] 
Merge pull request #30887 from poettering/id128-no-legend

id128: add --no-pager, --no-legend, --json=/-j switches to systemd-id128 tool

22 months agoshell-completion: add new systemd-id128 options 30887/head
Frantisek Sumsal [Thu, 11 Jan 2024 17:26:12 +0000 (18:26 +0100)] 
shell-completion: add new systemd-id128 options

22 months agologind: also restrict on which session classes one cange the session type 30884/head
Lennart Poettering [Thu, 11 Jan 2024 16:20:38 +0000 (17:20 +0100)] 
logind: also restrict on which session classes one cange the session type

22 months agologind: allow taking control of devices only in some session types
Lennart Poettering [Thu, 11 Jan 2024 16:14:48 +0000 (17:14 +0100)] 
logind: allow taking control of devices only in some session types

Let's restrict the logic a bit, so that "manage" session types are not
misused.

22 months agoid128: add --no-pager, --no-legend, --json=/-j switches to systemd-id128 tool
Lennart Poettering [Thu, 11 Jan 2024 15:35:18 +0000 (16:35 +0100)] 
id128: add --no-pager, --no-legend, --json=/-j switches to systemd-id128 tool

22 months agoman: document the expanded catalogue of session classes
Lennart Poettering [Wed, 29 Nov 2023 11:19:53 +0000 (12:19 +0100)] 
man: document the expanded catalogue of session classes

22 months agotest: add integration test for new 'background-light' session class
Lennart Poettering [Wed, 29 Nov 2023 11:57:16 +0000 (12:57 +0100)] 
test: add integration test for new 'background-light' session class

22 months agologind: tighten for which classes of sessions we do stop-on-idle
Lennart Poettering [Thu, 4 Jan 2024 12:40:00 +0000 (13:40 +0100)] 
logind: tighten for which classes of sessions we do stop-on-idle

We only want to do this for fully set up, interactive sessions, i.e.
user and user-early, but not for any others, hence restrict the rules a
bit.

Follow-up for: 508b4786e8592e82eb4832549f74aaa54335d14c

22 months agologind: rework GC logic
Lennart Poettering [Wed, 29 Nov 2023 10:24:10 +0000 (11:24 +0100)] 
logind: rework GC logic

In logind we generally want to stop user@.service for a user once they
log out. So the usual rule is that whenever a User object is around that
has no pinning sessions we should close it.

Except that it isn't that easy. We allow that user@.service is also
manually started, in which case the User object is created but not
pinned by any session.

Let's rework how this is handled: we define two different GC modes. In
one GC mode we'll keep the User object around whenever *any* session
exists (thus: including the user@.service session), and one where we
only keep it around whenever a *pinning* session exists (i.e. when a
user actually logs in, but the user@.service session doesn't count like
that).

And the trick is now that we start out in the *any* GC mode, and switch
to the *pinning* GC mode once the first user session logs in.

This should make things more robust as we know exactly in which state we
are and when to GC a user.

22 months agologind: rework logic to decide whether lock + idle + display applies to a session
Lennart Poettering [Wed, 29 Nov 2023 10:18:01 +0000 (11:18 +0100)] 
logind: rework logic to decide whether lock + idle + display applies to a session

Let's streamline the logic that decides whether the screen lock, idle
timeout or display election mechanism applies to a session class. Let's
add explicitly SESSION_CLASS_IS_XYZ() macros for each, and then resue
them at all suitable places, and refuse any attempts to use the
functionality on the wrong clases with a friendly error message.

22 months agologind: add "background-light" session class
Lennart Poettering [Mon, 27 Nov 2023 17:39:02 +0000 (18:39 +0100)] 
logind: add "background-light" session class

This is the same as the "background" class, but does *not* pull in a
service manager. It might be useful for things like select cron jobs
that do not intend to call per-user IPC calls.

Replaces: #23569
Fixes: #23978
22 months agopam_systemd: register systemd user service manager as class='manager'
Lennart Poettering [Mon, 27 Nov 2023 16:31:50 +0000 (17:31 +0100)] 
pam_systemd: register systemd user service manager as class='manager'

Now that we have thew new class, start making us of it in pam_systemd.so
when running for user@.service.

22 months agologind: track user service managers as 'manager' session class
Lennart Poettering [Mon, 27 Nov 2023 17:35:32 +0000 (18:35 +0100)] 
logind: track user service managers as 'manager' session class

Previously, all user code was part of a session except for the code run
as part of user@.service, which wasn't. This tries to make this more
uniform: we'll track the user@.service runtime also as a session, but of
the special type "manager".

This means we have a really good overview finally of all user code that
is running and can make decisions on what to start when and how long to
keep it around. The pam_systemd client side will now be reasonably
uniform: it just calls the CreateSession() bus call with the right
class, and we'll return any data it needs. This means the weird
"side-channel" we previously used to initialize XDG_RUNTIME_DIR for the
user@.service goes away (see next commit).

This conditionalizes various behaviours now cleanly depending on the
session class:

1. SESSION_CLASS_WANTS_SCOPE() will be true for all classes except for
   the manager class. It declares whther the client shall be migrated
   into their own scope, which we generally want for sessions but not
   for the manager, since it already has its own service unit.

2. SESSION_CLASS_WANTS_SERVICE_MANAGER() will be true for all classes
   except for the manager class. It declares whether we shall start the
   service manager if a session of this class is around. Of course, this
   is off for the service manager, since this would always pin itself.

3. SESSION_CLASS_PIN_USER() will be true for all classes except for the
   manager class. It declares whether the we shall keep the User
   structure around for a user as long as the session is around.

Now you might wonder why have these as three functions, even though they
mostly give the same answers?

That's because this all is preparation to add further session classes
later that will return different answers for the three calls. (For
example, a later patch adds "background-light" which will return true
for SESSION_CLASS_WANTS_SCOPE() and SESSION_CLASS_PIN_USER(), but false
for SESSION_CLASS_WANTS_SERVICE_MANAGER(). i.e. it will get a scope, and
pin user tracking, but not start a service manager.

22 months agoupdate TODO 30777/head
Lennart Poettering [Fri, 5 Jan 2024 13:52:35 +0000 (14:52 +0100)] 
update TODO

22 months agotest: add testcase for ssh generator
Lennart Poettering [Wed, 10 Jan 2024 10:28:23 +0000 (11:28 +0100)] 
test: add testcase for ssh generator

22 months agodoc: document new /run/host/ inodes in container interface doc
Lennart Poettering [Fri, 5 Jan 2024 17:34:01 +0000 (18:34 +0100)] 
doc: document new /run/host/ inodes in container interface doc

22 months agonspawn: expose a dir in the container where it can bind AF_UNIX sockets that will...
Lennart Poettering [Fri, 5 Jan 2024 15:43:41 +0000 (16:43 +0100)] 
nspawn: expose a dir in the container where it can bind AF_UNIX sockets that will appear on the host

22 months agossh-proxy: add ssh ProxyCommand tool that can connect to AF_UNIX + AF_VSOCK sockets
Lennart Poettering [Thu, 4 Jan 2024 22:31:51 +0000 (23:31 +0100)] 
ssh-proxy: add ssh ProxyCommand tool that can connect to AF_UNIX + AF_VSOCK sockets

This adds a tiny binary that is hooked into SSH client config via
ProxyCommand and which simply connects to an AF_UNIX or AF_VSOCK socket
of choice.

The syntax is as simple as this:

     ssh unix/some/path     # (this connects to AF_UNIX socket /some/path)

or:

     ssh vsock/4711

I used "/" as separator of the protocol ID and the value since ":" is
already taken by SSH itself when doing sftp. And "@" is already taken
for separating the user name.

22 months agossh-generator: add simple new generator
Lennart Poettering [Thu, 4 Jan 2024 17:39:03 +0000 (18:39 +0100)] 
ssh-generator: add simple new generator

22 months agoiovec-util: add helper for a single NUL byte iovec
Lennart Poettering [Fri, 5 Jan 2024 15:32:43 +0000 (16:32 +0100)] 
iovec-util: add helper for a single NUL byte iovec

22 months agoinstall: optionally return discovered unit file path in unit_file_exists()
Lennart Poettering [Thu, 4 Jan 2024 17:38:50 +0000 (18:38 +0100)] 
install: optionally return discovered unit file path in unit_file_exists()

22 months agogenerator: teach generator_add_symlink_full() to optionally make alias symlinks rathe...
Lennart Poettering [Thu, 4 Jan 2024 17:38:28 +0000 (18:38 +0100)] 
generator: teach generator_add_symlink_full() to optionally make alias symlinks rather than just .wants/ style symlinks

22 months agogenerator: optionally return resulting unit file path in generator_open_unit_file_full()
Lennart Poettering [Thu, 4 Jan 2024 17:37:38 +0000 (18:37 +0100)] 
generator: optionally return resulting unit file path in generator_open_unit_file_full()

This is useful if we want to make symlinks to it later.

22 months agomkosi: also add ssh client, to make it easier to test ssh logins via AF_UNIX/AF_VSOCK
Lennart Poettering [Mon, 27 Nov 2023 15:26:18 +0000 (16:26 +0100)] 
mkosi: also add ssh client, to make it easier to test ssh logins via AF_UNIX/AF_VSOCK

22 months agonetwork: fix Name= -> OriginalName= in the default .link files
Yu Watanabe [Thu, 11 Jan 2024 06:01:35 +0000 (15:01 +0900)] 
network: fix Name= -> OriginalName= in the default .link files

Follow-up for 658169e6d307b5b1aea0d82b4a6430fa9d529c68.

22 months agoman: fix references to systemd.exec(5)
Lennart Poettering [Thu, 11 Jan 2024 08:46:05 +0000 (09:46 +0100)] 
man: fix references to systemd.exec(5)

For some reason the section for the systemd.exec man page was added
incorrectly and then copypasted everywhere else incorrectly too. Let's
fix that.

22 months agoanalyze: clarify that `security --offline=true` requires an argument
Antonio Alvarez Feijoo [Thu, 11 Jan 2024 10:00:37 +0000 (11:00 +0100)] 
analyze: clarify that `security --offline=true` requires an argument

Without `--root` or `--image`, the `security` command inspects all currently
loaded service units if no unit name is specified. But with `--root` or
`--image` with `--offline=true`, the `security` command exits silently if no
unit name is specified.

Also, fixed description of `--root` and `--image` in the man page, and added
missing `--unit` option to help text.

22 months agotest: fix dbus installation on Arch
Frantisek Sumsal [Thu, 11 Jan 2024 10:02:05 +0000 (11:02 +0100)] 
test: fix dbus installation on Arch

Arch finally made dbus-broker the default dbus daemon [0], but unlike
Fedora they don't use Alias=dbus.service to make the dbus.symlink under
/etc, instead they create the symlink manually under /usr/lib, so let's
account for that.

[0] https://gitlab.archlinux.org/archlinux/packaging/packages/dbus-broker/-/commit/b24d15795addeb15f9532f28deae9475fad8b9fa

22 months agoRevert "initrd-parse-etc: override argv[0] to avoid dracut issue"
Antonio Alvarez Feijoo [Thu, 7 Dec 2023 07:29:40 +0000 (08:29 +0100)] 
Revert "initrd-parse-etc: override argv[0] to avoid dracut issue"

This reverts commit db5276215ae496074c163fca4014baf1bcd05984.

dracut is patched since https://github.com/dracutdevs/dracut/commit/23684e4a,
and this commit is included in the latest dracut-059 release.

22 months agoMerge pull request #30879 from yuwata/dhcp-client-id-json
Lennart Poettering [Thu, 11 Jan 2024 09:22:31 +0000 (10:22 +0100)] 
Merge pull request #30879 from yuwata/dhcp-client-id-json

dhcp: introduce json_dispatch_client_id() and friends

22 months agosd-dhcp-client-id: introduce json_dispatch_client_id() 30879/head
Yu Watanabe [Thu, 11 Jan 2024 07:55:53 +0000 (16:55 +0900)] 
sd-dhcp-client-id: introduce json_dispatch_client_id()

22 months agojson: introduce json_dispatch_byte_array_iovec() and json_dispatch_in_addr()
Yu Watanabe [Tue, 2 Jan 2024 21:07:10 +0000 (06:07 +0900)] 
json: introduce json_dispatch_byte_array_iovec() and json_dispatch_in_addr()

22 months agosd-dhcp-client-id/duid: do not trigger assertion when invalid size is passed
Yu Watanabe [Thu, 11 Jan 2024 07:53:42 +0000 (16:53 +0900)] 
sd-dhcp-client-id/duid: do not trigger assertion when invalid size is passed

The data may be from user input or file. We usually use assertion for
programming error. Hence, using assert is not a good choise there.

Preparation for later commits.

22 months agotest-systemctl-enable: make titles more consistent
Diego Viola [Mon, 18 Dec 2023 06:26:31 +0000 (03:26 -0300)] 
test-systemctl-enable: make titles more consistent

22 months agoboot/efi: use Header field of hd directly instead of casting to EFI_DEVICE_PATH
Rose [Sun, 7 Jan 2024 19:43:43 +0000 (14:43 -0500)] 
boot/efi: use Header field of hd directly instead of casting to EFI_DEVICE_PATH

The header of EFI_DEVICE_PATH is the first member of hd, which means that we can use that directly instead of casting one struct to another.

22 months agotree-wide: replace string functions with fundamental functions
Rose [Mon, 8 Jan 2024 21:02:39 +0000 (16:02 -0500)] 
tree-wide: replace string functions with fundamental functions

22 months agoconf-parser: generalize config_parse_config_file()
David Tardon [Fri, 5 Jan 2024 13:30:37 +0000 (14:30 +0100)] 
conf-parser: generalize config_parse_config_file()

22 months agonetwork: take explicit ownership of our own interfaces
Lennart Poettering [Wed, 10 Jan 2024 15:18:41 +0000 (16:18 +0100)] 
network: take explicit ownership of our own interfaces

This is a follow-up for #30786 and uses it to assign
ID_NET_MANAGED_BY=io.systemd.Network to all all network interfaces that
we consider ours to manage. This should hopefully have the effect that
other well-behaving managers won't fight for these devices.

This doesn't bother with network interfaces we match inside containers,
since udev is not available there anyway.

22 months agoMerge pull request #30717 from yuwata/network-ref-unref
Luca Boccassi [Wed, 10 Jan 2024 19:34:48 +0000 (19:34 +0000)] 
Merge pull request #30717 from yuwata/network-ref-unref

network: introduce address_ref() and friends

22 months agoMerge pull request #30716 from yuwata/network-cancel-request
Luca Boccassi [Wed, 10 Jan 2024 19:33:16 +0000 (19:33 +0000)] 
Merge pull request #30716 from yuwata/network-cancel-request

network: also remove configuration on cancelling request