summaryrefslogtreecommitdiffstats
path: root/src/network (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-05test: wait for verbose-success.service finishedYu Watanabe1-1/+2
Otherwise, the command 'echo' may not be invoked yet. Follow-up for 25aa35d465cf4725bc3ebd2a919e7f39ecafb920.
2024-01-05tree-wide: use JSON_ALLOW_EXTENSIONS when disptching at various placesLennart Poettering6-8/+8
If we want to allow method replies to be extended without this breaking compat, then we should set this flag. Do so at various method call replies hence. Also do it when parsing user/group records, which are expressly documented to be extensible, as well as the hibernate JSON record.
2024-01-05json: add new dispatch flag JSON_ALLOW_EXTENSIONSLennart Poettering2-8/+13
This is a subset of JSON_PERMISSIVE focussed on allowing parsing of varlink replies that get extended, i.e. gain new fields, without allowing more than that (i.e. without allowing missing fields, or bad field types or such).
2024-01-05oomd: make use of new JSON_DISPATCH_ENUM_DEFINE() macroLennart Poettering1-18/+5
2024-01-05user-record: port over to JSON_DISPATCH_ENUM_DEFINE()Lennart Poettering1-40/+5
2024-01-05test: add unit test for JSON_DISPATCH_ENUM_DEFINE()Lennart Poettering1-0/+51
2024-01-05json: add macro for automatically defining a dispatcher for an enumLennart Poettering1-0/+22
2024-01-05tpm2-util: more iovec'ificationLennart Poettering15-641/+477
Let's move more code to using struct iovec for passing around binary chunks of data. No real changes in behaviour, just refactoring.
2024-01-05test: add unit tests for the new iovec helpersLennart Poettering3-0/+79
2024-01-05iovec-util: add CONST_IOVEC_MAKE_STRING()Lennart Poettering1-0/+6
2024-01-05iovec-util: add new iovec_memdup() helperLennart Poettering1-0/+16
2024-01-05iovec-util: add new iovec_memcmp() helperLennart Poettering1-0/+11
2024-01-05iovec-util: add iovec_is_valid() helperLennart Poettering1-0/+6
2024-01-05iovec-util: rework IOVEC_MAKE_STRING() to work with compound initialized inputLennart Poettering1-6/+16
This avoids the ({}) that IOVEC_MAKE_STRING() so far used and might cause a memory corruption if the parameter passed in is itself allocated via a compount initialized array or so. Also, this makes sure both IOVEC_MAKE_STRING() and IOVEC_MAKE() accept 'const' parameters without this causing a compiler warning.
2024-01-05json: add more iovec helpers for serializing/deserializing binary dataLennart Poettering2-3/+19
2024-01-05update TODOLennart Poettering1-0/+3
2024-01-05test: fix typoYu Watanabe1-2/+2
Follow-up for 995bf013a1959d4fb5aed8b135740490888fc196.
2024-01-05man: fix typoYu Watanabe1-1/+1
Follow-up for 7d93e4af8088fae7b50eb638c6e297fb8371e307.
2024-01-05vpick: fix typoYu Watanabe2-4/+4
Follow-up for 76511c1bd32a262c76d462919083925c47cbd212.
2024-01-05login: noone -> no oneYu Watanabe1-1/+1
Follow-up for 59afe07c217c73e3c7c19fb06aef2ff7bf609fd2.
2024-01-05core/dbus-manager: fix typoYu Watanabe1-1/+1
Follow-up for 84c01612de805d88875d4d91cfcf73cf10f99447.
2024-01-05string-util: fix typoYu Watanabe1-2/+2
Follow-up for 63566c6b6ffbb747727db4d6f78c28547430d54f.
2024-01-05TODO: fix typoYu Watanabe1-1/+1
Follow-up for 97c493f2140b207ace89e9e028949ceb254fbfc6.
2024-01-05core: Add %D specifier for $XDG_DATA_HOMEAdrian Vovk2-0/+16
We already have specifiers that resolve to $XDG_STATE_HOME, and $XDG_CONFIG_HOME. $XDG_DATA_HOME is in a similar vein. It allows units belonging to the user service manager to correctly look into ~/.local/share. I imagine this would be most useful inside of condition checks (i.e. only run a service on session startup if some data is not found in ~/.local/share) or in the inotify monitoring of a .path unit
2024-01-05cryptenroll: change class in provided PKCS#11 URI if necessaryVladimir Stoiakin5-13/+63
cryptenroll accepts only PKCS#11 URIs that match both a certificate and a private key in a token. This patch allows users to provide a PKCS#11 URI that points to a certificate only, and makes possible to use output of some PKCS#11 tools directly. Internally the patch changes 'type=cert' in the provided PKCS#11 URI to 'type=private' before storing in a LUKS2 header. Fixes: #23479
2024-01-05network: do not make the implied default have the first priorityYu Watanabe2-4/+2
Follow-up for b732606950f8726c0280080c7d055a714c2888f5 and 6706ce2fd2a13df0ae5e469b72d688eaf643dac4. If Network.ignore_carrier_loss_set flag is set, then the timeout value is always used, hence the logic implemented by b732606950f8726c0280080c7d055a714c2888f5 never worked.
2024-01-05core/cgroup: use designated initializer more, make dup source constMike Yuan2-36/+40
2024-01-05Use .d path for PCRLOCK_KERNEL_*_PATHAlberto Planas1-2/+2
Fix the path for the generated.pcrlock files for the cmdline and initrd cases. Without it the tool complains with: Failed to parse component file /var/lib/pcrlock.d/720-kernel-initrd.pcrlock, ignoring: Is a directory Signed-off-by: Alberto Planas <aplanas@suse.com>
2024-01-04journalctl: add --exclude-identifier optionSergei Zhmylev8-5/+66
2024-01-04creds-util: automatically append NUL byte to decrypted credsLennart Poettering1-1/+1
Both as safety net and as convenience feature of a string is contained in the credential
2024-01-04creds: rename "tpm2-absent" encryption to "null" encryptionLennart Poettering4-14/+14
This is what it is after all: encryption with a NULL key. This is more descriptive, but also relevant since we want to use this kind of credentials in a different context soon: for carrying pcrlock data into a UKI. In that case we don#t want encryption, since the pcrlock data is intended to help unlocking secrets, hence should not be a secret itself. This only changes the code labels and the way this is labelled in the output. We retain compat with the old name.
2024-01-04find-esp: adjust parameter indentating to our usual coding styleLennart Poettering1-17/+23
2024-01-04logind: use unlink_and_free() at once more placeLennart Poettering1-5/+1
2024-01-04json: drop redundant checkLennart Poettering1-3/+0
The same check is done exactly one line later, because this is one of the things that json_variant_is_regular() checks. As per: https://github.com/systemd/systemd/pull/30578/commits/fa9a6db478e3f0f2753e4633af6d0d4881707c2b#r1441792019
2024-01-04ci: build with -O2 and -Wmaybe-uninitializedFrantisek Sumsal1-1/+6
According to the comment in meson.build this should be a supported configuration, so let's test it in the CI as well.
2024-01-04shared: initialize a couple of values explicitlyFrantisek Sumsal4-5/+5
As gcc has trouble figuring this itself with -O2 and -Wmaybe-initialized.
2024-01-04resolve: initialize `r` during OOMFrantisek Sumsal1-1/+1
Otherwise we'd use some garbage value in the error path. ../src/resolve/resolved-dns-query.c: In function ‘dns_query_accept’: ../src/resolve/resolved-dns-query.c:944:27: error: ‘r’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 944 | q->answer_errno = -r; | ^~ cc1: all warnings being treated as errors Follow-up for 9ca133e97a0.
2024-01-04test: allow sanitized binaries to dump a coreFrantisek Sumsal1-1/+1
If a binary built with ASan crashes for a reason unrelated to ASan stuff, we're left with pretty much nothing, as there is neither an ASan trace nor a coredump. Let's make this slightly more debug-able by allowing such binaries to dump a core, but without the huge shadow map (we should be actually fine by just setting disable_coredump=0, since use_madv_dontdump defaults to true, but let's play it safe and not potentially dump a 16+ TB core file).
2024-01-04test: install correct kpartx udev rules on UbuntuFrantisek Sumsal1-2/+2
Follow-up for 519f0074cf.
2024-01-04test-network: add test case about replacing nexthopYu Watanabe5-27/+190
2024-01-04test-network: merge three tests for neighborYu Watanabe6-55/+36
To speed up tests.
2024-01-04test-network: show monotonic timestamp and drop hopstname from logsYu Watanabe1-0/+2
2024-01-04tmpfiles: Use statx_timestamp_loadAdrian Vovk1-19/+7
This is a new utility function recently added. Let's use it.
2024-01-04stat-util: Add statx version of timespec_loadAdrian Vovk1-0/+8
statx_timestamp is, for all intents and purposes, the same as a struct timespec. So, we can trivially convert it and call timespec_load on it. This commit adds helper functions that do just that.
2024-01-04tmpfiles: add --purge switchLuca Boccassi3-10/+106
Any file/directory created by a tmpfiles.d will be deleted. Useful for purge/factory reset patterns.
2024-01-04Assign noDA attribute to TPM2 objects not dependant on a PINGabríel Arthúr Pétursson1-1/+10
All the keys are high-entropy keys that cannot be practically bruteforced and thus don't require protection from dictionary attacks. With the exception of PINs, of course, which are low-entropy and user provided. Note that a new enrollment is required for unlocking while in DA lockdown to function. Existing enrollments are subject to DA lockout. Fixes: #30330
2024-01-04shared/vpick: don't say "ptr" for TAKE_PICK_RESULT (struct)Mike Yuan1-1/+1
2024-01-04vpick-tool: sort includesMike Yuan1-1/+1
2024-01-04logind: rework the special casing we give root's sessionsLennart Poettering4-2/+13
Let's add an explicit session class "user-early" for this, so that change of behaviour on logind is primarily bound to the "class" property, and not some explicit root checks. This has the benefit that we can be more fine grained with implying this class: only do so for tty sessions, not others.
2024-01-04logind: explain session class types a bitLennart Poettering1-4/+4