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-329-gffe00


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-329-gffe0043
Date: Fri, 30 Aug 2013 13:55:05 +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  ffe00431a3d9a41e4d12b0b7a836288ba4a4cd13 (commit)
      from  e42eda37d7f3a3fa5a3579b6d1a53b816e748d82 (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=ffe00431a3d9a41e4d12b0b7a836288ba4a4cd13


commit ffe00431a3d9a41e4d12b0b7a836288ba4a4cd13
Author: Mats Erik Andersson <address@hidden>
Date:   Thu Aug 29 20:35:02 2013 +0200

    Handle socket debugging.

diff --git a/ChangeLog b/ChangeLog
index 4cb9028..35637a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-08-29  Mats Erik Andersson  <address@hidden>
+
+       Handle socket debugging.
+
+       * ftp/ftp.c (initconn) <passivemode>: Suppress error
+       message for errno EACCES while setting SO_DEBUG.  This is
+       a minor part of debug mode, and denial is system dependent.
+       Else report using error(), not perror().  Add DEBUG to text.
+       <label noport>: Likewise.
+
+       * src/inetd.c (setup): Likewise.
+
+       * src/rsh.c (main) <try_connect && debug_option>:
+       Improve error message to mention DEBUG.
+
 2013-08-28  Mats Erik Andersson  <address@hidden>
 
        ftp: New command `lpwd'.
diff --git a/ftp/ftp.c b/ftp/ftp.c
index c9b5aaf..682bcbf 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -1205,7 +1205,8 @@ initconn (void)
       if ((options & SO_DEBUG) &&
          setsockopt (data, SOL_SOCKET, SO_DEBUG, (char *) &on,
                      sizeof (on)) < 0)
-       perror ("ftp: setsockopt (ignored)");
+       if (errno != EACCES)    /* Ignore insufficient permission.  */
+         error (0, errno, "setsockopt DEBUG (ignored)");
 
       /* Be contemporary:
        *   first try EPSV,
@@ -1419,9 +1420,11 @@ noport:
       error (0, errno, "bind");
       goto bad;
     }
-  if (options & SO_DEBUG &&
-      setsockopt (data, SOL_SOCKET, SO_DEBUG, (char *) &on, sizeof (on)) < 0)
-    error (0, errno, "setsockopt (ignored)");
+  if (options & SO_DEBUG
+      && setsockopt (data, SOL_SOCKET, SO_DEBUG,
+                    (char *) &on, sizeof (on)) < 0)
+    if (errno != EACCES)       /* Ignore insufficient permission.  */
+      error (0, errno, "setsockopt DEBUG (ignored)");
   len = sizeof (data_addr);
   if (getsockname (data, (struct sockaddr *) &data_addr, &len) < 0)
     {
diff --git a/src/inetd.c b/src/inetd.c
index 98b8a58..bd67e9a 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -622,7 +622,8 @@ setup (struct servtab *sep)
   if (strncmp (sep->se_proto, "tcp", 3) == 0 && (options & SO_DEBUG))
     {
       if (setsockopt (sep->se_fd, SOL_SOCKET, SO_DEBUG,
-                     (char *) &on, sizeof (on)) < 0)
+                     (char *) &on, sizeof (on)) < 0
+         && errno != EACCES)   /* Ignore insufficient permission.  */
        syslog (LOG_ERR, "setsockopt (SO_DEBUG): %m");
     }
 
diff --git a/src/rsh.c b/src/rsh.c
index f0e09ae..d17bbad 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -526,10 +526,10 @@ try_connect:
       int one = 1;
       if (setsockopt (rem, SOL_SOCKET, SO_DEBUG, (char *) &one,
                      sizeof one) < 0)
-       error (0, errno, "setsockopt");
+       error (0, errno, "setsockopt DEBUG (ignored)");
       if (setsockopt (rfd2, SOL_SOCKET, SO_DEBUG, (char *) &one,
                      sizeof one) < 0)
-       error (0, errno, "setsockopt");
+       error (0, errno, "setsockopt DEBUG (ignored)");
     }
 
   seteuid (uid);

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

Summary of changes:
 ChangeLog   |   15 +++++++++++++++
 ftp/ftp.c   |   11 +++++++----
 src/inetd.c |    3 ++-
 src/rsh.c   |    4 ++--
 4 files changed, 26 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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