mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* options.skel: Some language tweaks, and remove the load-extension
section for random gatherers. * keyring.c (create_tmp_file, rename_tmp_file): Create tmp files with user-only permissions, but restore the original permissions if the user has something special set. * openfile.c (copy_options_file): Create new options file (gpg.conf) with user-only permissions. * keydb.c (keydb_add_resource): Create new keyrings with user-only permissions.
This commit is contained in:
parent
3d85ad800d
commit
74a84ca93b
5 changed files with 71 additions and 61 deletions
|
@ -289,6 +289,7 @@ copy_options_file( const char *destdir )
|
|||
FILE *src, *dst;
|
||||
int linefeeds=0;
|
||||
int c;
|
||||
mode_t oldmask;
|
||||
|
||||
if( opt.dry_run )
|
||||
return;
|
||||
|
@ -302,7 +303,9 @@ copy_options_file( const char *destdir )
|
|||
return;
|
||||
}
|
||||
strcpy(stpcpy(fname, destdir), DIRSEP_S "gpg" EXTSEP_S "conf" );
|
||||
oldmask=umask(077);
|
||||
dst = fopen( fname, "w" );
|
||||
umask(oldmask);
|
||||
if( !dst ) {
|
||||
log_error(_("%s: can't create: %s\n"), fname, strerror(errno) );
|
||||
fclose( src );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue