| Commit message (Collapse) | Author | Files | Lines |
|
|
|
The names with multiple lowercase words run together are hard to read. We
started that way with very short names like rootprefix, but then same pattern
was applied to longer and longer names. Looking at the body of .pc files
available on my machine, many packages use underscores; let's do the same. Old
names are kept for compatiblity, so this is backwards compatible.
|
|
Without that it's really hard to see what items are in the table...
|
|
|
|
In 1a29610f5fa1bcb2eeb37d2c6b79d8d1a6dbb865 the change inadvertedly
disabled names with digit as the first character. This follow-up change
allows a digit as the first character in compat mode.
Fixes: #15141
|
|
When there are hundreds of mounts on the server, it will take a long
time to analyze the failure of a certain mount unit. So it is useful
to print the reason why unit_add_name() failed.
|
|
|
|
|
|
|
|
|
|
|
|
If XDG_CONFIG_DIRS is unset, the specification says we should assume
/etc/xdg.
|
|
Add a simple check on the number of unit files that were found: return
`-ENOENT` when none is found from the function and thus `systemctl`
consequently exits with `1` (`EXIT_FAILURE`) if none were found.
Verification:
```bash
root@image:~# systemctl list-unit-files dbus-nonexistant.service; echo
$?
UNIT FILE STATE VENDOR PRESET
0 unit files listed.
1
root@image:~# systemctl list-unit-files dbus.service; echo $?
UNIT FILE STATE VENDOR PRESET
dbus.service static enabled
1 unit files listed.
0
```
Fixes #15082.
|
|
|
|
|
|
`cg_get_xattr_malloc` to read a cgroup xattr value and allocate space
to hold said value (simple helper combining existing functions).
|
|
A common pattern in the codebase is reading a cgroup memory value
and converting it to a uint64_t. Let's make it a helper and refactor a
few places to use it so it's more concise.
|
|
Commit 08c588d18b1e337f856e6541f3f711be48718279 moved attachment of the
sd-event into creation of the dhcp_client or ipv4ll in dhcp4_configure()
or ipv4ll_configure(), but these can also be created in link_load(),
so that creation needs to also perform sd-event attachment.
Without this, dhcp_client or ipv4ll created in link_load() will not have
an ->event and will fail assertion, causing networkd to fail, e.g.:
Assertion 'client->event' failed at src/libsystemd-network/sd-dhcp-client.c:1283, function client_start_delayed(). Ignoring.
ens2: Could not acquire DHCPv4 lease: Invalid argument
ens2: Failed
|
|
|
|
|
|
|
|
|
|
This may be not a popular setup, but in case kexec resides somewhere different
than the default location for KEXEC (`/usr/sbin/kexec`), don't just reboot and
try doing `reboot(RB_KEXEC)` instead, just like what `kexec -e` normally does.
|
|
Mounting tracefs fails in unprivileged LXC containers and latest LXD
(3.23) bind mounts tracefs already.
Fixes https://github.com/lxc/lxd/issues/7059
|
|
Commit 61f9cf4e4c introduced swap_get_parameters(s) but only
checked its return for NULL and not its ->what.
Fixes https://github.com/systemd/systemd/issues/15070
|
|
|
|
|
|
```
❯ build/networkctl status veth99 ─╯
● 17: veth99
Link File: /usr/lib/systemd/network/99-default.link
Network File: /usr/lib/systemd/network/veth99.network
Type: ether
State: routable (configured)
Driver: veth
HW Address: 1e:04:f8:b8:2f:d4
MTU: 1500 (min: 68, max: 65535)
QDisc: noqueue
IPv6 Address Generation Mode: eui64
Queue Length (Tx/Rx): 1/1
Auto negotiation: no
Speed: 10Gbps
Duplex: full
Port: tp
Address: 192.168.5.35 (DHCP4)
fe80::1c04:f8ff:feb8:2fd4
Gateway: 192.168.5.1
DNS: 192.168.5.1
NTP: 192.168.5.1
SIP: 192.168.5.4
192.168.5.5
Time Zone: Europe/Berlin
Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:25:36 Zeus systemd-networkd[671]: veth99: Gained IPv6LL
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:29:14 Zeus systemd-networkd[671]: veth99: Gained IPv6LL
```
|
|
|
|
|
|
|
|
|
|
optional
In those functions where bus defaults to the m->bus, we should also
resolve the magic parameters. And if neither called with bus=NULL
and an unattached message, return properly instead of crashing in assert
later.
|
|
I'm not sure why those functions were not touched in
45b1f410ba699990e4033805fe64cc369b835f10. Anyway, it seems easier
to just support the magic parameters everywhere.
|
|
|
|
|
|
|
|
When starting a wayland session through a systemd service for a non-root
user, the compositor (based on wlroots) is denied the authorization to
change vt.
Once the user logs in, either through a local console or via ssh, the
compositor can work properly.
This is related to the login polkit policy:
- `allow_inactive` has value `auth_admin_keep`, denying any non-root
user session the authorization to change vt
- `allow_active` has value `yes`, which explains why the vt change
becomes possible once the user logs in through another channel
By changing the `allow_inactive` value to `yes`, any user session setup
in a service file can switch vt, allowing wayland sessions for non-root
users.
|
|
We used to log the following error:
"Start job for unit user-1000.slice failed with 'canceled'"
which can be really misleading if the actual job failed at *stopping* a unit.
Indeed "Start" was hard coded but it was wrong since we can also fail with stop
jobs which are enqueued when a session is stopped.
|
|
When specifying `DHCPv4.SendOption=`, it is used by systemd-networkd to
set the value of that option within the DHCP request that is sent out.
This differs to setting `DHCPServer.SendOption=`, which will place all
the options together as suboptions into the vendor-specific information
(code 43) option.
This commit adds two new config options, `DHCPv4.SendVendorOption=` and
`DHCPServer.SendVendorOption=`. These both have the behaviour of the old
`DHCPServer.SendOption=` flag, and set the value of the suboption in the
vendor-specific information option.
The behaviour of `DHCPServer.SendOption=` is then changed to reflect
that of `DHCPv4.SendOption=`. It will set the value of the corresponding
option in the DHCP request.
|
|
|
|
enabled
Calling `mac_selinux_enforcing()`, which calls `security_getenforce()`, on a SELinux disabled system causes the following error message to be printed:
Failed to get SELinux enforced status: No such file or directory
Fixes: 257188f80ce1a083e3a88b679b898a73fecab53b ("selinux: cache enforced status and treat retrieve failure as enforced mode")
Supersedes: #15145
|
|
|
|
|
|
|
|
codesearch.debian.net shows no uses (except for the definition in systemd and
elogind).
$ cat > test.c
int main() {
sd_bus_try_close(NULL);
return 0;
}
$ gcc -Isrc/systemd -Wall -o testbus test.c -lsystemd
test.c: In function ‘main’:
test.c:4:3: warning: ‘sd_bus_try_close’ is deprecated [-Wdeprecated-declarations]
4 | sd_bus_try_close(NULL);
| ^~~~~~~~~~~~~~~~
In file included from test.c:1:
src/systemd/sd-bus.h:180:5: note: declared here
180 | int sd_bus_try_close(sd_bus *bus) _sd_deprecated_; /* deprecated */
| ^~~~~~~~~~~~~~~~
|
|
sd_bus_try_close() always returns -EOPNOTSUPP if bus is a valid object.
It nevers returns -EBUSY. So we'd always go into the "fallback" path.
|
|
|
|
|
|
This way all the checks are done, and we don't leak a pointer if
bus_set_address_user() is called twice.
|