summaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-10-31terminal-util: define ANSI_OSC as macro for the OSC terminal sequence prefixLennart Poettering4-7/+12
2024-10-31ptyfwd: document why we only honour two of the three kinds of STLennart Poettering1-5/+10
2024-10-31tree-wide: prefer generating 0x1B 0x5C as ANSI sequence "ST"Lennart Poettering4-7/+14
OSC sequences can be closed with one of three terminators: 1. ASCII code 7, aka BEL, aka ^G, aka \x07, aka \a 2. ASCII code 156, aka \x9c 2. Pair of ASCII code 27 followed by ASCII code 92, aka \x1b\x5c Of these, in some corner case scenarios BEL makes problem (see #34604). Hence switch away from that wherever we use it, and prefer the \x1b\x5c instead. That's preferable over \x9c, since the latter is also a valid UTF-8 codepoint. See discussion here for example: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#the-escape-sequence Fixes: #34604
2024-10-31string-util: it's called OSC sequence, not CSO sequenceLennart Poettering1-6/+6
2024-10-31resolve: do not try to send varlink error more than onceYu Watanabe1-70/+36
After d2ebf5cc1d59e29139f06efaa3a9b2c184cdaa25, sd_varlink_error() and friends return negative errno. Fixes https://github.com/systemd/systemd/pull/34946#discussion_r1823703636.
2024-10-31NEWS: fix typoYu Watanabe1-6/+6
2024-10-31sd-varlink: update commentYu Watanabe2-2/+2
2024-10-31sd-varlink: change sd_varlink_error() to always return an errorLennart Poettering2-13/+35
Let's make sure that sd_varlink_error() always returns an error code, so that we can use it in a style "return sd_varlink_error(…);" everywhere, which has two effects: return a good error reply to clients, and exit the current stack frame with a failure code. Interestingly sd_varlink_error_invalid_parameter() already worked like this in some cases, but sd_varlink_error() itself didn't. This is an alternative to the error handling tweak proposed in #34882, but I think is a lot more generically useful, since it establishes a pattern. I checked our codebase, and this change should generally be OK without breaking callsites, since the current callers (with exception of the machined case from #34882) called sd_varlink_error() in the outermost varlink method call dispatch stack frame, where this behaviour change does not alter anything. This is similar btw, how sd_bus_error_setf() and friends always return error codes too, synthesized from its parameters.
2024-10-31sd-varlink: add helper VARLINK_STATE_WANTS_REPLY()Lennart Poettering2-4/+12
Let's add a helper that detects whether we still need to reply to a state. This should make the logic easier to follow.
2024-10-31sd-varlink: don't show error code we already decoded as part of the log messageLennart Poettering1-1/+1
2024-10-31sd-varlink: if we reply to errors without passing to callback, go through ↵Lennart Poettering1-4/+4
regular error path If replying with an error fails, we should failt the whole connection, and not leave the connection in a weird state.
2024-10-30sd-json: don't use C99 bool in public headersLennart Poettering2-3/+1
All our public headers strive to C90 compatibility with a few extensions, and thus avoided stdbool.h and bool. The sd_json_format_enabled() helper seems like a poor place to start requiring stdbool.h now. Also drop __extension__ since we are not using it anywhere else in very similar inline functions. (And we probably should drop any _sd_const declarations on inline functions. Given that the compiler has the function implementation around always, because it's in the header there's really no reason to specify this manually, the compiler can trivially figure this out on its own. But that's for another time.)
2024-10-30man: update documentation for 'networkctl reload'Yu Watanabe1-7/+16
2024-10-30test-network: test for reload of .netdev file of stacked netdevYu Watanabe1-10/+214
For issue #9627, #27177, and #34907.
2024-10-30network/netdev: replace old NetDev object with newer one on reloadYu Watanabe3-2/+80
Then, when a .netdev file of a stacked netdev is modified, the netdev can be reconfigured with the updated setting by something like the following way: ``` ip link del vlan99 networkctl reload ``` Note, removing the vlan interface in the above example may not be necessary, e.g. when only VLAN flags, egress mapping, or ingress mapping are updated. But, it is necessary when VLAN ID is updated. Closes #9627. Closes #27177. Closes #34907. Replaces #22557.
2024-10-30network/netdev: reconfigure netdev if possibleYu Watanabe1-8/+5
Some netdev configs can be modified after the interface is created. Let's allow to reconfigure existing interfaces.
2024-10-30network/netdev: move calls of netdev_attach() and netdev_request_to_create() ↵Yu Watanabe3-22/+24
to netdev_load() No functional change, preparation for later commits.
2024-10-30mkosi: Ensure we build with debuginfoDaan De Meyer4-4/+4
2024-10-30coredump: allow only empty messages after first "sentinel"Michal Sekletar1-2/+8
2024-10-30firstboot: generalize prompt_loop moreMichael Ferrari1-82/+62
Allows unifying the custom logic for the hostname and root shell. Root password prompting remains separate as it's logic is substantially different to the other prompts.
2024-10-30firstboot: use consistent wording for promptsMichael Ferrari1-8/+10
2024-10-30firstboot: clean up welcome messageMichael Ferrari1-4/+3
2024-10-30firstboot: order non-interactive options lastMichael Ferrari1-3/+3
2024-10-30test-network: add test case for reuse of existing 6rd SIT tunnelYu Watanabe1-9/+15
2024-10-30ask-password: Allow configuring the keyring timeout via an environment variableDaan De Meyer2-4/+37
In mkosi, we want an easy way to set the keyring timeout for every tool we invoke that might use systemd-ask-password to query for a password which is then stored in the kernel keyring. Let's make this possible via a new $SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC environment variable. Using an environment variable means we don't have to modify every separate tool to add a CLI option allowing to specify the timeout. In mkosi specifically, we'll set up a new session keyring for the mkosi process linked to the user keyring so that any pins in the user keyring are used if available, and otherwise we'll query for and store password in mkosi's session keyring with a zero timeout so that they stay in the keyring until the mkosi process exits at which point they're removed from the keyring.
2024-10-30logind: add BlockWeakInhibited propertyLuca Boccassi4-10/+21
Fixes https://github.com/systemd/systemd/issues/34091 Follow-up for 804874d26ac73e0af07c4c5d7165c95372f03f6d
2024-10-30core: make mount(8) and swapon(8) inherit SMACK label from systemdŁukasz Stelmach2-0/+6
By default mount(8), umount(8), swapon(8) and swapoff(8) should run with with the SMACK label inherited from systemd rather than the default one meant for services. Fixes: aa5ae9711ef3cd0c69b7fcfbd65bca05fb704a8a Follow-up-for: 20bbf5ee4c6c80599a91e7a4b7474e931a27db4a
2024-10-30network/ipvlan: do not try to update MAC addressYu Watanabe1-0/+9
2024-10-30network/macsec: IFLA_MACSEC_PORT attribute cannot be changedYu Watanabe1-6/+14
Also, though currently not supported by networkd, IFLA_MACSEC_CIPHER_SUITE, IFLA_MACSEC_ICV_LEN, IFLA_MACSEC_SCI cannot be updated.
2024-10-30network/vxlan: do not try to update several parametersYu Watanabe1-28/+42
Currently, netdev->ifindex is always zero when this function is called. So, this does not change any behavior. Preparation for later commits.
2024-10-30network/netdev: introduce netdev_can_set_mac/mtu() helper functionsYu Watanabe2-2/+33
Several netdevs cannot set IFLA_ADDRESS or IFLA_MTU attribute on update. Currently, the vtable field is unused, as we do not support updating existing netdevs. Preparation for later commits.
2024-10-30network: use newly loaded Network object if a referenced NetDev object is ↵Yu Watanabe1-2/+30
updated Even if .network file is not updated, referenced NetDev object may be different. In that case, let's use the newly loaded Network object.
2024-10-30network: drop no-op cleanupYu Watanabe5-12/+10
- network_load() is always called with an empty OrderedHashmap, renamed the output parameter to 'ret'. - When netdev_load() is called on startup, the hashmap is NULL. When it is called on reloading, the hashmap is not cleaned up. Hence, then these cleanups are always no-op. Let's drop them.
2024-10-30network/netdev: update state file when NetDev object assignment is changedYu Watanabe1-6/+17
2024-10-30network: swap asterisk and spaceYu Watanabe2-4/+4
2024-10-30github: drop workaround and use distro moldYu Watanabe1-9/+1
Now, ubuntu-24.04 has mold-2.30.0+dfsg-1build1 . See https://packages.ubuntu.com/noble/mold .
2024-10-30test-network: add test for DHCPv4 address removal on stopYu Watanabe1-0/+19
For issue #34837.
2024-10-30network: process queued remove requests before networkd is stoppedYu Watanabe4-21/+73
This makes networkd process all queued remove requests when a terminating or restarting signal is received. Otherwise, e.g. DHCPv4 address will not be removed on stop, especially when KeepConfiguration=no. Fixes a bug introduced by 85a6f300c14d75d161cbfdb3eaf5af9594400ecd and its subsequent commits. Fixes #34837. Co-authored-by: Will Fancher <elvishjerricco@gmail.com>
2024-10-30mkosi: update debian commit referenceDaan De Meyer1-1/+1
* 2f288667e0 Install sysupdate.feature manpage * 384393a955 d/systemd.postrm: delete more internal state directories on purge
2024-10-30mkosi: update arch commit referenceDaan De Meyer1-1/+1
* 62c224b60c Specify --no-rebuild when calling meson install * b5c20dc6b0 fix redirection for dash * 7fef8e4cdd upgpkg: 256.7-1: new upstream release
2024-10-30NEWS: remove duplicated entryZbigniew Jędrzejewski-Szmek1-16/+6
The same item is described below. Also reflow some paragraphs (presumably indented with emacs, which does this wrong).
2024-10-30cryptenroll,homectl,journalctl: adjust messages before qrcodesZbigniew Jędrzejewski-Szmek3-5/+3
Users will generally know what a qrcode is, so let's not treat them as dumb and explain that it can be scanned. OTOH, we should say what the qrcode contains and it is useful to give a hint why the users would want to scan it. Reword messages accordingly. (Also, don't say "to your phone", when somebody might be using a stolen phone, or something else then a phone.)
2024-10-30bsod: make message for qrcode more usefulZbigniew Jędrzejewski-Szmek2-5/+5
People know what a qrcode is. We don't need to tell them to scan it. Instead, we should say what the code contains. While at it, rename "stream" to "f" in line with the usual style.
2024-10-30test: add test coverage for EnterNamespace=Michal Sekletar2-1/+33
2024-10-30coredump: return correct error variableMichal Sekletár1-1/+1
2024-10-30coredump: rename AccessContainer= to EnterNamespace=Michal Sekletar3-9/+11
2024-10-30coredump: rework gather_pid_mount_tree_fd()Michal Sekletar1-17/+29
2024-10-30coredump: use FORK_WAITMichal Sekletar1-8/+2
2024-10-30core: add EXEC_DIRECTORY_TYPE_SHALL_CHOWN() helperLennart Poettering3-5/+12
Let's make ConfigurationDirectory= a bit less "special-casey", by hiding the fact that it's the only per-service dir we do not do chown()ing for inside of a new EXEC_DIRECTORY_TYPE_SHALL_CHOWN() helper.
2024-10-30coredump: store actual fd in appropriate variableMichal Sekletar1-3/+3