1
0
mirror of https://github.com/systemd/systemd synced 2026-03-14 17:14:49 +01:00

Compare commits

..

No commits in common. "a40d93400759c8eb46a2ec8702735bde2333812a" and "3d6dfabd8c574d3a33e2d6434696ff2f9628adb6" have entirely different histories.

11 changed files with 26 additions and 30 deletions

View File

@ -29,7 +29,7 @@ jobs:
fetch-depth: 0
- name: Lint Code Base
uses: super-linter/super-linter/slim@12562e48d7059cf666c43a4ecb0d3b5a2b31bd9e
uses: super-linter/super-linter/slim@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99
env:
DEFAULT_BRANCH: main
MULTI_STATUS: false
@ -37,7 +37,6 @@ jobs:
VALIDATE_GITHUB_ACTIONS: true
LINTER_RULES_PATH: .github/linters
GITHUB_ACTIONS_CONFIG_FILE: actionlint.yml
ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT: false
- uses: systemd/mkosi@e3642f81d3a7f8f9310c0c734b2ba9dd41e50e14

2
README
View File

@ -259,7 +259,7 @@ REQUIREMENTS:
During runtime, you need the following additional
dependencies:
util-linux >= v2.41 required (including but not limited to: mount,
util-linux >= v2.27.1 required (including but not limited to: mount,
umount, swapon, swapoff, sulogin,
agetty, fsck)
dbus >= 1.4.0 (strictly speaking optional, but recommended)

4
TODO
View File

@ -116,6 +116,10 @@ Deprecations and removals:
* Consider removing root=gpt-auto, and push people to use root=dissect instead.
* Once
https://github.com/util-linux/util-linux/commit/508fb0e7ac103b68531a59db2a4473897853ab52
has hit the prominent distributions, revert --issue-file= hack in units/*getty*service.in
Features:
* Maybe introducean InodeRef structure inspired by PidRef, which references a

View File

@ -188,7 +188,7 @@ manager, please consider supporting the following interfaces.
activation work. The protocol to hand sockets from systemd to services is
hence the same as from the container manager to the container systemd. For
further details see the explanations of
[sd_listen_fds(1)](https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html)
[sd_listen_fds(1)](https://0pointer.de/public/systemd-man/sd_listen_fds.html)
and the [blog story for service
developers](https://0pointer.de/blog/projects/socket-activation.html).

View File

@ -7,16 +7,7 @@ SPDX-License-Identifier: LGPL-2.1-or-later
# Compatibility with SysV
Since systemd v260, support for SysV functionality has been removed.
The documentation below is preserved for historical reference only.
A few interfaces are optionally kept for backward compatibility.
When systemd is compiled with the `-Dcompat-sysv-interfaces=true` setting,
legacy interfaces are provided,
e.g. the `runlevelX.target` aliases,
and lock directories in under `/var` and `/run`.
This option may be extended to cover other deprecated interfaces in the future.
Since systemd v260, support for SysV functionalities has been removed. The documentation below is preserved for historical references only.
## Pre v260 state
@ -30,7 +21,7 @@ Many of the incompatibilities are specific to distribution-specific extensions o
* LSB header dependency information matters. The SysV implementations on many distributions did not use the dependency information encoded in LSB init script headers, or used them only in very limited ways. Due to that they are often incorrect or incomplete. systemd however fully interprets these headers and follows them closely at runtime (and not at installation time like some implementations).
* Timeouts apply to all init script operations in systemd. While on SysV systems a hanging init script could freeze the system on systemd all init script operations are subject to a timeout of 5min.
* Services are executed in completely clean execution contexts, no context of the invoking user session is inherited. Not even $HOME or similar are set. Init scripts depending on these will not work correctly.
* Services cannot read from stdin, as this will be connected to /dev/null. That means interactive init scripts are not supported (i.e. Debian's X-Interactive in the LSB header is not supported either.) Thankfully most distributions do not support interaction in init scripts anyway. If you need interaction to ask disk or SSL passphrases please consider using the minimal password querying framework systemd supports. ([details](/PASSWORD_AGENTS), [manual page](https://www.freedesktop.org/software/systemd/man/latest/systemd-ask-password.html))
* Services cannot read from stdin, as this will be connected to /dev/null. That means interactive init scripts are not supported (i.e. Debian's X-Interactive in the LSB header is not supported either.) Thankfully most distributions do not support interaction in init scripts anyway. If you need interaction to ask disk or SSL passphrases please consider using the minimal password querying framework systemd supports. ([details](/PASSWORD_AGENTS), [manual page](https://0pointer.de/public/systemd-man/systemd-ask-password.html))
* Additional verbs for init scripts are not supported. If your init script traditionally supported additional verbs for your init script simply move them to an auxiliary script.
* Additional parameters to the standard verbs (i.e. to "start", "stop" and "status") are not supported. This was an extension of SysV that never was standardized officially, and is not supported in systemd.
* Overriding the "restart" verb is not supported. This verb is always implemented by systemd itself, and consists of a "stop" followed by a "start".

View File

@ -4206,21 +4206,21 @@ static int message_parse_fields(sd_bus_message *m, bool got_ctrunc) {
* we also accept fewer fds than declared. Any attempt to actually use a truncated fd will fail later
* when sd_bus_message_read_basic() finds the fd index out of range. Too many fds is always wrong. */
if (m->n_fds > n_unix_fds_declared)
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
"Received a bus message with too many fds: %" PRIu32 " received vs. %" PRIu32 " declared.",
return log_error_errno(SYNTHETIC_ERRNO(EBADMSG),
"Received a bus message with too many fds: %" PRIu32 " received vs. %" PRIu32 " declared",
m->n_fds, n_unix_fds_declared);
if (m->n_fds < n_unix_fds_declared) {
if (!got_ctrunc)
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
"Received a bus message with too few fds: %" PRIu32 " received vs. %" PRIu32 " declared.",
return log_error_errno(SYNTHETIC_ERRNO(EBADMSG),
"Received a bus message with too few fds: %" PRIu32 " received vs. %" PRIu32 " declared",
m->n_fds, n_unix_fds_declared);
log_debug("Received a bus message with MSG_CTRUNC set with %" PRIu32 " fds received vs. %" PRIu32 " declared.",
log_error("Received a bus message with MSG_CTRUNC set with %" PRIu32 " fds received vs %" PRIu32 " declared",
m->n_fds, n_unix_fds_declared);
} else if (got_ctrunc)
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
return log_error_errno(SYNTHETIC_ERRNO(EBADMSG),
"Received a bus message with truncated control data, refusing.");
switch (m->header->type) {

View File

@ -33,11 +33,10 @@
* The first two provide a nice way for hosts to connect to containers and VMs they invoke via the usual SSH
* logic, but without waiting for networking or suchlike. The third allows the same for local clients. */
static const char *arg_dest = NULL;
static bool arg_auto = true;
static char **arg_listen_extra = NULL;
STATIC_DESTRUCTOR_REGISTER(arg_listen_extra, strv_freep);
static int parse_proc_cmdline_item(const char *key, const char *value, void *data) {
int r;
@ -356,6 +355,9 @@ static int add_extra_sockets(
assert(sshd_binary);
assert(generated_sshd_template_unit);
if (strv_isempty(arg_listen_extra))
return 0;
STRV_FOREACH(i, arg_listen_extra) {
_cleanup_free_ char *service = NULL, *socket = NULL;
@ -443,7 +445,7 @@ static int parse_credentials(void) {
static int run(const char *dest, const char *dest_early, const char *dest_late) {
int r;
assert(dest);
assert_se(arg_dest = dest);
r = proc_cmdline_parse(parse_proc_cmdline_item, /* userdata= */ NULL, /* flags= */ 0);
if (r < 0)

View File

@ -17,7 +17,7 @@ Before=getty.target
ConditionPathExists=/dev/console
[Service]
ExecStart=-{{AGETTY}} --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM}
ExecStart=-{{AGETTY}} --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d --keep-baud 115200,57600,38400,9600 - ${TERM}
Type=idle
Restart=always
UtmpIdentifier=cons

View File

@ -22,7 +22,7 @@ Conflicts=rescue.service
Before=rescue.service
[Service]
ExecStart=-{{AGETTY}} --noreset --noclear - ${TERM}
ExecStart=-{{AGETTY}} --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d - ${TERM}
Type=idle
Restart=always
RestartSec=0

View File

@ -31,7 +31,7 @@ Before=rescue.service
ConditionPathExists=/dev/tty0
[Service]
ExecStart=-{{AGETTY}} --noreset --noclear - ${TERM}
ExecStart=-{{AGETTY}} --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d - ${TERM}
Type=idle
Restart=always
RestartSec=0

View File

@ -27,7 +27,7 @@ Conflicts=rescue.service
Before=rescue.service
[Service]
ExecStart=-{{AGETTY}} --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM}
ExecStart=-{{AGETTY}} --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d --keep-baud 115200,57600,38400,9600 - ${TERM}
Type=idle
Restart=always
UtmpIdentifier=%I