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_1-59-gcf0173


From: Simon Josefsson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-59-gcf0173f
Date: Thu, 15 Mar 2012 09:18:47 +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  cf0173f1eaf518dda83adeb0efd80f249fa17264 (commit)
       via  61b720a04ab422291e47252be530c84abd5579d0 (commit)
      from  4939ad983e8e6456d2c03241b2bad9eb738c38d5 (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=cf0173f1eaf518dda83adeb0efd80f249fa17264


commit cf0173f1eaf518dda83adeb0efd80f249fa17264
Author: Simon Josefsson <address@hidden>
Date:   Thu Mar 15 10:18:42 2012 +0100

    dnsdomainname: Don't error when no domain component.

diff --git a/ChangeLog b/ChangeLog
index 313aeb2..c858b45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-03-15  Simon Josefsson  <address@hidden>
 
+       * src/dnsdomainname.c (dnsdomainname): Don't error when canonical
+       name does not have domain name component (compatibility with
+       Debian dnsdomainname).  Suggested by Mats Erik Andersson
+       <address@hidden>.
+
        * tests/dnsdomainname.sh: Reject non-0 and non-1 exit codes (i.e.,
        crashes).
 
diff --git a/src/dnsdomainname.c b/src/dnsdomainname.c
index 8e1af02..25e5359 100644
--- a/src/dnsdomainname.c
+++ b/src/dnsdomainname.c
@@ -58,11 +58,8 @@ dnsdomainname (void)
     error (EXIT_FAILURE, 0, "%s", gai_strerror (rc));
 
   dn = strchr (res->ai_canonname, '.');
-  if (dn == NULL)
-    error (EXIT_FAILURE, 0, "cannot qualify host name: %s", host_name);
-  dn++;
-
-  puts (dn);
+  if (dn)
+    puts (dn + 1);
 
   free (host_name);
   freeaddrinfo (res);

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=61b720a04ab422291e47252be530c84abd5579d0


commit 61b720a04ab422291e47252be530c84abd5579d0
Author: Simon Josefsson <address@hidden>
Date:   Thu Mar 15 10:08:39 2012 +0100

    tests/dnsdomainname.sh: Reject non-0 and non-1 exit codes (i.e., crashes).

diff --git a/ChangeLog b/ChangeLog
index 5730aa7..313aeb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-15  Simon Josefsson  <address@hidden>
+
+       * tests/dnsdomainname.sh: Reject non-0 and non-1 exit codes (i.e.,
+       crashes).
+
 2012-03-15  Mats Erik Andersson  <address@hidden>
 
        * tests/dnsdomainname.sh: Replace `! test -x' by `test ! -x'
diff --git a/tests/dnsdomainname.sh b/tests/dnsdomainname.sh
index 83bf7de..e671302 100755
--- a/tests/dnsdomainname.sh
+++ b/tests/dnsdomainname.sh
@@ -17,8 +17,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
-set -e
-
 DNSDOMAINNAME=${DNSDOMAINNAME:-../src/dnsdomainname$EXEEXT}
 
 if test ! -x $DNSDOMAINNAME; then
@@ -46,6 +44,11 @@ fi
 # configuration issues, and the tool is arguable correct to fail in
 # these situations.  All other errors should lead to hard failures.
 
-$DNSDOMAINNAME || true
+$DNSDOMAINNAME > /dev/null
+rc=$?
+if test $rc -ne 0 && test $rc -ne 1; then
+    echo "invoking $DNSDOMAINNAME failed with error code $rc"
+    exit 1
+fi
 
 exit 0

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

Summary of changes:
 ChangeLog              |   10 ++++++++++
 src/dnsdomainname.c    |    7 ++-----
 tests/dnsdomainname.sh |    9 ++++++---
 3 files changed, 18 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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