mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner Koch
This commit is contained in:
parent
d1648b4d7a
commit
92cd255508
104 changed files with 5871 additions and 1540 deletions
22
g10/tdbio.c
22
g10/tdbio.c
|
@ -1,5 +1,5 @@
|
|||
/* tdbio.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -40,11 +40,6 @@
|
|||
#include "tdbio.h"
|
||||
|
||||
|
||||
#ifdef MKDIR_TAKES_ONE_ARG
|
||||
# undef mkdir
|
||||
# define mkdir(a,b) mkdir(a)
|
||||
#endif
|
||||
|
||||
/****************
|
||||
* Yes, this is a very simple implementation. We should really
|
||||
* use a page aligned buffer and read complete pages.
|
||||
|
@ -439,17 +434,8 @@ tdbio_set_dbname( const char *new_dbname, int create )
|
|||
assert(p);
|
||||
*p = 0;
|
||||
if( access( fname, F_OK ) ) {
|
||||
if( strlen(fname) >= 7
|
||||
&& !strcmp(fname+strlen(fname)-7, "/.gnupg" ) ) {
|
||||
if( mkdir( fname, S_IRUSR|S_IWUSR|S_IXUSR ) )
|
||||
log_fatal( _("%s: can't create directory: %s\n"),
|
||||
fname, strerror(errno) );
|
||||
else if( !opt.quiet )
|
||||
log_info( _("%s: directory created\n"), fname );
|
||||
copy_options_file( fname );
|
||||
}
|
||||
else
|
||||
log_fatal( _("%s: directory does not exist!\n"), fname );
|
||||
try_make_homedir( fname );
|
||||
log_fatal( _("%s: directory does not exist!\n"), fname );
|
||||
}
|
||||
*p = '/';
|
||||
|
||||
|
@ -1130,6 +1116,8 @@ tdbio_dump_record( TRUSTREC *rec, FILE *fp )
|
|||
fputs(", expired", fp );
|
||||
if( rec->r.dir.dirflags & DIRF_REVOKED )
|
||||
fputs(", revoked", fp );
|
||||
if( rec->r.dir.dirflags & DIRF_NEWKEYS )
|
||||
fputs(", newkeys", fp );
|
||||
}
|
||||
putc('\n', fp);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue