From c434de4d83ccfaca8bde51de5c2ac8d9656e4e18 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 25 Jun 2014 20:25:28 +0200 Subject: 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. --- g10/dearmor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g10/dearmor.c') diff --git a/g10/dearmor.c b/g10/dearmor.c index d84fb30de..3fdd57dae 100644 --- a/g10/dearmor.c +++ b/g10/dearmor.c @@ -64,7 +64,7 @@ dearmor_file( const char *fname ) push_armor_filter ( afx, inp ); - if( (rc = open_outfile (-1, fname, 0, &out )) ) + if( (rc = open_outfile (-1, fname, 0, 0, &out)) ) goto leave; while( (c = iobuf_get(inp)) != -1 ) @@ -110,7 +110,7 @@ enarmor_file( const char *fname ) } - if( (rc = open_outfile (-1, fname, 1, &out )) ) + if( (rc = open_outfile (-1, fname, 1, 0, &out )) ) goto leave; afx->what = 4; -- cgit v1.2.3