summaryrefslogtreecommitdiffstats
path: root/test/TEST-24-CRYPTSETUP (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-07-19terminal-util: don't export vt_reset_keyboard() + vt_default_utf8()Lennart Poettering2-24/+22
2024-07-19terminal-util: modernize terminal_reset_ansi_seq() a bitLennart Poettering1-2/+2
Let's update the commentary a bit. Also, use a time-out of 100ms rather than 50ms for this, simply to unify on the same value used in vt_disallocate() in a similar case.
2024-07-19terminal-util: don't export terminal_reset_ioctl()/terminal_reset_ansi_seq() ↵Lennart Poettering2-104/+101
anymore We only use them in terminal-util.c, hence make them static (and move them before their first using function).
2024-07-19terminal-util: rename reset_terminal_fd() → terminal_reset_ioctl()Lennart Poettering2-4/+4
Let's put "terminal_" as prefix, like with the other reset calls, and let's make clear that this only encapsulates the ioctl-based reset logic, not the ANSI sequence based reset logic.
2024-07-19terminal-util: remove reset_terminal() as it is unusedLennart Poettering2-15/+0
2024-07-19terminal-util: don't issue "ESC c" sequence on reset, but only when erasing ↵Lennart Poettering1-3/+3
the screen ESC c is a (vaguely defined) "reset to initial state" ANSI sequence. Many terminals clear the screen in this case, but that's a bit drastic I think for most resets. ESC c was added to the reset logic in 00bc83a275fa3ca8d90579fe9597d8b651d47332 (i.e. very recently), and I don't think the effect was clear at that time. Let's keep the ESC c in place however when we actually want to clear the screen. Hence move it from reset_terminal_fd() into vt_disallocate(). Fixes: #33689
2024-07-19terminal-util: add new helper terminal_reset_defensive() that combines ↵Lennart Poettering8-8/+36
reset-by-ioctl and reset-by-sequence reasonably
2024-07-19terminal-util: add terminal_is_pty_fd() helperLennart Poettering3-0/+71
The helper checks if an fd references a pty
2024-07-19terminal-util: unify code that resets /dev/console in common helperLennart Poettering3-42/+35
We have pretty much the same code at two places, let's make it one.
2024-07-19terminal-util: reset /dev/console via ansi seq also in make_console_stdio()Lennart Poettering1-0/+4
This appears to have been the intention of 00bc83a275fa3ca8d90579fe9597d8b651d47332, judging by the comments on that.
2024-07-19terminal-util: try to initialize rows/cols via ansi sequence in ↵Lennart Poettering1-4/+5
make_console_stdio() Let's hook this up.
2024-07-19terminal-util: add helper that adjust terminal width/height from data ↵Lennart Poettering3-0/+47
acquired via ANSI sequences
2024-07-19terminal-util: add helper that queries terminal sizes via ANSI sequenceLennart Poettering3-0/+252
When we are talking to a serial terminal quite commonly the dimensions are not set properly, because the serial protocol has not handshake or similar to transfer this information. However, we can derive the dimensions via ANSI sequences too, which should get us the right information, since ANSI sequences are interpreted by the final terminal, rather than an intermediary local tty driver (which is where TIOCGWINSZ is interpreted). This adds a helper call that gets the dimensions this way.
2024-07-19terminal-util: rename set_terminal_cursor_position() → ↵Lennart Poettering4-18/+13
terminal_set_cursor_position() Let's prefix these functions with the subsystem name, and clean them up a bit. Specifically, drop the error logging, it's entirely duplicative, since every single caller does it anyway.
2024-07-19terminal-util: when querying bg color, ensure input fd and output fd refer ↵Lennart Poettering1-2/+34
to same tty Let's add an extra safety check: before issuing the ansi sequence to query the bg color, let's make sure input and output fd actually reference the same tty. because otherwise it's unlikely we'll be able to read back the response from the tty driver. This is mostly just paranoia.
2024-07-19terminal-util: remember error code from tcsetattr()Lennart Poettering1-1/+1
2024-07-19terminal-util: turn off echo on stdin, not stdoutLennart Poettering1-2/+2
This doesn't make much of a different IRL, but it feels more right that an operation that happens in input is turned off via the input fd.
2024-07-19terminal-util: don't process the same data twice when reading back bg color infoLennart Poettering1-24/+43
If we only read partial information from the tty we ended up parsing it again and again, confusing the state machine. hence, return how much data we actually processed and drop it from the buffer.
2024-07-19terminal-util: return correct error in chvt()Lennart Poettering1-1/+1
2024-07-19terminal-util: refuse a few more unexpected open flags in open_terminal()Lennart Poettering1-1/+1
2024-07-19terminal-util: trivial white space fixLennart Poettering1-1/+1
2024-07-19env-util: suppress unnecessary setenv() in setenvf()Lennart Poettering1-0/+5
2024-07-19vmspawn: make "-n" just workLennart Poettering1-2/+2
The tap network device should be called "vt-", so that that the 80-vm-vt.network file we ship by default actually matches against it. Also, turn off any qemu callout stuff, networkd is smart enough to handle all this on its own, without ugly callouts.
2024-07-19man: Mention Type=oneshot timeout directiveLucas Werkmeister1-2/+2
Make the warning for oneshot services (where RuntimeMaxSec= has no effect) more actionable by pointing to the directive people can use instead to effectively limit their runtime.
2024-07-18hwdb: add backslash and touchpad toggle mapping for Aquarius Cmp NS483Vasiliy Kovalev1-0/+9
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
2024-07-18hwdb: fix accelerometer mount matrix for Aquarius Cmp NS483Vasiliy Kovalev1-0/+2
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
2024-07-18polkit: fix typo in enum nameLuca Boccassi1-1/+1
2024-07-18l10n: fix credits for the French translationLéane GRASSER1-2/+1
2024-07-18polkit: map POLKIT_ALWAYS_QUERY to new polkit flagLuca Boccassi2-12/+10
polkitd by default just waves through requests from a root process. A new POLKIT_CHECK_AUTHORIZATION_FLAGS_ALWAYS_CHECK flag was added to main (will be part of v125 when it ships) that forces it to go through the policy checks for root too. Previous versions will just ignore it. Change the flags handling slightly so that we pass this or the interactive flags through, as the values match what polkit expects.
2024-07-18ptyfwd: reset color after two tty reset sequences, tooLennart Poettering1-1/+19
When we patch in a bg color we must make sure that when certain "reset" sequences are transferred we fix up the bg color again. Do so for \033[!p ("soft terminal reset") and \033c ("reset to initial state" aka "full reset").
2024-07-18test_ukify: add instructionsZbigniew Jędrzejewski-Szmek1-0/+9
Copied directly from a1d6dbb1c94685d7972f63ed2762fe4ba0251287.
2024-07-18test_ukify: use sha384 in the signing testsZbigniew Jędrzejewski-Szmek1-6/+6
On Fedora, with crypto policy TEST-FEDORA41, sha1 is not allowed: $ SYSTEMD_LOG_LEVEL=debug build/systemd-measure sign --linux=/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz --osrel=/tmp/tmp.osrelbl2sr77f --cmdline=/tmp/tmp.cmdlineouc7hqtj --uname=/tmp/tmp.unamecbjgesty --pcrpkey=/tmp/tmpufiadu8l --initrd=/boot/3a9d668b4db749398a4a5e78a03bffa5/6.9.7-200.fc40.x86_64/initrd --sbat=/tmp/tmp.sbataz9arpy0 --private-key=/tmp/tmppyf0gx6w --public-key=/tmp/tmpufiadu8l --bank=sha1 Measuring boot phases: enter-initrd, enter-initrd:leave-initrd, enter-initrd:leave-initrd:sysinit, enter-initrd:leave-initrd:sysinit:ready Loaded 'libtss2-esys.so.0' via dlopen() Loaded 'libtss2-rc.so.0' via dlopen() Loaded 'libtss2-mu.so.0' via dlopen() PolicyPCR calculated digest: cec1a2ccb188ddd171a2be7bfa6b31cb9148776647354eb1069e0f891ed2dbe7 Failed to initialize signature context: error:03000098:digital envelope routines::invalid digest Failed to sign PCR policy: Input/output error
2024-07-18test_ukify: do not use files from /bootZbigniew Jędrzejewski-Szmek1-19/+9
They might not be readable to the unprivileged user running the tests and it shouldn't really matter what is used. OTOH, we need a real kernel because we look at the header.
2024-07-18mkosi: update debian commit referenceLuca Boccassi1-1/+1
* 2d10c12bd5 Drop /etc/sysctl.d/99-sysctl.conf symlink * fb73af0d22 update changelog * 9d74923dd7 Move systemd-time-wait-sync to systemd-timesyncd package * 8e0914aa0d Update changelog for 256.2-1 release * 6dabf74a81 Install run0 zsh completion file * a72e454b2b Update upstream source from tag 'upstream/256.2' |\ | * cf928e099f New upstream version 256.2 * c473d940f7 d/e/checkout-upstream: switch packaging branch on upstream stable PRs * 13586fc76f d/e/checkout-upstream: do not fail if rebase fails * 19785960d1 d/e/checkout-upstream: fix shellcheck warnings * 72b215c3f0 Install zsh completion for run0 * 51f87a981e initramfs-tools: copy network drop-ins too
2024-07-18mkosi: Fix indentationDaan De Meyer1-2/+2
2024-07-18mkosi: Fix typoDaan De Meyer1-7/+6
Our config parsing is flexible enough that this kind of worked surprisingly enough.
2024-07-18mkosi: Drop util-linux from centos/fedora packagesDaan De Meyer1-1/+0
It's already included in the packages list in mkosi.conf.
2024-07-18mkosi: Drop udev from Packages= listDaan De Meyer1-1/+0
It's pulled in via VolatilePackages=, no need to put it in Packages=.
2024-07-18mkosi: Fix formattingDaan De Meyer1-23/+24
All of our lists start on the next line, so let's make KernelCommandLine= fit that as well.
2024-07-18mkosi: Build CentOS Stream 10 images by defaultDaan De Meyer1-1/+1
CentOS Stream 10 has a newer util-linux which means the terminal gets correctly resized to the size specified by mkosi. This is a much nicer experience than CentOS Stream 9 where you're stuck on 80x24 so let's make CentOS Stream 10 the default release to build.
2024-07-18update TODOLennart Poettering1-0/+17
2024-07-18mkosi: Streamline running the integration tests without building systemdDaan De Meyer5-16/+49
Let's document in detail how to build the integration test image and run the integration tests without building systemd. To streamline the process, we stop automatically using binaries from build/ when invoking mkosi directly and don't automatically use a tools tree anymore if systemd on the host is too old. Instead, we document these options in HACKING.md and change the mkosi meson target to automatically use the current build directory as an extra binary search path for mkosi.
2024-07-18mkosi: Skip sync script if NO_BUILD is enabledDaan De Meyer1-1/+1
If we're not doing a build, there's no point in syncing either so lets skip it.
2024-07-17sd-device: remove debug log message when dirs are missingLennart Poettering1-21/+13
This is a common case, and nothing noteworthy at all. For example, if we establish an enumerator for listing all devices tagged by some tag, then the per-tag dir is not going to exist if there are currently no devices tagged that way, but that's a really common case, and doesn't really deserve any mention, not even at debug level.
2024-07-17main: show different welcome msg in initrd than on the hostLennart Poettering1-9/+19
It has bugged me for a while that we show the exact same welcome message at boot twice: once in the initrd, and once after the initrd→host transition. That's very confusing. Let's change the text a bit, and tone down the initrd message a bit (by removing the empty line before and after it), because it is the less relevant one.
2024-07-17varlink-util: minor tweakLennart Poettering1-4/+3
Apparently I forgot that in the initial PR. Fix that. https://github.com/systemd/systemd/pull/33714#pullrequestreview-2177885475
2024-07-17table: Fix JSON name mangling breaking changesAdrian Vovk3-0/+14
In previous commits, we've changed the JSON name mangling logic. This, of course, will cause breaking changes to occur on anything that relied on the JSON mangling logic. This commit fixes those breaking changes by manually forcing the JSON name back to what it was before.
2024-07-17table: Improve mangling of JSON field namesAdrian Vovk3-7/+61
First, when displaying JSON we convert dashes into underscores. We want to avoid using dashes in JSON field names in new code, because some JSON parsers don't support dashes very well. Second, we make the first character of every word lower-case. This better matches our JSON field name style, and makes the automatic JSON name mangling a lot more useful for vertical tables, where fields are given a display name. For example, "Foo Bar" would be converted into "foo_bar" instead of "Foo_Bar", which much better matches our style. We don't make the whole string lowercase to support cases like: "fooBar" should stay as "fooBar". Some situations don't behave quite perfectly, such as "Foo BarBaz" gets converted into "foo_barBaz", or all-caps headings get mangled incorrectly. In these situations, the JSON field should be overridden manually. In most cases, or at least more cases than before, this heuristic does good enough.
2024-07-17table: Add TABLE_SET_JSON_FIELD_NAMEAdrian Vovk3-5/+34
Lets you conveniently set JSON field names in table_add_many. Especially useful for vertical tables. For example: table_add_many(t, TABLE_FIELD, "Display Name", TABLE_STRING, obj->display_name, TABLE_SET_JSON_FIELD_NAME, "displayName", TABLE_FIELD, "Timestamp", TABLE_TIMESTAMP, obj->timestamp, TABLE_SET_JSON_FIELD_NAME, "timestampUSec");
2024-07-17mkosi: Remove enforcing=0 from default kernel command lineDaan De Meyer2-2/+1
We already have selinux=0 in the default kernel command line so enforcing=0 is redundant. Instead, pass in enforcing=0 when we enable selinux in TEST-06-SELINUX.