From c5c4af9efda3cb9732e1f688b7b331f67ae4c877 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Tue, 10 Dec 2024 09:09:53 -0500 Subject: [PATCH] man: Improve swtpm_setup --tpm option documentation Improve the swtpm_setup --tpm option documentation that did not mention that the socket option must be passed along when swtpm is being used. Signed-off-by: Stefan Berger --- man/man8/swtpm_setup.pod | 14 +++++++++++--- src/swtpm_setup/swtpm_setup.c | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/man/man8/swtpm_setup.pod b/man/man8/swtpm_setup.pod index a8595ba58..57d4bcacd 100644 --- a/man/man8/swtpm_setup.pod +++ b/man/man8/swtpm_setup.pod @@ -37,10 +37,18 @@ will be used. Path where the TPM's state will be written to; this is a mandatory argument. Prefix with dir:// to use directory backend, or file:// to use linear file. -=item B<--tpm > +=item B<--tpm "path-to-executable socket"> -Path to the TPM executable; this is an optional argument and -by default the swtpm executable found in the PATH will be used. +Path to the TPM executable; this is an optional argument and by default the +swtpm executable found in the PATH will be used. To use 'swtpm' with this +parameter it is necessary to pass along the 'socket' parameter. To emulate +the default behavior this option could be used as follows: + +=over 2 + +--tpm "$(type -P swtpm) socket" + +=back =item B<--tpm2> diff --git a/src/swtpm_setup/swtpm_setup.c b/src/swtpm_setup/swtpm_setup.c index 406891519..ec7729174 100644 --- a/src/swtpm_setup/swtpm_setup.c +++ b/src/swtpm_setup/swtpm_setup.c @@ -923,7 +923,7 @@ static void usage(const char *prgname, const char *default_config_file) "\n" "--tpmstate : This is an alias for --tpm-state .\n" "\n" - "--tpm \n" + "--tpm ' socket'\n" " : Path to the TPM executable; this is an optional argument and\n" " by default 'swtpm' in the PATH is used.\n" "\n"