Fix bug that caused files transmitted by a NetBSD box to have file
authorSam Hartman <hartmans@mit.edu>
Sat, 10 Aug 1996 20:51:53 +0000 (20:51 +0000)
committerSam Hartman <hartmans@mit.edu>
Sat, 10 Aug 1996 20:51:53 +0000 (20:51 +0000)
names of (null).
  CVS:
----------------------------------------------------------------------
automatically CVS: CVS: Committing in .  CVS: CVS: Modified Files:
----------------------------------------------------------------------

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8922 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/bsd/ChangeLog
src/appl/bsd/krcp.c

index 28d3c506572a9b1fc8de069f35662388c6a652b6..59754e7874bd5e358989388ca16b1c0b02c118b8 100644 (file)
@@ -1,3 +1,10 @@
+Sat Aug 10 16:22:34 1996  Sam Hartman  <hartmans@mit.edu>
+
+       * krcp.c (source): Cast stb.st_size to a long before printing it.
+       On NetBSD, it's a quad, so the following pointer is ignored and
+       all files look null.  We could special case NetBSD, but casting is
+       somewhat cleaner if we aren't dealing with 2g+ files.
+e
 Mon Jun 24 09:48:11 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * krsh.c (main): Fix typo so that krsh doesn't exit when using the
index 36ad114cebabf7dd7cf2671c367ae1e9e84e3079..88b2b76b639887bd0b67f460f61ade2340960ab1 100644 (file)
@@ -748,7 +748,7 @@ void source(argc, argv)
            }
        }
        (void) sprintf(buf, "C%04o %ld %s\n",
-                      stb.st_mode&07777, stb.st_size, last);
+                      (int) stb.st_mode&07777, (long ) stb.st_size, last);
        (void) des_write(rem, buf, strlen(buf));
        if (response() < 0) {
            (void) close(f);