diff options
Diffstat (limited to 'g10/openfile.c')
-rw-r--r-- | g10/openfile.c | 14 |
1 files changed, 14 insertions, 0 deletions
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") ); */ |