summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--scp.c20
2 files changed, 19 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 92a2f25d6..fb737717b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
120060423
2 - (djm) OpenBSD CVS Sync
3 - deraadt@cvs.openbsd.org 2006/04/01 05:42:20
4 [scp.c]
5 minimal lint cleanup (unused crud, and some size_t); ok djm
6
120060421 720060421
2 - (djm) [Makefile.in configure.ac session.c sshpty.c] 8 - (djm) [Makefile.in configure.ac session.c sshpty.c]
3 [contrib/redhat/sshd.init openbsd-compat/Makefile.in] 9 [contrib/redhat/sshd.init openbsd-compat/Makefile.in]
@@ -4508,4 +4514,4 @@
4508 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 4514 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
4509 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 4515 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
4510 4516
4511$Id: ChangeLog,v 1.4302 2006/04/22 11:26:08 djm Exp $ 4517$Id: ChangeLog,v 1.4303 2006/04/23 02:04:27 djm Exp $
diff --git a/scp.c b/scp.c
index 2f89aa49e..6c8bbcdb7 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.139 2006/03/25 13:17:02 djm Exp $ */ 1/* $OpenBSD: scp.c,v 1.140 2006/04/01 05:42:20 deraadt Exp $ */
2/* 2/*
3 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
4 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -92,6 +92,8 @@
92 92
93extern char *__progname; 93extern char *__progname;
94 94
95int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout);
96
95void bwlimit(int); 97void bwlimit(int);
96 98
97/* Struct for addargs */ 99/* Struct for addargs */
@@ -177,7 +179,7 @@ do_local_cmd(arglist *a)
177 */ 179 */
178 180
179int 181int
180do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc) 182do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout)
181{ 183{
182 int pin[2], pout[2], reserved[2]; 184 int pin[2], pout[2], reserved[2];
183 185
@@ -244,7 +246,6 @@ typedef struct {
244 246
245BUF *allocbuf(BUF *, int, int); 247BUF *allocbuf(BUF *, int, int);
246void lostconn(int); 248void lostconn(int);
247void nospace(void);
248int okname(char *); 249int okname(char *);
249void run_err(const char *,...); 250void run_err(const char *,...);
250void verifydir(char *); 251void verifydir(char *);
@@ -419,9 +420,10 @@ main(int argc, char **argv)
419void 420void
420toremote(char *targ, int argc, char **argv) 421toremote(char *targ, int argc, char **argv)
421{ 422{
422 int i, len;
423 char *bp, *host, *src, *suser, *thost, *tuser, *arg; 423 char *bp, *host, *src, *suser, *thost, *tuser, *arg;
424 arglist alist; 424 arglist alist;
425 size_t len;
426 int i;
425 427
426 memset(&alist, '\0', sizeof(alist)); 428 memset(&alist, '\0', sizeof(alist));
427 alist.list = NULL; 429 alist.list = NULL;
@@ -491,7 +493,7 @@ toremote(char *targ, int argc, char **argv)
491 (void) snprintf(bp, len, "%s -t %s", cmd, targ); 493 (void) snprintf(bp, len, "%s -t %s", cmd, targ);
492 host = cleanhostname(thost); 494 host = cleanhostname(thost);
493 if (do_cmd(host, tuser, bp, &remin, 495 if (do_cmd(host, tuser, bp, &remin,
494 &remout, argc) < 0) 496 &remout) < 0)
495 exit(1); 497 exit(1);
496 if (response() < 0) 498 if (response() < 0)
497 exit(1); 499 exit(1);
@@ -505,9 +507,10 @@ toremote(char *targ, int argc, char **argv)
505void 507void
506tolocal(int argc, char **argv) 508tolocal(int argc, char **argv)
507{ 509{
508 int i, len;
509 char *bp, *host, *src, *suser; 510 char *bp, *host, *src, *suser;
510 arglist alist; 511 arglist alist;
512 size_t len;
513 int i;
511 514
512 memset(&alist, '\0', sizeof(alist)); 515 memset(&alist, '\0', sizeof(alist));
513 alist.list = NULL; 516 alist.list = NULL;
@@ -542,7 +545,7 @@ tolocal(int argc, char **argv)
542 len = strlen(src) + CMDNEEDS + 20; 545 len = strlen(src) + CMDNEEDS + 20;
543 bp = xmalloc(len); 546 bp = xmalloc(len);
544 (void) snprintf(bp, len, "%s -f %s", cmd, src); 547 (void) snprintf(bp, len, "%s -f %s", cmd, src);
545 if (do_cmd(host, suser, bp, &remin, &remout, argc) < 0) { 548 if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
546 (void) xfree(bp); 549 (void) xfree(bp);
547 ++errs; 550 ++errs;
548 continue; 551 continue;
@@ -787,7 +790,8 @@ sink(int argc, char **argv)
787 BUF *bp; 790 BUF *bp;
788 off_t i; 791 off_t i;
789 size_t j, count; 792 size_t j, count;
790 int amt, exists, first, mask, mode, ofd, omode; 793 int amt, exists, first, ofd;
794 mode_t mode, omode, mask;
791 off_t size, statbytes; 795 off_t size, statbytes;
792 int setimes, targisdir, wrerrno = 0; 796 int setimes, targisdir, wrerrno = 0;
793 char ch, *cp, *np, *targ, *why, *vect[1], buf[2048]; 797 char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];