[Top][All Lists]

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

[bug-inetutils] rcp -p bug

From: Adye, TJ \(Tim\)
Subject: [bug-inetutils] rcp -p bug
Date: Wed, 27 Apr 2005 00:06:29 +0100


I saw that rcp -p was failing to set the modification time. Actually the
code indicates that it swaps the modification and access times, since it

  Ta_sec a_usec m_sec m_usec

but reads

  Tm_sec m_usec a_sec a_usec

The following patch seems to fix the problem.

diff -ur inetutils-1.4.2-orig/rcp/rcp.c inetutils-1.4.2/rcp/rcp.c
--- inetutils-1.4.2-orig/rcp/rcp.c      2002-09-02 15:14:39.000000000
+++ inetutils-1.4.2/rcp/rcp.c   2005-01-22 23:07:25.728412800 +0000
@@ -498,7 +498,7 @@
   snprintf (buf, sizeof(buf), "T%ld %ld %ld %ld\n",
-           a_sec, a_usec, m_sec, m_usec);
+           m_sec, m_usec, a_sec, a_usec);
   return write (fd, buf, strlen (buf));
I suppose that I could instead change the reading code, but other
implementations I found (netkit-rsh-0.17 and rsh-redone-66) seemed to
expect the modification time first. Is there a protocol specification I
could check to be sure?


==============================  cut here  ==============================
Tim Adye, BaBar Group, Particle Physics Dept.,             _   /|
          Rutherford Appleton Laboratory, UK.              \'o.O'   Oop!
e-mail:   address@hidden                                =(___)=  Ack!
WWW:      http://hepwww.rl.ac.uk/Delphi/Adye/homepage.html    U  Thphft!

reply via email to

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