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_4-78-gc1f185


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-78-gc1f1854
Date: Thu, 20 Feb 2020 11:05:01 -0500 (EST)

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  c1f18548f754bf09865fa17af119e5f90d931094 (commit)
       via  470d0b804843bba7068a8677499aadab905ca7f4 (commit)
      from  34fd840302a885da9ef29c83c9800be651ff075e (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=c1f18548f754bf09865fa17af119e5f90d931094


commit c1f18548f754bf09865fa17af119e5f90d931094
Author: Mats Erik Andersson <address@hidden>
Date:   Thu Feb 20 16:41:12 2020 +0100

    rexecd, rshd: Avoid false failure message.

diff --git a/ChangeLog b/ChangeLog
index 02ea169..7358295 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2020-02-20  Mats Erik Andersson  <address@hidden>
 
+       rexecd, rshd: Avoid false failure message.
+
+       * src/rexecd.c (doit) [HAVE_SETLOGIN]: Only call setsid() in case
+       the session leader is different from the present process.
+       * src/rshd.c (doit) [HAVE_SETLOGIN]: Likewise.
+
+2020-02-20  Mats Erik Andersson  <address@hidden>
+
        rcp: Recursive reception was broken.
 
        The commit 67b49c54 broke the use case of locally receiving
diff --git a/src/rexecd.c b/src/rexecd.c
index ad23703..714b7eb 100644
--- a/src/rexecd.c
+++ b/src/rexecd.c
@@ -556,8 +556,9 @@ doit (int f, struct sockaddr *fromp, socklen_t fromlen)
 
 #ifdef HAVE_SETLOGIN
       /* Not sufficient to call setpgid() on BSD systems.  */
-      if (setsid () < 0)
-       syslog (LOG_ERR, "setsid() failed: %m");
+      if (getsid ((pid_t) 0) != getpid ())
+       if (setsid () < 0)
+         syslog (LOG_ERR, "setsid() failed: %m");
 #elif defined HAVE_SETPGID /* !HAVE_SETLOGIN */
       setpgid (0, getpid ());
 #endif
diff --git a/src/rshd.c b/src/rshd.c
index 11322d3..b67d888 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -1833,8 +1833,9 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t 
fromlen)
    */
 #ifdef HAVE_SETLOGIN
   /* Not sufficient to call setpgid() on BSD systems.  */
-  if (setsid () < 0)
-    syslog (LOG_ERR, "setsid() failed: %m");
+  if (getsid ((pid_t) 0) != getpid ())
+    if (setsid () < 0)
+      syslog (LOG_ERR, "setsid() failed: %m");
 
   if (setlogin (pwd->pw_name) < 0)
     syslog (LOG_ERR, "setlogin() failed: %m");

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=470d0b804843bba7068a8677499aadab905ca7f4


commit 470d0b804843bba7068a8677499aadab905ca7f4
Author: Mats Erik Andersson <address@hidden>
Date:   Thu Feb 20 16:11:04 2020 +0100

    rcp: Recursive reception was broken.
    
    Revert code to a previous and functional stage.  The source was broken
    in a well defined commit.  Reported by Zhixiong Chi.

diff --git a/ChangeLog b/ChangeLog
index 98e30ed..02ea169 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2020-02-20  Mats Erik Andersson  <address@hidden>
+
+       rcp: Recursive reception was broken.
+
+       The commit 67b49c54 broke the use case of locally receiving
+       multiple files for a recursive copying action.  This was found
+       and established by Zhixiong Chi.  Now revert the relevant part
+       of the old commit, as the suggested patch is nearly a verbatim
+       change back.  The differences await further analysis.
+       Original report is contained in:
+       https://lists.gnu.org/archive/html/bug-inetutils/2019-12/msg00000.html
+
+       * src/rcp.c (sink) [targisdir]: Revert to the legacy, and functional,
+       implementation of string allocation.
+
 2020-02-10  Mats Erik Andersson  <address@hidden>
 
        Simplify coding of test program `runtime-ipv6', by using
diff --git a/src/rcp.c b/src/rcp.c
index 415e3f0..503027e 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -993,18 +993,10 @@ sink (int argc, char *argv[])
          need = strlen (targ) + strlen (cp) + 250;
          if (need > cursize)
            {
-             free (namebuf);
-             namebuf = malloc (need);
-             if (namebuf)
-               cursize = need;
-             else
-               {
-                 run_err ("%s", strerror (errno));
-                 cursize = 0;
-                 continue;
-               }
+             if (!(namebuf = malloc (need)))
+               run_err ("%s", strerror (errno));
            }
-         snprintf (namebuf, cursize, "%s%s%s", targ, *targ ? "/" : "", cp);
+         snprintf (namebuf, need, "%s%s%s", targ, *targ ? "/" : "", cp);
          np = namebuf;
        }
       else

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

Summary of changes:
 ChangeLog    | 23 +++++++++++++++++++++++
 src/rcp.c    | 14 +++-----------
 src/rexecd.c |  5 +++--
 src/rshd.c   |  5 +++--
 4 files changed, 32 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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