mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-29 16:54:51 +02:00
- markus@cvs.openbsd.org 2001/10/06 00:36:42
[session.c] fix typo in error message, sync with do_exec_nopty
This commit is contained in:
parent
e398004f6c
commit
9c75142917
@ -12,6 +12,9 @@
|
|||||||
- markus@cvs.openbsd.org 2001/10/06 00:14:50
|
- markus@cvs.openbsd.org 2001/10/06 00:14:50
|
||||||
[sshconnect.c]
|
[sshconnect.c]
|
||||||
remove unused argument
|
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
|
20011007
|
||||||
- (bal) ssh-copy-id corrected permissions for .ssh/ and authorized_keys.
|
- (bal) ssh-copy-id corrected permissions for .ssh/ and authorized_keys.
|
||||||
@ -6657,4 +6660,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- 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 $
|
||||||
|
20
session.c
20
session.c
@ -33,7 +33,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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 "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
@ -560,17 +560,13 @@ do_exec_pty(Session *s, const char *command)
|
|||||||
/* Make the pseudo tty our controlling tty. */
|
/* Make the pseudo tty our controlling tty. */
|
||||||
pty_make_controlling_tty(&ttyfd, s->tty);
|
pty_make_controlling_tty(&ttyfd, s->tty);
|
||||||
|
|
||||||
/* Redirect stdin from the pseudo tty. */
|
/* Redirect stdin/stdout/stderr from the pseudo tty. */
|
||||||
if (dup2(ttyfd, fileno(stdin)) < 0)
|
if (dup2(ttyfd, 0) < 0)
|
||||||
error("dup2 stdin failed: %.100s", strerror(errno));
|
error("dup2 stdin: %s", strerror(errno));
|
||||||
|
if (dup2(ttyfd, 1) < 0)
|
||||||
/* Redirect stdout to the pseudo tty. */
|
error("dup2 stdout: %s", strerror(errno));
|
||||||
if (dup2(ttyfd, fileno(stdout)) < 0)
|
if (dup2(ttyfd, 2) < 0)
|
||||||
error("dup2 stdin failed: %.100s", strerror(errno));
|
error("dup2 stderr: %s", strerror(errno));
|
||||||
|
|
||||||
/* Redirect stderr to the pseudo tty. */
|
|
||||||
if (dup2(ttyfd, fileno(stderr)) < 0)
|
|
||||||
error("dup2 stdin failed: %.100s", strerror(errno));
|
|
||||||
|
|
||||||
/* Close the extra descriptor for the pseudo tty. */
|
/* Close the extra descriptor for the pseudo tty. */
|
||||||
close(ttyfd);
|
close(ttyfd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user