[svn] GnuPG - r5427 - in branches/STABLE-BRANCH-1-4: . cipher g10 util
svn author wk
cvs at cvs.gnupg.org
Tue Sep 28 17:55:25 CEST 2010
Author: wk
Date: 2010-09-28 17:55:24 +0200 (Tue, 28 Sep 2010)
New Revision: 5427
Modified:
branches/STABLE-BRANCH-1-4/cipher/rand-internal.h
branches/STABLE-BRANCH-1-4/configure.ac
branches/STABLE-BRANCH-1-4/g10/ChangeLog
branches/STABLE-BRANCH-1-4/g10/openfile.c
branches/STABLE-BRANCH-1-4/g10/passphrase.c
branches/STABLE-BRANCH-1-4/g10/signal.c
branches/STABLE-BRANCH-1-4/util/cert.c
branches/STABLE-BRANCH-1-4/util/logger.c
branches/STABLE-BRANCH-1-4/util/secmem.c
branches/STABLE-BRANCH-1-4/util/srv.c
Log:
The rest of the VMS changes.
Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog 2010-09-28 15:55:24 UTC (rev 5427)
@@ -1,12 +1,9 @@
-2010-09-28 Werner Koch <wk at g10code.com>
-
- * gpgv.c (ttyfp_is, init_ttyfp) [__VMS]: Add subs.
-
2010-09-28 Steven M. Schweda <sms at antinode.info> (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>.
Modified: branches/STABLE-BRANCH-1-4/cipher/rand-internal.h
===================================================================
--- branches/STABLE-BRANCH-1-4/cipher/rand-internal.h 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/cipher/rand-internal.h 2010-09-28 15:55:24 UTC (rev 5427)
@@ -23,6 +23,8 @@
int requester, size_t length, int level);
int rndlinux_gather_random (void (*add)(const void*, size_t, int),
int requester, size_t length, int level);
+int rndvms_gather_random (void (*add)(const void*, size_t, int),
+ int requester, size_t length, int level);
int rndegd_connect_socket (int nofail);
int rndegd_gather_random (void (*add)(const void*, size_t, int),
int requester, size_t length, int level );
Modified: branches/STABLE-BRANCH-1-4/configure.ac
===================================================================
--- branches/STABLE-BRANCH-1-4/configure.ac 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/configure.ac 2010-09-28 15:55:24 UTC (rev 5427)
@@ -470,7 +470,7 @@
# define GNUPG_HOMEDIR "c:\\\\gnupg"
#else
# ifdef __VMS
-# define GNUPG_HOMEDIR "/SYS\$LOGIN/gnupg"
+# define GNUPG_HOMEDIR "/SYS$LOGIN/gnupg"
# else
# define GNUPG_HOMEDIR "~/.gnupg"
# endif
Modified: branches/STABLE-BRANCH-1-4/g10/openfile.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/openfile.c 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/g10/openfile.c 2010-09-28 15:55:24 UTC (rev 5427)
@@ -248,8 +248,13 @@
#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 @@
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") ); */
Modified: branches/STABLE-BRANCH-1-4/g10/passphrase.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/passphrase.c 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/g10/passphrase.c 2010-09-28 15:55:24 UTC (rev 5427)
@@ -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>
Modified: branches/STABLE-BRANCH-1-4/g10/signal.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/signal.c 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/g10/signal.c 2010-09-28 15:55:24 UTC (rev 5427)
@@ -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 @@
#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 ();
Modified: branches/STABLE-BRANCH-1-4/util/cert.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/cert.c 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/util/cert.c 2010-09-28 15:55:24 UTC (rev 5427)
@@ -37,7 +37,10 @@
/* Not every installation has gotten around to supporting CERTs
yet... */
#ifndef T_CERT
-#define T_CERT 37
+# define T_CERT 37
+# ifdef __VMS
+# include "cert_vms.h"
+# endif /* def __VMS */
#endif
#ifdef USE_DNS_CERT
Modified: branches/STABLE-BRANCH-1-4/util/logger.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/logger.c 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/util/logger.c 2010-09-28 15:55:24 UTC (rev 5427)
@@ -123,6 +123,28 @@
void
g10_log_print_prefix(const char *text)
{
+#ifdef __VMS
+ /* 2006-08-10 SMS.
+ VMS terminal carriage control differs from that on UNIX, and one
+ result is overwritten messages when terminal output is done
+ through multiple file pointers (like logfp and ttyfp), even when
+ they both are connected to the same terminal. The accomodation
+ attempted here is to initialize ttyfp before logfp, and if stderr
+ and ttyfp are both terminals (presumably the same one), to set an
+ unset logfp to ttyfp instead of to stderr. */
+ if (!logfp )
+ {
+ FILE *ttyfp_local;
+
+ init_ttyfp();
+ ttyfp_local = ttyfp_is ();
+ if (isatty (fileno (stderr)) && isatty (fileno (ttyfp_local)))
+ {
+ logfp = ttyfp_local;
+ }
+ }
+#endif /* def __VMS */
+
if( !logfp )
logfp = stderr;
if( pgm_name )
Modified: branches/STABLE-BRANCH-1-4/util/secmem.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/secmem.c 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/util/secmem.c 2010-09-28 15:55:24 UTC (rev 5427)
@@ -189,7 +189,11 @@
&& errno != ENOMEM
#endif
)
- log_error("can't lock memory: %s\n", strerror(err));
+#ifdef __VMS
+ log_warning ("can't lock memory: %s\n", strerror(err));
+#else
+ log_error ("can't lock memory: %s\n", strerror(err));
+#endif
show_warning = 1;
}
Modified: branches/STABLE-BRANCH-1-4/util/srv.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/srv.c 2010-09-28 13:21:42 UTC (rev 5426)
+++ branches/STABLE-BRANCH-1-4/util/srv.c 2010-09-28 15:55:24 UTC (rev 5427)
@@ -36,7 +36,10 @@
/* Not every installation has gotten around to supporting SRVs
yet... */
#ifndef T_SRV
-#define T_SRV 33
+# define T_SRV 33
+# ifdef __VMS
+# include "cert_vms.h"
+# endif /* def __VMS */
#endif
static int
More information about the Gnupg-commits
mailing list