]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- markus@cvs.openbsd.org 2001/10/06 00:36:42
authorDamien Miller <djm@mindrot.org>
Wed, 10 Oct 2001 05:02:46 +0000 (15:02 +1000)
committerDamien Miller <djm@mindrot.org>
Wed, 10 Oct 2001 05:02:46 +0000 (15:02 +1000)
     [session.c]
     fix typo in error message, sync with do_exec_nopty

ChangeLog
session.c

index 13a1ef1094ba09f74f78bd96d45df8565e9bdb83..c44c00c40ef4c0c9a97085fb3c79da808d653ade 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
    - markus@cvs.openbsd.org 2001/10/06 00:14:50
      [sshconnect.c]
      remove unused argument
+   - markus@cvs.openbsd.org 2001/10/06 00:36:42
+     [session.c]
+     fix typo in error message, sync with do_exec_nopty
 
 20011007
  - (bal) ssh-copy-id corrected permissions for .ssh/ and authorized_keys.
  - Wrote replacements for strlcpy and mkdtemp
  - Released 1.0pre1
 
-$Id: ChangeLog,v 1.1588 2001/10/10 05:02:03 djm Exp $
+$Id: ChangeLog,v 1.1589 2001/10/10 05:02:46 djm Exp $
index 482590803d70194dff6eef723c55844ed52cbbea..b891431796ec314ceae4896aface8a15fcdb9521 100644 (file)
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.102 2001/09/16 14:46:54 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.103 2001/10/06 00:36:42 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -560,17 +560,13 @@ do_exec_pty(Session *s, const char *command)
                /* Make the pseudo tty our controlling tty. */
                pty_make_controlling_tty(&ttyfd, s->tty);
 
-               /* Redirect stdin from the pseudo tty. */
-               if (dup2(ttyfd, fileno(stdin)) < 0)
-                       error("dup2 stdin failed: %.100s", strerror(errno));
-
-               /* Redirect stdout to the pseudo tty. */
-               if (dup2(ttyfd, fileno(stdout)) < 0)
-                       error("dup2 stdin failed: %.100s", strerror(errno));
-
-               /* Redirect stderr to the pseudo tty. */
-               if (dup2(ttyfd, fileno(stderr)) < 0)
-                       error("dup2 stdin failed: %.100s", strerror(errno));
+               /* Redirect stdin/stdout/stderr from the pseudo tty. */
+               if (dup2(ttyfd, 0) < 0)
+                       error("dup2 stdin: %s", strerror(errno));
+               if (dup2(ttyfd, 1) < 0)
+                       error("dup2 stdout: %s", strerror(errno));
+               if (dup2(ttyfd, 2) < 0)
+                       error("dup2 stderr: %s", strerror(errno));
 
                /* Close the extra descriptor for the pseudo tty. */
                close(ttyfd);