3 * Copyright (C) 1988-1998 by the Massachusetts Institute of Technology.
4 * For copying and distribution information, please see the file
8 #include <mit-copyright.h>
10 #include "update_server.h"
21 extern CONNECTION conn;
22 extern char buf[BUFSIZ];
26 extern int have_authorization, have_file, done;
31 * >>> (STRING)"xfer_003" filesize checksum pathname
38 * >>> (STRING)data (last data block)
39 * <<< (int)code (from read, write, checksum verify)
42 * perform initial preparations and receive file as
43 * a single string, storing it into <pathname>.moira_update.
44 * this version of transfer encrypts the file being transferred.
47 int xfer_003(char *str)
62 file_size = atoi(str);
75 if (!have_authorization)
80 if (done) /* re-initialize data */
84 lose("sending ok for file xfer (2)");
85 code = get_file(pathname, file_size, checksum, 0444, 1);
90 strcpy(buf, "transferred file ");
91 strcat(buf, pathname);