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"
22 * >>> (STRING)"xfer_003" filesize checksum pathname
29 * >>> (STRING)data (last data block)
30 * <<< (int)code (from read, write, checksum verify)
33 * perform initial preparations and receive file as
34 * a single string, storing it into <pathname>.moira_update.
35 * this version of transfer encrypts the file being transferred.
38 void xfer_003(int conn, char *str)
40 int file_size, checksum, code;
49 send_int(conn, MR_ARGS);
53 file_size = strtol(str, &p, 10);
56 send_int(conn, MR_ARGS);
64 checksum = strtol(str, &p, 10);
67 send_int(conn, MR_ARGS);
79 if (!have_authorization)
81 send_int(conn, MR_PERM);
86 code = get_file(conn, pathname, file_size, checksum, 0444, 1);
88 com_err(whoami, 0, "Transferred file %s", pathname);