aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keybox-update.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-03-24 12:15:30 +0000
committerWerner Koch <[email protected]>2010-03-24 12:15:30 +0000
commitf080b353ed4ea5c16ad3fda79497a0ebe3be9a7d (patch)
treece173438e276aa2ac40a254e557219ce1a25ba23 /kbx/keybox-update.c
parentReorganized the exechelp code. (diff)
downloadgnupg-f080b353ed4ea5c16ad3fda79497a0ebe3be9a7d.tar.gz
gnupg-f080b353ed4ea5c16ad3fda79497a0ebe3be9a7d.zip
More changes for CE. gpgsm does now build and run a keylisting.
Diffstat (limited to 'kbx/keybox-update.c')
-rw-r--r--kbx/keybox-update.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kbx/keybox-update.c b/kbx/keybox-update.c
index e524292d5..c3aa5dc8d 100644
--- a/kbx/keybox-update.c
+++ b/kbx/keybox-update.c
@@ -26,6 +26,9 @@
#include <unistd.h>
#include "keybox-defs.h"
+#ifdef HAVE_DOSISH_SYSTEM
+#include "../common/sysutils.h"
+#endif
#define EXTSEP_S "."
@@ -174,7 +177,7 @@ rename_tmp_file (const char *bakfname, const char *tmpfname,
if (!secret)
{
#if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__)
- remove (bakfname);
+ gnupg_remove (bakfname);
#endif
if (rename (fname, bakfname) )
{
@@ -184,7 +187,7 @@ rename_tmp_file (const char *bakfname, const char *tmpfname,
/* Then rename the file. */
#if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__)
- remove (fname);
+ gnupg_remove (fname);
#endif
if (rename (tmpfname, fname) )
{
@@ -607,7 +610,8 @@ keybox_compress (KEYBOX_HANDLE hd)
}
}
_keybox_release_blob (blob);
- rewind (fp);
+ fseek (fp, 0, SEEK_SET);
+ clearerr (fp);
}
/* Create the new file. */
@@ -709,7 +713,7 @@ keybox_compress (KEYBOX_HANDLE hd)
/* Rename or remove the temporary file. */
if (rc || !any_changes)
- remove (tmpfname);
+ gnupg_remove (tmpfname);
else
rc = rename_tmp_file (bakfname, tmpfname, fname, hd->secret);