- djm@cvs.openbsd.org 2007/06/12 08:24:20

[scp.c]
     make scp try to skip FIFOs rather than blocking when nothing is listening.
     depends on the platform supporting sane O_NONBLOCK semantics for open
     on FIFOs (apparently POSIX does not mandate this), which OpenBSD does.
     bz #856; report by cjwatson AT debian.org; ok markus@
This commit is contained in:
Darren Tucker 2007-06-12 23:41:06 +10:00
parent 8f6d0ed60e
commit 43ce902449
2 changed files with 10 additions and 3 deletions

View File

@ -12,6 +12,12 @@
[ssh-gss.h gss-serv.c gss-genr.c]
relocate server-only GSSAPI code from libssh to server; bz #1225
patch from simon AT sxw.org.uk; ok markus@ dtucker@
- djm@cvs.openbsd.org 2007/06/12 08:24:20
[scp.c]
make scp try to skip FIFOs rather than blocking when nothing is listening.
depends on the platform supporting sane O_NONBLOCK semantics for open
on FIFOs (apparently POSIX does not mandate this), which OpenBSD does.
bz #856; report by cjwatson AT debian.org; ok markus@
20070611
- (djm) Bugzilla #1306: silence spurious error messages from hang-on-exit
@ -3026,4 +3032,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.4691 2007/06/12 13:40:39 dtucker Exp $
$Id: ChangeLog,v 1.4692 2007/06/12 13:41:06 dtucker Exp $

5
scp.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: scp.c,v 1.156 2007/01/22 13:06:21 djm Exp $ */
/* $OpenBSD: scp.c,v 1.157 2007/06/12 08:24:20 djm Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@ -596,12 +596,13 @@ source(int argc, char **argv)
name);
goto next;
}
if ((fd = open(name, O_RDONLY, 0)) < 0)
if ((fd = open(name, O_RDONLY|O_NONBLOCK, 0)) < 0)
goto syserr;
if (fstat(fd, &stb) < 0) {
syserr: run_err("%s: %s", name, strerror(errno));
goto next;
}
unset_nonblock(fd);
switch (stb.st_mode & S_IFMT) {
case S_IFREG:
break;