commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-28-g8bcfbb


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-28-g8bcfbba
Date: Sat, 26 Jul 2014 15:10:53 +0000

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 "GNU Inetutils ".

The branch, master has been updated
       via  8bcfbba0d8bae00de9e5945fad62ce4bec9110c8 (commit)
      from  139c19958e5f069ff802bfa580832e52d4aeb357 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=8bcfbba0d8bae00de9e5945fad62ce4bec9110c8


commit 8bcfbba0d8bae00de9e5945fad62ce4bec9110c8
Author: Mats Erik Andersson <address@hidden>
Date:   Sat Jul 26 16:51:00 2014 +0200

    whois: Cooperate with misbehaving servers.
    
    When the socket is half-closed by the client, then some
    remote servers abort connection without a complete reply.
    The cause was located and reported by Alexander Zubkov.

diff --git a/ChangeLog b/ChangeLog
index 49916f7..1b41b11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2014-07-26  Mats Erik Andersson  <address@hidden>
+
+       whois: Cooperate with misbehaving servers.
+       Some servers, like "whois.ripe.net", "whois.arin.net",
+       and "whois.eu", partially abort communication when the
+       socket is closed for writing.  Report by Alexander Zubkov:
+       <http://lists.gnu.org/archive/html/bug-inetutils/2014-07/msg00003.html>.
+
+       * whois/whois.c (gwhois_argp_options): Increase GRP
+       and insert a separating subheader.
+       (do_query): Remove call to shutdown().  The alternate
+       and much similar lookup call query_crsnic() did not
+       half-close the socket for writing.
+
+       * doc/inetutils.texi (whois invocation): Add a section
+       about environment variables accessed by `whois'.
+
 2014-07-22  Mats Erik Andersson  <address@hidden>
 
        libls: Inconsistent options.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 9b72a97..81fd9ff 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -1286,6 +1286,34 @@ Verbosely explain all actions taken.
 Search only for exact matches.
 Applicable only to RPSL.
 @end table
+
address@hidden Environment variables
address@hidden environment}
+
address@hidden holds an internal list of information servers
+and their assigned data bases.
+Queries are examined against this list to select the most
+plausible server, but the hint can always be overruled on
+the command line by use of the option @option{-h}.
+If neither of these have a say, then the default server to ask
+is @samp{whois.internic.net}, but this name is in turn overruled
+by a server name in the environment variable @env{WHOIS_SERVER}.
+
address@hidden @env
address@hidden LANG
+When the server @samp{whois.nic.ad.jp} is queried, and only then,
+any non-Japanese locale in @env{LANG} will ask the server to reply
+with English text, not Japanese.
+
address@hidden WHOIS_HIDE
+When set, the effect on @command{whois} is as if the
+option @option{-H} had been given.
+
address@hidden WHOIS_SERVER
+Data base server to query when internal hinting is inconclusive.
+When unset, @samp{whois.internic.net} is used as default server.
+
address@hidden table
 
 
 @node ftp invocation
diff --git a/whois/whois.c b/whois/whois.c
index ec720b0..386ea8e 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -126,7 +126,8 @@ static struct argp ripe_argp =
   { ripe_argp_options, ripe_argp_parser, NULL, NULL, NULL, NULL, NULL };
 
 static struct argp_option gwhois_argp_options[] = {
-#define GRP 10
+#define GRP 20
+  { NULL, 0, NULL, 0, "General options", GRP },
   { "verbose", 'V', NULL, 0,
     "explain what is being done", GRP },
   { "server", 'h', "HOST", 0,
@@ -470,8 +471,7 @@ do_query (const int sock, const char *query)
   fi = fdopen (sock, "r");
   if (write (sock, query, strlen (query)) < 0)
     err_sys ("write");
-  if (shutdown (sock, 1) < 0)
-    err_sys ("shutdown");
+
   while (fgets (buf, 200, fi))
     {                          /* XXX errors? */
       if (hide == 1)
@@ -541,6 +541,7 @@ query_crsnic (const int sock, const char *query)
   fi = fdopen (sock, "r");
   if (write (sock, temp, strlen (temp)) < 0)
     err_sys ("write");
+
   while (fgets (buf, 100, fi))
     {
       /* If there are multiple matches only the server of the first record

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

Summary of changes:
 ChangeLog          |   17 +++++++++++++++++
 doc/inetutils.texi |   28 ++++++++++++++++++++++++++++
 whois/whois.c      |    7 ++++---
 3 files changed, 49 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]