diff options
author | Damien Miller <djm@mindrot.org> | 2000-10-28 14:19:58 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-10-28 14:19:58 +1100 |
commit | 69b69aa50d0effadc8b7e9c564f7a2ee223ac6b5 (patch) | |
tree | 4aea8b2b116123812ade69ae73fde80fee8e0f41 /util.c | |
parent | c05e01875bab590584f51bbeb464dd23c64f27fa (diff) |
- (djm) Sync with OpenBSD:
- markus@cvs.openbsd.org 2000/10/16 15:46:32
[ssh.1]
fixes from pekkas@netcore.fi
- markus@cvs.openbsd.org 2000/10/17 14:28:11
[atomicio.c]
return number of characters processed; ok deraadt@
- markus@cvs.openbsd.org 2000/10/18 12:04:02
[atomicio.c]
undo
- markus@cvs.openbsd.org 2000/10/18 12:23:02
[scp.c]
replace atomicio(read,...) with read(); ok deraadt@
- markus@cvs.openbsd.org 2000/10/18 12:42:00
[session.c]
restore old record login behaviour
- deraadt@cvs.openbsd.org 2000/10/19 10:41:13
[auth-skey.c]
fmt string problem in unused code
- provos@cvs.openbsd.org 2000/10/19 10:45:16
[sshconnect2.c]
don't reference freed memory. okay deraadt@
- markus@cvs.openbsd.org 2000/10/21 11:04:23
[canohost.c]
typo, eramore@era-t.ericsson.se; ok niels@
- markus@cvs.openbsd.org 2000/10/23 13:31:55
[cipher.c]
non-alignment dependent swap_bytes(); from
simonb@wasabisystems.com/netbsd
- markus@cvs.openbsd.org 2000/10/26 12:38:28
[compat.c]
add older vandyke products
- markus@cvs.openbsd.org 2000/10/27 01:32:19
[channels.c channels.h clientloop.c serverloop.c session.c]
[ssh.c util.c]
enable non-blocking IO on channels, and tty's (except for the
client ttys).
- markus@cvs.openbsd.org 2000/10/27 01:48:22
channels.c channels.h clientloop.c
deny agent/x11 forwarding unless requested; thanks to jwl@pobox.com
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: util.c,v 1.5 2000/09/07 20:27:55 deraadt Exp $ */ | 1 | /* $OpenBSD: util.c,v 1.6 2000/10/27 07:32:19 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: util.c,v 1.5 2000/09/07 20:27:55 deraadt Exp $"); | 28 | RCSID("$OpenBSD: util.c,v 1.6 2000/10/27 07:32:19 markus Exp $"); |
29 | 29 | ||
30 | #include "ssh.h" | 30 | #include "ssh.h" |
31 | 31 | ||
@@ -48,18 +48,15 @@ void | |||
48 | set_nonblock(int fd) | 48 | set_nonblock(int fd) |
49 | { | 49 | { |
50 | int val; | 50 | int val; |
51 | if (isatty(fd)) { | ||
52 | /* do not mess with tty's */ | ||
53 | debug("no set_nonblock for tty fd %d", fd); | ||
54 | return; | ||
55 | } | ||
56 | val = fcntl(fd, F_GETFL, 0); | 51 | val = fcntl(fd, F_GETFL, 0); |
57 | if (val < 0) { | 52 | if (val < 0) { |
58 | error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno)); | 53 | error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno)); |
59 | return; | 54 | return; |
60 | } | 55 | } |
61 | if (val & O_NONBLOCK) | 56 | if (val & O_NONBLOCK) { |
57 | debug("fd %d IS O_NONBLOCK", fd); | ||
62 | return; | 58 | return; |
59 | } | ||
63 | debug("fd %d setting O_NONBLOCK", fd); | 60 | debug("fd %d setting O_NONBLOCK", fd); |
64 | val |= O_NONBLOCK; | 61 | val |= O_NONBLOCK; |
65 | if (fcntl(fd, F_SETFL, val) == -1) | 62 | if (fcntl(fd, F_SETFL, val) == -1) |