summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* shared/conf-parser: add function which implements the standard config file setZbigniew Jędrzejewski-Szmek2024-03-073-1/+155
| | | | | Also allow config_parse_many() to be called for config files without sections. The test uses such a file.
* shared/conf-parser: use chase() in config_parse_many_files()Zbigniew Jędrzejewski-Szmek2024-03-072-21/+18
| | | | | | | | | | | | | | | The function was partially implementing chroot lookups. It would be given file names that were prefixed with the chroot, so it would mostly work. But if any of those files were symlinks, fopen() would do the wrong thing. Also we don't need locking. So give 'root' as the argument and use chase_and_fopen_unlocked() to get proper chroot-aware lookups. The only place where config_parse_many() is called with root is is repart.c. So this is a follow-up for e594a3b154bd06c535a934a1cc7231b1ef76df73 and 34f2fd5096cdb26ef57998740b1b876332d968fc.
* strv: add helper to extend strv from both sidesZbigniew Jędrzejewski-Szmek2024-03-077-10/+29
| | | | | | Also, use the more correct type of 'const char* const*' for the input strv. This requires adding the cast in a few places, but also allows to remove some casts in others.
* udevd: inline iterator variableZbigniew Jędrzejewski-Szmek2024-03-071-3/+2
|
* udev,backlight,kernel-install: reword sentences starting with "Skipping to"Zbigniew Jędrzejewski-Szmek2024-03-074-7/+7
| | | | | | | That's not gramatically correct. In backlight, change "assocation" to "deduplication". Without the context, it's probably not clear at all that we "associate" them to ignore them.
* shared/pretty-print: rename output parametersZbigniew Jędrzejewski-Szmek2024-03-071-4/+4
|
* shared/conf-parser: collapse pkgdir and conf_file args into oneZbigniew Jędrzejewski-Szmek2024-03-0716-36/+24
| | | | | | | | | | This essentially reverts 5656cdfeeabc16b5489f5ec7a0a36025a2ec1f23. I find it much easier to understand what is going on when the path-relative-to-the-search-path is passed in full, instead of being constructed from two parts, with one of the parts being implicit in some places. Also, we call 'systemd-analyze cat-config <path>' with <path> with the same meaning, so this makes the internal and external APIs more consistent.
* constants: drop duplicated CONF_PATHS definesZbigniew Jędrzejewski-Szmek2024-03-075-26/+9
| | | | Follow-up for b0d3095fd6cc1791a38f57a1982116b4475244ba.
* various: use modern strv helpersZbigniew Jędrzejewski-Szmek2024-02-285-10/+6
| | | | | If we're building a strv, let's just use strv_new() with the CONF_PATHS macro, which gives as an exploded string set.
* docs: show mkosi project on websitehulkoba2024-02-211-0/+1
|
* Merge pull request #31426 from YHNdnzj/logind-minor-cleanupLuca Boccassi2024-02-213-161/+171
|\ | | | | logind: some cleanups
| * logind-dbus: clean up manager_{start,stop,kill}_unitMike Yuan2024-02-212-41/+51
| |
| * logind-dbus: rearrange functionsMike Yuan2024-02-211-119/+119
| |
| * logind-session-dbus: drop unneeded unref_and_replaceMike Yuan2024-02-211-1/+1
| | | | | | | | | | If there's pending s->upgrade_message, we already return early above.
* | networkd: support setting dhcp server portMartin Ivicic2024-02-216-4/+37
| |
* | network: DHCP6 Allow to export DHCP6 DUID (#31355)Susant Sahani2024-02-211-0/+27
| | | | | | | | We did not support the export of DHCP6 DUID. Let's add this. Some applications may use it.
* | cryptsetup-tokens: fix typo in commentsAntonio Alvarez Feijoo2024-02-211-2/+2
| |
* | homectl: make sure we sent the full 8 bytes as flagsFrantisek Sumsal2024-02-211-2/+2
|/ | | | | | | | | | | Otherwise weird stuff happens on the other side: [1217111.957263] testsuite-46.sh[61]: + homectl create test-user --disk-size=min --luks-discard=yes --image-path=/home/test-user.home --luks-pbkdf-type=pbkdf2 --luks-pbkdf-time-cost=1ms [1217112.598219] homectl[66]: Operation on home test-user failed: Provided flags are unsupported (0ad2578000000000). (taken from TEST-46-HOME run on armv7l) Fixes issue mentioned in https://github.com/systemd/systemd/pull/31419#issuecomment-1955117397.
* Merge pull request #31405 from yuwata/network-ndisc-reachable-timeYu Watanabe2024-02-2113-116/+366
|\ | | | | network/ndisc: set neighbor reachable time
| * network/ndisc: set IPv6 neighbor reachable timeYu Watanabe2024-02-205-0/+56
| | | | | | | | Closes #31402.
| * sd-ndisc: introduce sd_ndisc_router_get_reachable_time()Yu Watanabe2024-02-203-0/+11
| |
| * network/ndisc: ignore most fields of RA header when lifetime is zeroYu Watanabe2024-02-201-2/+22
| |
| * network/ndisc: drop configurations when received RA with zero lifetimeYu Watanabe2024-02-201-19/+108
| |
| * sd-ndisc: allow to call sd_ndisc_router_get_lifetime() with NULL for 'ret'Yu Watanabe2024-02-201-3/+4
| |
| * sd-ndisc: introduce sd_ndisc_is_running()Yu Watanabe2024-02-202-5/+13
| |
| * sd-ndisc: split sd-ndisc.h into small piecesYu Watanabe2024-02-208-87/+152
| |
* | Merge pull request #31419 from AdrianVovk/fixup-largefile-defineMike Yuan2024-02-214-8/+42
|\ \ | | | | | | Fixup largefile define
| * | fd-util: Add helpers to check if FD flags are safeAdrian Vovk2024-02-203-6/+23
| | | | | | | | | | | | | | | | | | | | | Adds a SAFE_FD_FLAGS define to list out all the safe FD flags, and also an UNSAFE_FD_FLAGS() macro to strip out the safe flags and leave only the unsafe flags. This can be used to quickly check if any unsafe flags are set and print them for diagnostic purposes
| * | missing_fcntl: Fix RAW_O_LARGEFILEAdrian Vovk2024-02-201-2/+19
| | | | | | | | | | | | | | | | | | | | | This value is actually arch-specific, so this commit defines it for all the arches that set it to some custom value Fixes https://github.com/systemd/systemd/issues/31417
* | | Merge pull request #31408 from mrc0mmand/verify-unit-files-v2Yu Watanabe2024-02-215-1/+79
|\ \ \ | | | | | | | | test: verify our own units (where applicable)
| * | | test: verify our own units (where applicable)Frantisek Sumsal2024-02-203-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is inspired by one of our internal tests that does pretty much the same thing. However, it is slightly more convoluted than I'd like it to be, since I really don't want to duplicate the list of our units in another place, so we need to, somehow, pass the list from the meson file to the test script. I originally envisioned this to be a part of the unit test suite, but this doesn't work for unit files with absolute paths to binaries, as we'd have to install the build first (maybe using a chroot would work?). It doesn't check man pages (since they might not be installed on the test machine) and also skip recursive dependencies (as that would trip over issues in files that are not under our direct control), but it should still cover typos and such. There are currently two units for which the check had to be disabled - syslog.socket, as the corresponding syslog.service might not be installed, and rc-local.service as that's a compat API and the necessary /etc/rc.d/rc.local file may not (and most likely won't be) present.
| * | | test: fix mixed indentFrantisek Sumsal2024-02-201-1/+1
| | | |
| * | | test: support TEST_MATCH_* stuff in TEST-23-UNIT-FILE as wellFrantisek Sumsal2024-02-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TEST-23 uses run_subtests_with_signals() which I forgot about when introducing the change. Follow-up for 0efa27bd4b.
* | | | Merge pull request #31400 from poettering/askpw-reworkLuca Boccassi2024-02-2130-260/+458
|\ \ \ \ | | | | | | | | | | Password Asking rework
| * | | | cryptsetup: drop "headless" bool, make it a flag in AskPasswordFlags insteadLennart Poettering2024-02-2016-61/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bool controls whether we should interactively ask for a password, which is pretty much what the ask_password-api.c APIs are about. Hence, just make the bool a flag in AskPasswordFlags enum, and use it everywhere. This still catches the flag early in upper levels of the codebase, exactly as before, but if the flag is still present in the lower layers it's also handled there and results in ENOEXEC if seen. This is mostly an excercise in simplifying our ridiculously long function call parameter lists a bit.
| * | | | man: tweak cryptsetup credentials docs a bitLennart Poettering2024-02-202-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's bring the credentials into a better order, in order of relevance. Also, let's clarify what the generic LUKS PIN is about. Finally, list the credentials in system-credentials(7) too, after all people might want to unlock a disk with this via SMBIOS Type 11 or so.
| * | | | man: now that the crdentials used by systemd-cryptenroll are in order, ↵Lennart Poettering2024-02-201-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | document them Replaces: #31370
| * | | | cryptsetup-pkcs11: also plug credential name to use to credential pluginLennart Poettering2024-02-203-1/+12
| | | | |
| * | | | cryptenroll,cryptsetup: clean up unlock credential for TPM2 + FIDO2Lennart Poettering2024-02-207-32/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's make sure that when cryptenroll asks for the TPM2 or FIDO2 token PIN it uses cryptenroll.* credential namespace, and cryptsetup uses cryptsetup.*.
| * | | | pkcs11-util: clean up credential handling for PKCS11 PINLennart Poettering2024-02-204-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | similar as the previous commit, let's clean up the credential name we use. Use home.token-pin in case of homectl, and cryptenroll.pkcs11-pin in case of cryptenroll.
| * | | | cryptenroll: use a different credential for new new PINLennart Poettering2024-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TPM2 enrollment is the only of the three token enrollments where the user picks a PIN at enrollment time (the others have a PIN set for the token, not for the enrollment). Let's make sure it uses a different credential for retrieving this PIN, in order to make sure people can programmatically change PINs via credentials (in which case they need to supply both).
| * | | | libfido2: tweak credential to read fido2 PIN fromLennart Poettering2024-02-204-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Querying a fido2 PIN via askpw for enrolling is currently used in two places: cryptenroll and homectl. So far we sloppily used the same fixed credential name "fido2-pin" in both cases. Let's tweak that and make the credential name match the other credentials cryptenroll or home query, i.e. using the cryptenroll.* and home.* namespaces. This is particular done in light of #31370, which wants to make the credential name public. We really should get the name in order before making it public.
| * | | | pcrlock: normalize credential name for TPM2 PINLennart Poettering2024-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's drop the "systemd-" prefix from the credential name. We do not prefix credentials that way so far. Don't do so here either. The name is not really API, it's not documented, hence change it now where we still can.
| * | | | cryptenroll: use correct askpw id for pw requestLennart Poettering2024-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "id" is used in the askpw protocol to recognize password prompts, in case a service is replying to them and needs some id. Previously we set an incorrect id, the one of cryptsetup. Fix that. (I guess the id is not used much, it comes from a time where we had no credentials, and thus some people wanted to supply passphrases programmatically rather interactively. The usecase is probably gone, but we should still set some valid id I guess.)
| * | | | dissect-image: use strv_free_erase() at one more placeLennart Poettering2024-02-201-1/+1
| | | | |
| * | | | cryptenroll: fix type confusion on acquire_tpm2_key() parameterLennart Poettering2024-02-201-1/+1
| | | | |
| * | | | ask-password: rework how we pass request meta info when asking passwordsLennart Poettering2024-02-2016-154/+263
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than adding more and more parameters to ask_password_auto(), let's pass a structure of the fields that often are constant anyway. This way, callers can fill in what they need, and we take the filled structure which we can pass around internally as one. This is in particular preparation for adding one more field in one of the next commits.
* / | | analyze: always recommend saving the output to a fileZbigniew Jędrzejewski-Szmek2024-02-202-4/+10
|/ / / | | | | | | | | | | | | | | | | | | | | | The command will refuse to write to a TTY, so give a strong hint that redirecting to a file is recommended. This makes the synopsis, man page text, and --help output consistent. Also drop the space after the redirection operator everywhere.
* | | core/mount: if umount(8) fails but mount disappeared, assume successMike Yuan2024-02-201-8/+12
| | | | | | | | | | | | Fixes #31337
* | | hwdb: Add support for MetawillBook01 to 60-sensor.hwdbZmyeir2024-02-201-0/+9
| | | | | | | | | | | | Add accel orientation quirk for the METAPHYUNI MetawillBook01 2-in-1 laptop