diff options
author | Damien Miller <djm@mindrot.org> | 2001-10-10 15:02:46 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-10-10 15:02:46 +1000 |
commit | 9c751429176f774bc327c23acb0711e76856e209 (patch) | |
tree | 3d79ba363c96d8c65a220a7e2a2efd3c5ee5aa4f | |
parent | e398004f6c9aec5d46d0b77950592462f327e28b (diff) |
- markus@cvs.openbsd.org 2001/10/06 00:36:42
[session.c]
fix typo in error message, sync with do_exec_nopty
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | session.c | 20 |
2 files changed, 12 insertions, 13 deletions
@@ -12,6 +12,9 @@ | |||
12 | - markus@cvs.openbsd.org 2001/10/06 00:14:50 | 12 | - markus@cvs.openbsd.org 2001/10/06 00:14:50 |
13 | [sshconnect.c] | 13 | [sshconnect.c] |
14 | remove unused argument | 14 | remove unused argument |
15 | - markus@cvs.openbsd.org 2001/10/06 00:36:42 | ||
16 | [session.c] | ||
17 | fix typo in error message, sync with do_exec_nopty | ||
15 | 18 | ||
16 | 20011007 | 19 | 20011007 |
17 | - (bal) ssh-copy-id corrected permissions for .ssh/ and authorized_keys. | 20 | - (bal) ssh-copy-id corrected permissions for .ssh/ and authorized_keys. |
@@ -6657,4 +6660,4 @@ | |||
6657 | - Wrote replacements for strlcpy and mkdtemp | 6660 | - Wrote replacements for strlcpy and mkdtemp |
6658 | - Released 1.0pre1 | 6661 | - Released 1.0pre1 |
6659 | 6662 | ||
6660 | $Id: ChangeLog,v 1.1588 2001/10/10 05:02:03 djm Exp $ | 6663 | $Id: ChangeLog,v 1.1589 2001/10/10 05:02:46 djm Exp $ |
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.102 2001/09/16 14:46:54 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.103 2001/10/06 00:36:42 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -560,17 +560,13 @@ do_exec_pty(Session *s, const char *command) | |||
560 | /* Make the pseudo tty our controlling tty. */ | 560 | /* Make the pseudo tty our controlling tty. */ |
561 | pty_make_controlling_tty(&ttyfd, s->tty); | 561 | pty_make_controlling_tty(&ttyfd, s->tty); |
562 | 562 | ||
563 | /* Redirect stdin from the pseudo tty. */ | 563 | /* Redirect stdin/stdout/stderr from the pseudo tty. */ |
564 | if (dup2(ttyfd, fileno(stdin)) < 0) | 564 | if (dup2(ttyfd, 0) < 0) |
565 | error("dup2 stdin failed: %.100s", strerror(errno)); | 565 | error("dup2 stdin: %s", strerror(errno)); |
566 | 566 | if (dup2(ttyfd, 1) < 0) | |
567 | /* Redirect stdout to the pseudo tty. */ | 567 | error("dup2 stdout: %s", strerror(errno)); |
568 | if (dup2(ttyfd, fileno(stdout)) < 0) | 568 | if (dup2(ttyfd, 2) < 0) |
569 | error("dup2 stdin failed: %.100s", strerror(errno)); | 569 | error("dup2 stderr: %s", strerror(errno)); |
570 | |||
571 | /* Redirect stderr to the pseudo tty. */ | ||
572 | if (dup2(ttyfd, fileno(stderr)) < 0) | ||
573 | error("dup2 stdin failed: %.100s", strerror(errno)); | ||
574 | 570 | ||
575 | /* Close the extra descriptor for the pseudo tty. */ | 571 | /* Close the extra descriptor for the pseudo tty. */ |
576 | close(ttyfd); | 572 | close(ttyfd); |