diff options
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | TODO | 17 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | g10/ChangeLog | 11 | ||||
-rw-r--r-- | g10/encode.c | 6 | ||||
-rw-r--r-- | g10/openfile.c | 10 | ||||
-rw-r--r-- | g10/plaintext.c | 4 | ||||
-rw-r--r-- | g10/progress.c | 2 | ||||
-rw-r--r-- | g10/sign.c | 2 | ||||
-rw-r--r-- | g10/tdbdump.c | 2 | ||||
-rw-r--r-- | include/iobuf.h | 1 | ||||
-rw-r--r-- | util/ChangeLog | 5 | ||||
-rw-r--r-- | util/fileutil.c | 2 | ||||
-rw-r--r-- | util/iobuf.c | 10 |
14 files changed, 52 insertions, 27 deletions
@@ -1,3 +1,8 @@ +2004-10-13 Werner Koch <[email protected]> + + * configure.ac: Actually name the option --disable-finger and not + http. + 2004-10-11 Werner Koch <[email protected]> * configure.ac: New option --disable-finger. @@ -6,18 +6,11 @@ 20% faster and the crc32 code about 50% faster. Some memory leaks were also fixed according to the ChangeLog. - If it can help you, here is what I did to update the distribution is - to remove all files in the zlib folder except Makefile.am. To copy all - the file in the zlib121.zip archive to the zlib folder with the - exception of configure, example.c, FAQ, INDEX, Makefile, Makefile.in - and zlib.3. I then edited Makefile.am to match the new file list and - * Reword the "Not enough entropy" messages. * Do we need a configure test for putenv? - * Check for consistent spelling of user ID, key ID etc. - Replace "user id not found" in getkey.c by "no valid user ID found". + * Replace "user id not found" in getkey.c by "no valid user ID found"? * Describe some pitfalls when using EGD. Check that ~/.gnupg/entropy really is the default. What about needed permission? @@ -37,7 +30,9 @@ * Check the changes to the gpg random gatherer on all W32 platforms. - * Show more info does not work from edit->trust + * Show more info does not work from edit->trust. We should give more + information on the user ID under question while running + --update-trustdb. * Check that no secret temporary results are stored in the result parameter of the mpi functions. We have already done this for mpi-mul.c @@ -109,11 +104,9 @@ * allow the use of option in gpg.conf. - * export-secret-subkey where only one of the subkeys gets exported. - * Add the NEWSIG status. - * When generating a key onh the card we should try to also set the + * When generating a key on the card we should try to also set the display name or provide the display name as a default in the key generation. The problem however is that the display name must be given with an indication of the surname and the usable characters diff --git a/configure.ac b/configure.ac index 12bc382cc..817b827ab 100644 --- a/configure.ac +++ b/configure.ac @@ -304,7 +304,7 @@ if test "$use_exec" = yes ; then AC_MSG_RESULT($try_http) AC_MSG_CHECKING([whether Finger key fetching support is requested]) - AC_ARG_ENABLE(http, + AC_ARG_ENABLE(finger, AC_HELP_STRING([--disable-finger], [disable Finger key fetching interface]), try_finger=$enableval, try_finger=yes) diff --git a/g10/ChangeLog b/g10/ChangeLog index bb4371637..b9c31048e 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,14 @@ +2004-10-13 Werner Koch <[email protected]> + + * openfile.c (overwrite_filep, make_outfile_name, open_outfile) + (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so + that special filesnames are taken into account. This is bug 327. + * tdbdump.c (import_ownertrust): Ditto. + * sign.c (write_plaintext_packet): Ditto. + * progress.c (handle_progress): Ditto. + * plaintext.c (handle_plaintext): Ditto. + * encode.c (encode_simple, encode_crypt): Ditto. + 2004-10-12 Werner Koch <[email protected]> * keygen.c (read_parameter_file): Changed to use iobuf based file diff --git a/g10/encode.c b/g10/encode.c index 29b39975e..1a6ca6da7 100644 --- a/g10/encode.c +++ b/g10/encode.c @@ -293,8 +293,8 @@ encode_simple( const char *filename, int mode, int use_seskey ) either partial length or fixed length with the new style messages. */ - if (filename && *filename && !(*filename == '-' && !filename[1]) - && !opt.textmode ) { + if ( !iobuf_is_pipe_filename (filename) && filename && *filename + && !opt.textmode ) { off_t tmpsize; if ( !(tmpsize = iobuf_get_filelength(inp)) ) @@ -582,7 +582,7 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey ) } } - if (filename && *filename && !(*filename == '-' && !filename[1]) + if (!iobuf_is_pipe_filename (filename) && *filename && !opt.textmode ) { off_t tmpsize; diff --git a/g10/openfile.c b/g10/openfile.c index b3f6e436b..3f52b613b 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -64,8 +64,8 @@ int overwrite_filep( const char *fname ) { - if( !fname || (*fname == '-' && !fname[1]) ) - return 1; /* writing to stdout is always okay */ + if( iobuf_is_pipe_filename (fname) ) + return 1; /* Writing to stdout is always okay */ if( access( fname, F_OK ) ) return 1; /* does not exist */ @@ -98,7 +98,7 @@ make_outfile_name( const char *iname ) { size_t n; - if( (!iname || (*iname=='-' && !iname[1]) )) + if ( iobuf_is_pipe_filename (iname) ) return m_strdup("-"); n = strlen(iname); @@ -174,7 +174,7 @@ open_outfile( const char *iname, int mode, IOBUF *a ) int rc = 0; *a = NULL; - if( (!iname || (*iname=='-' && !iname[1])) && !opt.outfile ) { + if( iobuf_is_pipe_filename (iname) && !opt.outfile ) { if( !(*a = iobuf_create(NULL)) ) { log_error(_("%s: can't open: %s\n"), "[stdout]", strerror(errno) ); rc = G10ERR_CREATE_FILE; @@ -269,7 +269,7 @@ open_sigfile( const char *iname, progress_filter_context_t *pfx ) IOBUF a = NULL; size_t len; - if( iname && !(*iname == '-' && !iname[1]) ) { + if( !iobuf_is_pipe_filename (iname) ) { len = strlen(iname); if( len > 4 && ( !strcmp(iname + len - 4, EXTSEP_S "sig") || ( len > 5 && !strcmp(iname + len - 5, EXTSEP_S "sign") ) diff --git a/g10/plaintext.c b/g10/plaintext.c index e32272232..8918d199c 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -105,8 +105,8 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( nooutput ) ; - else if( !*fname || (*fname=='-' && !fname[1])) { - /* no filename or "-" given; write to stdout */ + else if ( iobuf_is_pipe_filename (fname) ) { + /* No filename or "-" given; write to stdout. */ fp = stdout; #ifdef HAVE_DOSISH_SYSTEM setmode ( fileno(fp) , O_BINARY ); diff --git a/g10/progress.c b/g10/progress.c index bb414faae..42b5ae89e 100644 --- a/g10/progress.c +++ b/g10/progress.c @@ -105,7 +105,7 @@ handle_progress (progress_filter_context_t *pfx, IOBUF inp, const char *name) if (!is_status_enabled ()) return; - if (name && *name && !(*name == '-' && !name[1])) + if ( !iobuf_is_pipe_filename (name) && name && *name ) filesize = iobuf_get_filelength (inp); else if (opt.set_filesize) filesize = opt.set_filesize; diff --git a/g10/sign.c b/g10/sign.c index 5942fa59b..c2d84459a 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -543,7 +543,7 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode) } /* try to calculate the length of the data */ - if (fname && *fname && !(*fname=='-' && !fname[1])) { + if ( !iobuf_is_pipe_filename (fname) && fname && *fname ) { off_t tmpsize; if( !(tmpsize = iobuf_get_filelength(inp)) ) diff --git a/g10/tdbdump.c b/g10/tdbdump.c index b5258a914..559a208aa 100644 --- a/g10/tdbdump.c +++ b/g10/tdbdump.c @@ -131,7 +131,7 @@ import_ownertrust( const char *fname ) int rc; init_trustdb(); - if( !fname || (*fname == '-' && !fname[1]) ) { + if( iobuf_is_pipe_filename (fname) ) { fp = stdin; fname = "[stdin]"; is_stdin = 1; diff --git a/include/iobuf.h b/include/iobuf.h index 413650af8..348b9b32c 100644 --- a/include/iobuf.h +++ b/include/iobuf.h @@ -80,6 +80,7 @@ struct iobuf_struct { EXTERN_UNLESS_MAIN_MODULE int iobuf_debug_mode; void iobuf_enable_special_filenames ( int yes ); +int iobuf_is_pipe_filename (const char *fname); IOBUF iobuf_alloc(int use, size_t bufsize); IOBUF iobuf_temp(void); IOBUF iobuf_temp_with_content( const char *buffer, size_t length ); diff --git a/util/ChangeLog b/util/ChangeLog index 7c79787a2..9768748bb 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,8 @@ +2004-10-13 Werner Koch <[email protected]> + + * iobuf.c (iobuf_is_pipe_filename): New. + * fileutil.c (is_file_compressed): Use it here. + 2004-09-30 David Shaw <[email protected]> * iobuf.c (pop_filter): Make static. diff --git a/util/fileutil.c b/util/fileutil.c index c36488640..99aa0776b 100644 --- a/util/fileutil.c +++ b/util/fileutil.c @@ -200,7 +200,7 @@ is_file_compressed( const char *s, int *ret_rc ) { 4, { 0x50, 0x4b, 0x03, 0x04 } }, /* (pk)zip */ }; - if ( !s || (*s == '-' && !s[1]) || !ret_rc ) + if ( iobuf_is_pipe_filename (s) || !ret_rc ) return 0; /* We can't check stdin or no file was given */ a = iobuf_open( s ); diff --git a/util/iobuf.c b/util/iobuf.c index 1a97e564f..26cde114f 100644 --- a/util/iobuf.c +++ b/util/iobuf.c @@ -1005,6 +1005,16 @@ check_special_filename ( const char *fname ) return -1; } +/* This fucntion returns true if FNAME indicates a PIPE (stdout or + stderr) or a special file name if those are enabled. */ +int +iobuf_is_pipe_filename (const char *fname) +{ + if (!fname || (*fname=='-' && !fname[1]) ) + return 1; + return check_special_filename (fname) != -1; +} + /**************** * Create a head iobuf for reading from a file * returns: NULL if an error occures and sets errno |