summaryrefslogtreecommitdiffstats
path: root/src/tpm2-setup/tpm2-setup.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-03-12fileio,data-fd-util: use U64_* moreMike Yuan2-6/+6
2024-03-12env-util: remove unneeded DISABLE_WARNING_FORMAT_NONLITERALMike Yuan1-2/+0
_printf_ is used, so this shouldn't emit a warning in the first place.
2024-03-12tests/run-unit-tests: add option to skip testsRoss Burton1-0/+8
In automated QA environments there may be tests that are known to fail, and being able to skip them is useful to remove known failures from the test log. Signed-off-by: Ross Burton <ross.burton@arm.com>
2024-03-11test/run-unit-tests: sort the test cases we're executingRoss Burton1-1/+1
When reading test logs manually it is a lot easier when the tests are sorted by name rather than by disk order. Signed-off-by: Ross Burton <ross.burton@arm.com>
2024-03-11homework-cifs: Pass password via fdAdrian Vovk1-30/+32
Pass the password into mount.cifs via a file descriptor, rather than putting it into a plain-text file in /tmp. This uses the $PASSWD_FD environment variable, which is undocumented but has existed since forever (initial commit from 2010 [1] has it already) [1]: https://git.samba.org/?p=cifs-utils.git;a=blob;f=mount.cifs.c;hb=ce0b1609a9eedce6c5eb20eab287ea44217c0a6a#l1477
2024-03-11test-network: add test case for DHCP server lease fileYu Watanabe1-0/+12
2024-03-11network/dhcp-server: save leases in state directoryYu Watanabe4-3/+74
Then, we can read the lease file on restart, and the DHCP server will be able to manage previously assigned addresses. To save leases in the state directory /var/lib/systemd/network/, this adds systemd-networkd-dhcp-server.service, and by default systemd-networkd does not start the DHCP server without the heler service started. Closes #29991.
2024-03-11fuzz-dhcp-server: also test saving and loading lease fileYu Watanabe1-1/+15
2024-03-11sd-dhcp-server: introduce sd_dhcp_server_set_lease_file() and ↵Yu Watanabe5-4/+226
dhcp_server_{save,load}_leases(). The functionality is not used networkd yet in this commit, but will be used in later commits.
2024-03-11sd-dhcp-server: also expose lease expiration timestamp in realtimeYu Watanabe1-1/+13
Here, we use map_clock_usec_raw(), instead of map_clock_usec() to reduce number of calls of now() -> clock_gettime().
2024-03-11time-util: expose map_clock_usec_internal() as map_clock_usec_raw()Yu Watanabe2-8/+9
This will be used later.
2024-03-11sd-dhcp-server-lease: move functions to build json formatYu Watanabe3-63/+69
No functional change, just preparation for later commits.
2024-03-11sd-dhcp-server: refuse invalid hostname in requestYu Watanabe3-6/+40
Currently, the received hostname is not used for assigning an address to the host, or options in the subsequent reply message. But, the parsed hostname is exposed through DBus, and possibly Varlink in the future. Let's ignore spurious hostname.
2024-03-11dhcp-option: refuse control and non-UTF8 characters in string optionYu Watanabe2-16/+20
We oftem save parsed DHCP options into a file, or expose them through DBus or Varlink. In such case, control characters or non-UTF8 characters may cause many kind of unexpected errors. In general, a DHCP message that have string options with spurious characters is mostly malformed or broken. Let's refuse them. This also makes dhcp_option_parse_string() do not free 'ret' argument, to follow our usual coding style. So, callers now need to free the pre-exisitng string if necessary. Fixes #31708.
2024-03-11test-network: add support for systemd-networkd-persistent-storage.serviceYu Watanabe2-5/+34
2024-03-11networkctl: introduce "persistent-storage" commandYu Watanabe6-18/+86
Then, this introduces systemd-networkd-persistent-storage.service. systemd-networkd.service is an early starting service. So, at the time it is started, the persistent storage for the service may not be ready, and we cannot use StateDirectory=systemd/network in systemd-networkd.service. The newly added systemd-networkd-persistent-storage.service creates the state directory for networkd, and notify systemd-networkd that the directory is usable.
2024-03-11network/varlink: introduce io.systemd.Network.SetPersistentStorage methodYu Watanabe6-2/+94
And make the networkd use state directory. Currently, the state directory and the method are not used, but will be used later.
2024-03-11data-fd-util: Fixup headerAdrian Vovk1-1/+1
inttypes.h doesn't define size_t
2024-03-11test-network: copy system unit files from build or source directoryYu Watanabe1-41/+68
Addresses https://github.com/systemd/systemd/pull/30021#issuecomment-1971090682.
2024-03-11test-network: drop unused options and variablesYu Watanabe1-45/+10
This also renames several variables, and replace RuntimeError with assert.
2024-03-11pidref: use fd_inode_same to compare pidfdsMike Yuan2-11/+28
2024-03-11stat-util: struct stat could be initialized with (st_mode & S_IFMT == 0)Mike Yuan1-2/+1
For anonymous inodes, the result would be 0, but the struct stat is initialized obviously. So let's switch to st_dev for the check, which is guaranteed to be non-zero. Also this is completely unnecessary for statx(), since we check stx_mask first and that on its own denotes that the struct is initialized.
2024-03-11stat-util: introduce fd_inode_sameMike Yuan2-2/+4
2024-03-11polkit: update the rest of bus_verify_polkit_async_full() calls to new flags ↵Luca Boccassi3-9/+9
parameter Looks like the compiler doesn't even notice these were left over as the types end up matching somehow Follow-up for 29556b75d8025580eebe160a1fa1459965912ee2
2024-03-11fd-util: beef up fd_verify_safe_flags() featuresLennart Poettering3-7/+11
Let's make fd_verify_safe_flags() even more useful: 1. let's return the cleaned up flags (i.e. just the access mode) after validation, hiding all the noise, such as O_NOFOLLOW, O_LARGEFILE and similar. 2. let's add a "full" version of the call that allows passing additional flags that are OK to be set.
2024-03-11shared/service-util: actually use the `bus_introspect` argument in `help()`Antonio Alvarez Feijoo1-10/+11
If `bus_introspect` is false, do not print the `--bus-introspect=PATH` option. Also, modernize help output.
2024-03-11tree-wide: drop custom formatting for print() help messagesAntonio Alvarez Feijoo3-18/+22
Follow-up for bc556335b1c568c98688cc1f586b5f753fcddac6
2024-03-11polkit: turn "interactive" flag to polkit APIs into a proper flags field ↵Lennart Poettering9-27/+34
(#31715) This adds for both the D-Bus and the Varlink flavours of our polkit client api a flags parameter. And then folds the "bool interactive" flag that the D-Bus version so far had, into a flag, and also adds support for it in the Varlink API. Since this means the Varlink API gained another parameter, let's do what we already did for the D-Bus API and add a _full() version of the API that has the flags and the good_uid parameter, and one without both.
2024-03-11basic: add PIDFS magic (#31709)cpackham-atlnz2-0/+6
Kernel commit cb12fd8e0dabb9a1c8aef55a6a41e2c255fcdf4b added pidfs. Update filesystems-gperf.gperf and missing_magic.h accordingly. This fixes the following error building against a bleeding edge kernel. ``` ../src/basic/meson.build:234:8: ERROR: Problem encountered: Unknown filesystems defined in kernel headers: Filesystem found in kernel header but not in filesystems-gperf.gperf: PID_FS_MAGIC ```
2024-03-11po: Translated using Weblate (Russian)Sergey A1-34/+18
Currently translated at 100.0% (233 of 233 strings) Co-authored-by: Sergey A <sw@atrus.ru> Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/ Translation: systemd/main
2024-03-11semaphore: remove workaround for adduserLuca Boccassi1-2/+0
Offending commit has been reverted, so it's no longer necessary: https://salsa.debian.org/ci-team/autopkgtest/-/commit/90167696914889efa782aac3f1f44ab68498c529 Follow-up for 8b7485c505f1e7a55896069224109adaf10c16b9
2024-03-11polkit: trivial simplificationLennart Poettering1-5/+1
2024-03-11gpt-auto: ignore fstab_has_node failureMike Yuan1-2/+2
After 8a1326581d9b066377f8d9f2d58e1bdfd8b645d0, we always check whether there're mounts under /boot/ or /efi/ first. Let's relax the check for fstab_has_node hence, since on initrd-less systems it might produce wrong results.
2024-03-11fstab-util: remove unreachable returnMike Yuan1-2/+0
2024-03-11hwdb: Add touchpad configuration for ThinkPad E495İ. Ensar Gülşen1-1/+2
2024-03-10man: Mention that SMBIOS type 11 strings are ignored inside CVMDaan De Meyer2-2/+4
2024-03-10man: fix systemd-measure manpage conditionalLuca Boccassi2-2/+2
Follow-up for ec3cf73f303cf99ba73c91b734401b3ad2c218e9
2024-03-10man/systemd-hibernate-resume: generator now enables rather than creates the ↵Mike Yuan2-8/+5
service Follow-up for a628d933cc67cc8b183dc809ba1451aa5b2996e5
2024-03-10systemd-boot: Add support for reading extra kernel cmdline from SMBIOSDaan De Meyer4-1/+44
Same as io.systemd.stub.kernel-cmdline-extra, but for type 1 entries booted by systemd-boot.
2024-03-10quotacheck: store argv[*] in static varMike Yuan1-9/+9
As per our coding style
2024-03-10quotacheck: minor modernizationMike Yuan1-4/+11
2024-03-10units: make quota services bind to corresponding mount unitsMike Yuan2-2/+3
Follow-up for a628d933cc67cc8b183dc809ba1451aa5b2996e5 systemd-growfs@.service does the same.
2024-03-10mkosi: fix typoYu Watanabe1-1/+1
Follow-up for 4d0f1451b58dbd4b94da579b800adef4f4e42c34.
2024-03-09units: make templates for quotaon and systemd-quotacheck serviceThomas Blume12-62/+186
2024-03-09semaphore: drop some manual build deps, handled by packageLuca Boccassi1-2/+2
The package now pulls in more dependencies, so can drop some. Also we don't need libarchive-dev and libcurl4-openssl-dev from backports.
2024-03-09semaphore: move back to autopkgtest master branchLuca Boccassi1-1/+3
Instead of fixing the commit, we can workaround the adduser issue by simply creating a user manually beforehand, which means the broken codepath in autopkgtest is not taken. We can remove it once it's fixed upstream, which is in progress: https://salsa.debian.org/ci-team/autopkgtest/-/merge_requests/297
2024-03-09core/exec-invoke: Fix missing arguments for PR_SET_MEMORY_MERGE callVasiliy Stelmachenok1-1/+1
Without it prctl will always fail, even if using a kernel version that supports the PR_SET_MEMORY_MERGE call.
2024-03-08resolved: also reply NOTIMP when refusing a query based on RR typeRonan Pigott1-1/+5
In some cases we refuse a query based on the RR type, mostly old deprecated types. Let's return NOTIMP in this case, which best communicates why the query failed.
2024-03-08extract-word: increase test-extract-word coverage for unicode inputsChandra Pratap1-0/+24
In the current testing scheme in test-extract-word, we only have two test cases covering unicode strings. Improve upon this by adding more cases for the same. Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
2024-03-08add unittest cases for argv_looks_like_helpAbraham Samuel Adekunle1-0/+5