mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
* tdbio.c (tdbio_set_dbname): Create new trustdbs with user-only
permissions.
This commit is contained in:
parent
0b01b9cb62
commit
c3f1100411
@ -1,3 +1,8 @@
|
||||
2002-08-08 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* tdbio.c (tdbio_set_dbname): Create new trustdbs with user-only
|
||||
permissions.
|
||||
|
||||
2002-08-07 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* sig-check.c (signature_check2): Sanity check that the md has a
|
||||
|
@ -458,6 +458,7 @@ tdbio_set_dbname( const char *new_dbname, int create )
|
||||
TRUSTREC rec;
|
||||
int rc;
|
||||
char *p = strrchr( fname, DIRSEP_C );
|
||||
mode_t oldmask;
|
||||
|
||||
assert(p);
|
||||
*p = 0;
|
||||
@ -477,7 +478,9 @@ tdbio_set_dbname( const char *new_dbname, int create )
|
||||
if( make_dotlock( lockhandle, -1 ) )
|
||||
log_fatal( _("%s: can't make lock\n"), db_name );
|
||||
#endif /* __riscos__ */
|
||||
oldmask=umask(077);
|
||||
fp =fopen( fname, "wb" );
|
||||
umask(oldmask);
|
||||
if( !fp )
|
||||
log_fatal( _("%s: can't create: %s\n"), fname, strerror(errno) );
|
||||
fclose(fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user