-/*
- * $Source$
- * $Header$
+/* $Id$
+ *
+ * Copyright (C) 1988-1998 by the Massachusetts Institute of Technology.
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*/
-/* (c) Copyright 1988 by the Massachusetts Institute of Technology. */
-/* For copying and distribution information, please see the file */
-/* <mit-copyright.h>. */
-
-#ifndef lint
-static char *rcsid_get_file_c = "$Header$";
-#endif
#include <mit-copyright.h>
-#include <stdio.h>
-#include <gdb.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/param.h>
-#include <sys/file.h>
-#include <fcntl.h>
-#include <des.h>
-#include <krb.h>
#include <moira.h>
+#include "update_server.h"
#include "update.h"
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <des.h>
+#include <gdb.h>
+
+RCSID("$Header$");
+
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif /* MIN */
extern CONNECTION conn;
extern char buf[BUFSIZ];
-extern int code, errno, uid;
+extern int code, uid;
extern char *whoami;
extern int have_authorization, have_file, done;
static des_key_schedule sched;
static des_cblock ivec;
-static int get_block();
+static int get_block(int fd, int max_size, int encrypt);
/*
* get_file()
}
n_written += n_wrote;
}
- lseek(fd, 0, L_SET);
+ lseek(fd, 0, SEEK_SET);
if (send_ok())
lose("sending okay for file transfer (get_file)");
if (encrypt)