diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2017-04-25 00:48:51 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2017-04-25 00:48:51 +0200 |
commit | 116cfd60779fbb3540da629db54dc2e148f4a3a2 (patch) | |
tree | 4b7111475dd0cb9285bc8d73145db4babad80a95 /g10/keyring.c | |
parent | w32: Enable wildcard expansion with mingw-w64 (diff) | |
download | gnupg2-116cfd60779fbb3540da629db54dc2e148f4a3a2.tar.xz gnupg2-116cfd60779fbb3540da629db54dc2e148f4a3a2.zip |
g10: invalidate the fd cache for keyring.
* g10/keyring.c (keyring_search_reset): Don't keep the FD cache.
--
GnuPG-bug-id: 3096
Fixes-commit: 5556eca5acd46983bff0b38a1ffbc2f07fbaba9f
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/keyring.c')
-rw-r--r-- | g10/keyring.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/g10/keyring.c b/g10/keyring.c index 51b76872f..e223f0f98 100644 --- a/g10/keyring.c +++ b/g10/keyring.c @@ -663,7 +663,6 @@ keyring_search_reset (KEYRING_HANDLE hd) { log_assert (hd); - hd->current.kr = NULL; iobuf_close (hd->current.iobuf); hd->current.iobuf = NULL; hd->current.eof = 0; @@ -671,6 +670,12 @@ keyring_search_reset (KEYRING_HANDLE hd) hd->found.kr = NULL; hd->found.offset = 0; + + if (hd->current.kr) + iobuf_ioctl (NULL, IOBUF_IOCTL_INVALIDATE_CACHE, 0, + (char*)hd->current.kr->fname); + hd->current.kr = NULL; + return 0; } |