diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 5 | ||||
-rw-r--r-- | g10/openfile.c | 14 | ||||
-rw-r--r-- | g10/passphrase.c | 8 | ||||
-rw-r--r-- | g10/signal.c | 10 |
4 files changed, 30 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 8085c097d..0e14379dd 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,12 +1,9 @@ -2010-09-28 Werner Koch <[email protected]> - - * gpgv.c (ttyfp_is, init_ttyfp) [__VMS]: Add subs. - 2010-09-28 Steven M. Schweda <[email protected]> (wk) Changes to help the VMS port. See http://antinode.info/dec/sw/gnupg.html . + * gpgv.c (ttyfp_is, init_ttyfp) [__VMS]: Add stubs. * build-packet.c (do_plaintext) [__VMS]: Disable error message. * keyserver.c (keyserver_spawn) [__VMS]: Do not add the DIRSEP_S. * misc.c [__VMS]: Include <time.h>. diff --git a/g10/openfile.c b/g10/openfile.c index 0ac5965cd..73fd5db33 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -248,8 +248,13 @@ open_outfile( const char *iname, int mode, IOBUF *a ) #endif /* USE_ONLY_8DOT3 */ { buf = xmalloc(strlen(iname)+4+1); +#ifdef __VMS + vms_append_ext (buf, iname, + mode==1 ? "asc" : mode==2 ? "sig" : "gpg"); +#else /*!def __VMS*/ strcpy(stpcpy(buf,iname), mode==1 ? EXTSEP_S "asc" : mode==2 ? EXTSEP_S "sig" : EXTSEP_S "gpg"); +#endif /*!def __VMS*/ } name = buf; } @@ -435,6 +440,15 @@ try_make_homedir( const char *fname ) fname, strerror(errno) ); else if( !opt.quiet ) log_info( _("directory `%s' created\n"), fname ); + +#ifdef __VMS + /* Explicitly remove group and world (other) access, which may + be allowed by default. */ + if (chmod (fname, S_IRWXU )) + log_fatal ("can't set protection on directory `%s': %s\n", + fname, strerror (errno)); +#endif /*def __VMS*/ + copy_options_file( fname ); /* log_info(_("you have to start GnuPG again, " */ /* "so it can read the new configuration file\n") ); */ diff --git a/g10/passphrase.c b/g10/passphrase.c index c93cde64d..3bd159e22 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -25,9 +25,11 @@ #include <string.h> #include <unistd.h> #include <assert.h> -#if !defined(HAVE_DOSISH_SYSTEM) && !defined(__riscos__) -#include <sys/socket.h> -#include <sys/un.h> +#ifdef ENABLE_AGENT_SUPPORT +# if !defined(HAVE_DOSISH_SYSTEM) && !defined(__riscos__) +# include <sys/socket.h> +# include <sys/un.h> +# endif #endif #if defined (_WIN32) #include <windows.h> diff --git a/g10/signal.c b/g10/signal.c index cd24dc0c8..4aaa11eaa 100644 --- a/g10/signal.c +++ b/g10/signal.c @@ -38,6 +38,10 @@ #include "main.h" #include "ttyio.h" +#ifdef __VMS +# include "vms.h" +#endif /* __VMS */ + #ifdef HAVE_DOSISH_SYSTEM void init_signals(void) {} void pause_on_sigusr(int which) {} @@ -110,6 +114,12 @@ got_fatal_signal( int sig ) #endif write(2, " caught ... exiting\n", 20 ); +#ifdef __VMS + /* 2006-08-10 SMS. + Restore terminal echo, if needed, before exiting. */ + vms_set_term_echo (-1); +#endif /* def __VMS */ + /* Reset action to default action and raise signal again. */ init_one_signal (sig, SIG_DFL, 0); remove_lockfiles (); |