diff options
Diffstat (limited to 'g10/tdbio.c')
-rw-r--r-- | g10/tdbio.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c index b840d723a..8ea24c744 100644 --- a/g10/tdbio.c +++ b/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; |