diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | scp.c | 20 |
2 files changed, 19 insertions, 9 deletions
@@ -1,3 +1,9 @@ | |||
1 | 20060423 | ||
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 | |||
1 | 20060421 | 7 | 20060421 |
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 $ |
@@ -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 | ||
93 | extern char *__progname; | 93 | extern char *__progname; |
94 | 94 | ||
95 | int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout); | ||
96 | |||
95 | void bwlimit(int); | 97 | void 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 | ||
179 | int | 181 | int |
180 | do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc) | 182 | do_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 | ||
245 | BUF *allocbuf(BUF *, int, int); | 247 | BUF *allocbuf(BUF *, int, int); |
246 | void lostconn(int); | 248 | void lostconn(int); |
247 | void nospace(void); | ||
248 | int okname(char *); | 249 | int okname(char *); |
249 | void run_err(const char *,...); | 250 | void run_err(const char *,...); |
250 | void verifydir(char *); | 251 | void verifydir(char *); |
@@ -419,9 +420,10 @@ main(int argc, char **argv) | |||
419 | void | 420 | void |
420 | toremote(char *targ, int argc, char **argv) | 421 | toremote(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) | |||
505 | void | 507 | void |
506 | tolocal(int argc, char **argv) | 508 | tolocal(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]; |