diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2023-10-03 09:51:46 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2023-10-06 02:54:06 +0200 |
commit | e783866f414097e38fb1cf0061005989d11c468b (patch) | |
tree | bdd7db8c1671217ada35b3e589fd1a807eb1fd3b /tools/gpgconf.c | |
parent | tests:tpm2dtests: Fix tests with TPM2D. (diff) | |
download | gnupg2-e783866f414097e38fb1cf0061005989d11c468b.tar.xz gnupg2-e783866f414097e38fb1cf0061005989d11c468b.zip |
tools: Add TPM2DAEMON_SOCK_NAME for --remove-socketdir.
* tools/gpgconf.c (main): Care about tpm2d. Emit correct ERR.
--
Cherry-picked from master commit of:
25c84ffd1078e6619761aa731a82dbaf4175c02e
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'tools/gpgconf.c')
-rw-r--r-- | tools/gpgconf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c index 6dcdc9f3c..f34248c40 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -963,7 +963,8 @@ main (int argc, char **argv) GPG_AGENT_SSH_SOCK_NAME, SCDAEMON_SOCK_NAME, KEYBOXD_SOCK_NAME, - DIRMNGR_SOCK_NAME + DIRMNGR_SOCK_NAME, + TPM2DAEMON_SOCK_NAME }; int i; char *p; @@ -976,8 +977,11 @@ main (int argc, char **argv) xfree (p); } if (gnupg_rmdir (socketdir)) - gc_error (1, 0, "error removing '%s': %s", - socketdir, gpg_strerror (err)); + { + err = gpg_error_from_syserror (); + gc_error (1, 0, "error removing '%s': %s", + socketdir, gpg_strerror (err)); + } } else if (gpg_err_code (err) == GPG_ERR_ENOENT) gc_error (0, 0, "warning: removing '%s' failed: %s", |