[git] GCRYPT - branch, LIBGCRYPT-1-6-BRANCH, updated. libgcrypt-1.6.3-12-g59058aa

by Werner Koch cvs at cvs.gnupg.org
Mon Sep 7 18:06:18 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, LIBGCRYPT-1-6-BRANCH has been updated
       via  59058aaca0892f5259f233a3a2af1e5084716198 (commit)
      from  67d93a230a4bf19feffae29de211d9bb0cfdd7e1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 59058aaca0892f5259f233a3a2af1e5084716198
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Jan 5 19:38:29 2015 +0100

    random: Silent warning under NetBSD using rndunix
    
    * random/rndunix.c (STDERR_FILENO): Define if needed.
    (start_gatherer): Re-open standard descriptors.  Fix an
    unsigned/signed pointer warning.
    --
    
    GnuPG-bug-id: 1702
    (cherry picked from commit 817472358a093438e802380caecf7139406400cf)

diff --git a/configure.ac b/configure.ac
index c4d7e5f..efcbc52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2053,11 +2053,10 @@ cat <<G10EOF
                  Entropy Gathering Daemon (EGD)
 
    which provides a entropy source for the whole system.  It is written
-   in Perl and available at the GnuPG FTP servers.  To enable EGD you
-   should rerun configure with the option "--enable-static-rnd=egd".
-   For more information consult the GnuPG webpages:
+   in Perl and available at the GnuPG FTP servers.  For more information
+   consult the GnuPG site:
 
-             http://www.gnupg.org/download.html#egd
+          https://gnupg.org/related_software/swlist.html#egd
 
 G10EOF
 fi
diff --git a/random/rndunix.c b/random/rndunix.c
index 1b810d7..315906b 100644
--- a/random/rndunix.c
+++ b/random/rndunix.c
@@ -144,6 +144,9 @@
 #ifndef STDOUT_FILENO
 #define STDOUT_FILENO 1
 #endif
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
 
 #define GATHER_BUFSIZE		49152	/* Usually about 25K are filled */
 
@@ -766,13 +769,27 @@ start_gatherer( int pipefd )
 
     fclose(stderr);		/* Arrghh!!  It's Stuart code!! */
 
+    /* Mary goes to Berkeley: NetBSD emits warnings if the standard
+       descriptors are not open when running setuid program.  Thus we
+       connect them to the bitbucket if they are not already open.  */
+    {
+      struct stat statbuf;
+
+      if (fstat (STDIN_FILENO, &statbuf) == -1 && errno == EBADF)
+        open ("/dev/null",O_RDONLY);
+      if (fstat (STDOUT_FILENO, &statbuf) == -1 && errno == EBADF)
+        open ("/dev/null",O_WRONLY);
+      if (fstat (STDERR_FILENO, &statbuf) == -1 && errno == EBADF)
+        open ("/dev/null",O_WRONLY);
+    }
+
     for(;;) {
 	GATHER_MSG msg;
 	size_t nbytes;
 	const char *p;
 
 	msg.usefulness = slow_poll( dbgfp, dbgall, &nbytes );
-	p = gather_buffer;
+	p = (const char*)gather_buffer;
 	while( nbytes ) {
 	    msg.ndata = nbytes > sizeof(msg.data)? sizeof(msg.data) : nbytes;
 	    memcpy( msg.data, p, msg.ndata );

-----------------------------------------------------------------------

Summary of changes:
 configure.ac     |  7 +++----
 random/rndunix.c | 19 ++++++++++++++++++-
 2 files changed, 21 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org




More information about the Gnupg-commits mailing list