summaryrefslogtreecommitdiffstats
path: root/g10/revoke.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-06-25 20:25:28 +0200
committerWerner Koch <wk@gnupg.org>2014-06-30 09:12:48 +0200
commitc434de4d83ccfaca8bde51de5c2ac8d9656e4e18 (patch)
tree07987f47300ad446063273961acf0437af24a2d2 /g10/revoke.c
parentcommon: Minor code cleanup for a legacy OS. (diff)
downloadgnupg2-c434de4d83ccfaca8bde51de5c2ac8d9656e4e18.tar.xz
gnupg2-c434de4d83ccfaca8bde51de5c2ac8d9656e4e18.zip
gpg: Create exported secret files and revocs with mode 700.
* common/iobuf.c (direct_open): Add arg MODE700. (iobuf_create): Ditto. * g10/openfile.c (open_outfile): Add arg RESTRICTEDPERM. Change call callers to pass 0 for it. * g10/revoke.c (gen_desig_revoke, gen_revoke): Here pass true for new arg. * g10/export.c (do_export): Pass true for new arg if SECRET is true. -- GnuPG-bug-id: 1653. Note that this works only if --output has been used.
Diffstat (limited to 'g10/revoke.c')
-rw-r--r--g10/revoke.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/revoke.c b/g10/revoke.c
index 46fa87082..1c52ddad7 100644
--- a/g10/revoke.c
+++ b/g10/revoke.c
@@ -328,7 +328,7 @@ gen_desig_revoke( const char *uname, strlist_t locusr )
if( !opt.armor )
tty_printf(_("ASCII armored output forced.\n"));
- if( (rc = open_outfile (-1, NULL, 0, &out )) )
+ if( (rc = open_outfile (-1, NULL, 0, 1, &out )) )
goto leave;
afx->what = 1;
@@ -518,7 +518,7 @@ gen_revoke (const char *uname)
if (!opt.armor)
tty_printf (_("ASCII armored output forced.\n"));
- if ((rc = open_outfile (-1, NULL, 0, &out )))
+ if ((rc = open_outfile (-1, NULL, 0, 1, &out )))
goto leave;
afx->what = 1;