зеркало из https://github.com/Azure/sonic-openssh.git
- markus@cvs.openbsd.org 2004/04/01 12:19:57
[scp.c] limit trust between local and remote rcp/scp process, noticed by lcamtuf; ok deraadt@, djm@
This commit is contained in:
Родитель
d04121f0ab
Коммит
bddc2b0179
|
@ -12,6 +12,10 @@
|
|||
- djm@cvs.openbsd.org 2004/03/31 21:58:47
|
||||
[canohost.c]
|
||||
don't skip ip options check when UseDNS=no; ok markus@ (ID sync only)
|
||||
- markus@cvs.openbsd.org 2004/04/01 12:19:57
|
||||
[scp.c]
|
||||
limit trust between local and remote rcp/scp process,
|
||||
noticed by lcamtuf; ok deraadt@, djm@
|
||||
|
||||
20040418
|
||||
- (dtucker) [auth-pam.c] Log username and source host for failed PAM
|
||||
|
@ -997,4 +1001,4 @@
|
|||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||
|
||||
$Id: ChangeLog,v 1.3320 2004/04/19 12:16:53 dtucker Exp $
|
||||
$Id: ChangeLog,v 1.3321 2004/04/19 13:50:16 dtucker Exp $
|
||||
|
|
10
scp.c
10
scp.c
|
@ -71,7 +71,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: scp.c,v 1.113 2003/11/23 23:21:21 djm Exp $");
|
||||
RCSID("$OpenBSD: scp.c,v 1.114 2004/04/01 12:19:57 markus Exp $");
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "atomicio.h"
|
||||
|
@ -759,6 +759,8 @@ sink(int argc, char **argv)
|
|||
*cp++ = ch;
|
||||
} while (cp < &buf[sizeof(buf) - 1] && ch != '\n');
|
||||
*cp = 0;
|
||||
if (verbose_mode)
|
||||
fprintf(stderr, "Sink: %s", buf);
|
||||
|
||||
if (buf[0] == '\01' || buf[0] == '\02') {
|
||||
if (iamremote == 0)
|
||||
|
@ -822,6 +824,10 @@ sink(int argc, char **argv)
|
|||
size = size * 10 + (*cp++ - '0');
|
||||
if (*cp++ != ' ')
|
||||
SCREWUP("size not delimited");
|
||||
if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
|
||||
run_err("error: unexpected filename: %s", cp);
|
||||
exit(1);
|
||||
}
|
||||
if (targisdir) {
|
||||
static char *namebuf;
|
||||
static int cursize;
|
||||
|
@ -843,6 +849,8 @@ sink(int argc, char **argv)
|
|||
exists = stat(np, &stb) == 0;
|
||||
if (buf[0] == 'D') {
|
||||
int mod_flag = pflag;
|
||||
if (!iamrecursive)
|
||||
SCREWUP("received directory without -r");
|
||||
if (exists) {
|
||||
if (!S_ISDIR(stb.st_mode)) {
|
||||
errno = ENOTDIR;
|
||||
|
|
Загрузка…
Ссылка в новой задаче