5 /* (c) Copyright 1988, 1992 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
11 static char *rcsid_xfer_002_c = "$Header$";
14 #include <mit-copyright.h>
18 #include <sys/param.h>
23 extern CONNECTION conn;
26 extern int code, errno;
28 extern int have_authorization, have_file, done;
33 * >>> (STRING)"xfer_003" filesize checksum pathname
40 * >>> (STRING)data (last data block)
41 * <<< (int)code (from read, write, checksum verify)
44 * perform initial preparations and receive file as
45 * a single string, storing it into <pathname>.moira_update.
46 * this version of transfer encrypts the file being transferred.
65 file_size = atoi(str);
78 if (!have_authorization) {
82 if (done) /* re-initialize data */
86 lose("sending ok for file xfer (2)");
87 code = get_file(pathname, file_size, checksum, 0444, 1);
91 strcpy(buf, "transferred file ");
92 strcat(buf, pathname);