Skip to content

Commit a138680

Browse files
committed
Merge branch 'L1'
2 parents b8d8245 + 7f97b81 commit a138680

File tree

109 files changed

+70003
-14073
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+70003
-14073
lines changed

.gitattributes

+7
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@
2222
config.sub text eol=lf
2323
fixalgorithms text eol=lf
2424
runconfigure text eol=lf
25+
configure text eol=lf
26+
config.guess text eol=lf
27+
config.sub text eol=lf
28+
win32_build text eol=lf
29+
win32_config.guess text eol=lf
30+
win32_config.sub text eol=lf
31+

.gitignore

+8-8
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ openssh.xml
230230
opensshd.init
231231
survey.sh
232232
buildpkg.sh
233-
config.h.in
234-
235-
236-
config.h
237233
ssh_host_rsa_key.pub
238234
ssh_host_rsa_key
239235
ssh_host_rsa_key
@@ -264,15 +260,19 @@ Makefile
264260
openbsd-compat/Makefile
265261
openbsd-compat/regress/Makefile
266262
contrib/win32/win32compat/Makefile
267-
config.h
268-
config.h
269263
regress/rsa_ssh2_cr.prv
270264
regress/rsa_ssh2_crnl.prv
271265
regress/t7.out.pub
272266
regress/t6.out2
273267
config.h
268+
config.h.in
274269
configure
275-
config.h
270+
config.h.tail
271+
config.sub
272+
config.guess
273+
Makefile.in
274+
276275

277276
#temp key files
278-
d2utmpa*
277+
d2utmpa*
278+
configure

Makefile.in

+40-49
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: Makefile.in,v 1.325 2011/08/05 20:15:18 djm Exp $
1+
# $Id: Makefile.in,v 1.365 2014/08/30 06:23:07 djm Exp $
22

33
# uncomment if you run a non bourne compatable shell. Ie. csh
44
#SHELL = @SH@
@@ -44,7 +44,7 @@ CC=@CC@
4444
LD=@LD@
4545
CFLAGS=@CFLAGS@
4646
CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
47-
LIBS=@LIBS@ -lbcrypt
47+
LIBS=@LIBS@
4848
K5LIBS=@K5LIBS@
4949
GSSLIBS=@GSSLIBS@
5050
SSHLIBS=@SSHLIBS@
@@ -58,11 +58,11 @@ PERL=@PERL@
5858
SED=@SED@
5959
ENT=@ENT@
6060
XAUTH_PATH=@XAUTH_PATH@
61-
LDFLAGS=-L. -Lopenbsd-compat/ -Lcontrib/win32/win32compat @LDFLAGS@ -L/lib/w32api
61+
LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
6262
EXEEXT=@EXEEXT@
6363
MANFMT=@MANFMT@
6464

65-
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT)
65+
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT)
6666

6767
LIBOPENSSH_OBJS=\
6868
ssh_api.o \
@@ -87,12 +87,11 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
8787
msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \
8888
ssh-pkcs11.o smult_curve25519_ref.o \
8989
poly1305.o chacha.o cipher-chachapoly.o \
90-
ssh-ed25519.o digest-libc.o hmac.o \
90+
ssh-ed25519.o digest-openssl.o digest-libc.o hmac.o \
9191
sc25519.o ge25519.o fe25519.o ed25519.o verify.o hash.o blocks.o \
9292
kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
9393
kexdhc.o kexgexc.o kexecdhc.o kexc25519c.o \
94-
kexdhs.o kexgexs.o kexecdhs.o kexc25519s.o \
95-
kerberos-sspi.o schnorr.o jpake.o
94+
kexdhs.o kexgexs.o kexecdhs.o kexc25519s.o
9695

9796
SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
9897
sshconnect.o sshconnect1.o sshconnect2.o mux.o \
@@ -111,8 +110,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
111110
sftp-server.o sftp-common.o \
112111
roaming_common.o roaming_serv.o \
113112
sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \
114-
sandbox-seccomp-filter.o sandbox-capsicum.o \
115-
pam.o kexdhs.o kexgexs.o kexecdhs.o
113+
sandbox-seccomp-filter.o sandbox-capsicum.o
116114

117115
MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out
118116
MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5
@@ -153,10 +151,6 @@ $(SSHDOBJS): Makefile.in config.h
153151
.c.o:
154152
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
155153

156-
LIBWIN32COMPAT=contrib/win32/win32compat/@LIBWIN32COMPAT@
157-
$(LIBWIN32COMPAT): always
158-
(cd contrib/win32/win32compat && $(MAKE))
159-
160154
LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
161155
$(LIBCOMPAT): always
162156
(cd openbsd-compat && $(MAKE))
@@ -166,39 +160,42 @@ libssh.a: $(LIBSSH_OBJS)
166160
$(AR) rv $@ $(LIBSSH_OBJS)
167161
$(RANLIB) $@
168162

169-
ssh$(EXEEXT): $(LIBCOMPAT) libssh.a @LIBWIN32COMPATDEPEND@ $(SSHOBJS)
170-
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) ./libssh.a -lopenbsd-compat $(SSHLIBS) @LINKWIN32COMPAT@ $(LIBS)
163+
ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
164+
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHLIBS) $(LIBS) $(GSSLIBS)
165+
166+
sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
167+
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS)
171168

172-
sshd$(EXEEXT): libssh.a @LIBWIN32COMPATDEPEND@ $(LIBCOMPAT) $(SSHDOBJS)
173-
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(SSHDLIBS) $(LIBS)
169+
scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o
170+
$(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
174171

175-
ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o @LIBWIN32COMPATDEPEND@
176-
$(LD) -o $@ ssh-add.o $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
172+
ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
173+
$(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
177174

178-
ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o @LIBWIN32COMPATDEPEND@
179-
$(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
175+
ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o
176+
$(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
180177

181-
ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o @LIBWIN32COMPATDEPEND@
182-
$(LD) -o $@ ssh-keygen.o $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
178+
ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
179+
$(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
183180

184-
ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o @LIBWIN32COMPATDEPEND@
185-
$(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
181+
ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o
182+
$(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
186183

187-
ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o @LIBWIN32COMPATDEPEND@
188-
$(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) ./libssh.a -lopenbsd-compat -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
184+
ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o
185+
$(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
189186

190-
ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o @LIBWIN32COMPATDEPEND@
191-
$(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
187+
ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o
188+
$(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
192189

193-
sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o sftp-server-main.o @LIBWIN32COMPATDEPEND@
194-
$(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
190+
sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o sftp-server-main.o
191+
$(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
195192

196-
sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o @LIBWIN32COMPATDEPEND@
197-
$(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS) $(LIBEDIT)
193+
sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
194+
$(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
198195

199196
# test driver for the loginrec code - not built by default
200-
logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o @LIBWIN32COMPATDEPEND@
201-
$(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat ./libssh.a @LINKWIN32COMPAT@ $(LIBS)
197+
logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
198+
$(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
202199

203200
$(MANPAGES): $(MANPAGES_IN)
204201
if test "$(MANTYPE)" = "cat"; then \
@@ -244,9 +241,6 @@ clean: regressclean
244241
rm -f regress/unittests/kex/*.o
245242
rm -f regress/unittests/kex/test_kex
246243
(cd openbsd-compat && $(MAKE) clean)
247-
if test -f contrib/win32/win32compat/Makefile ; then \
248-
(cd contrib/win32/win32compat && $(MAKE) clean) \
249-
fi
250244

251245
distclean: regressclean
252246
rm -f *.o *.a $(TARGETS) logintest config.cache config.log
@@ -267,9 +261,6 @@ distclean: regressclean
267261
rm -f regress/unittests/kex/*.o
268262
rm -f regress/unittests/kex/test_kex
269263
(cd openbsd-compat && $(MAKE) distclean)
270-
if test -f contrib/win32/win32compat/Makefile ; then \
271-
(cd contrib/win32/win32compat && $(MAKE) distclean) \
272-
fi
273264
if test -d pkg ; then \
274265
rm -fr pkg ; \
275266
fi
@@ -461,15 +452,15 @@ regress-prep:
461452

462453
regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c
463454
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
464-
$(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
455+
$(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
465456

466457
regress/setuid-allowed$(EXEEXT): $(srcdir)/regress/setuid-allowed.c
467458
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
468-
$(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
459+
$(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
469460

470461
regress/netcat$(EXEEXT): $(srcdir)/regress/netcat.c
471462
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
472-
$(LDFLAGS) ./libssh.a -lopenbsd-compat @LINKWIN32COMPAT@ $(LIBS)
463+
$(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
473464

474465
UNITTESTS_TEST_HELPER_OBJS=\
475466
regress/unittests/test_helper/test_helper.o \
@@ -493,7 +484,7 @@ regress/unittests/sshbuf/test_sshbuf$(EXEEXT): ${UNITTESTS_TEST_SSHBUF_OBJS} \
493484
regress/unittests/test_helper/libtest_helper.a libssh.a
494485
$(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_SSHBUF_OBJS) \
495486
regress/unittests/test_helper/libtest_helper.a \
496-
./libssh.a -lopenbsd-compat -lwin32compat $(LIBS)
487+
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
497488

498489
UNITTESTS_TEST_SSHKEY_OBJS=\
499490
regress/unittests/sshkey/test_fuzz.o \
@@ -506,7 +497,7 @@ regress/unittests/sshkey/test_sshkey$(EXEEXT): ${UNITTESTS_TEST_SSHKEY_OBJS} \
506497
regress/unittests/test_helper/libtest_helper.a libssh.a
507498
$(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_SSHKEY_OBJS) \
508499
regress/unittests/test_helper/libtest_helper.a \
509-
./libssh.a -lopenbsd-compat -lwin32compat $(LIBS)
500+
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
510501

511502
UNITTESTS_TEST_BITMAP_OBJS=\
512503
regress/unittests/bitmap/tests.o
@@ -515,7 +506,7 @@ regress/unittests/bitmap/test_bitmap$(EXEEXT): ${UNITTESTS_TEST_BITMAP_OBJS} \
515506
regress/unittests/test_helper/libtest_helper.a libssh.a
516507
$(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_BITMAP_OBJS) \
517508
regress/unittests/test_helper/libtest_helper.a \
518-
./libssh.a -lopenbsd-compat -lwin32compat $(LIBS)
509+
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
519510

520511
UNITTESTS_TEST_KEX_OBJS=\
521512
regress/unittests/kex/tests.o \
@@ -526,7 +517,7 @@ regress/unittests/kex/test_kex$(EXEEXT): ${UNITTESTS_TEST_KEX_OBJS} \
526517
regress/unittests/test_helper/libtest_helper.a libssh.a
527518
$(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_KEX_OBJS) \
528519
regress/unittests/test_helper/libtest_helper.a \
529-
./libssh.a -lopenbsd-compat -lwin32compat $(LIBS)
520+
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
530521

531522
UNITTESTS_TEST_HOSTKEYS_OBJS=\
532523
regress/unittests/hostkeys/tests.o \
@@ -537,7 +528,7 @@ regress/unittests/hostkeys/test_hostkeys$(EXEEXT): \
537528
regress/unittests/test_helper/libtest_helper.a libssh.a
538529
$(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_HOSTKEYS_OBJS) \
539530
regress/unittests/test_helper/libtest_helper.a \
540-
./libssh.a -lopenbsd-compat -lwin32compat $(LIBS)
531+
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
541532

542533
REGRESS_BINARIES=\
543534
regress/modpipe$(EXEEXT) \

auth-passwd.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
*/
3838

3939
#include "includes.h"
40-
40+
#ifdef WIN32_FIXME
4141
#include "xmalloc.h"
42+
#endif
4243

4344
/*
4445
* We support only client side kerberos on Windows.

auth2-pubkey.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ extern u_int session_id2_len;
8686
#ifdef WIN32_FIXME
8787

8888
extern char HomeDirLsaW[MAX_PATH];
89-
89+
wchar_t *GetHomeDir(char *userName);
90+
9091
#endif
9192

9293

channels.c

+35-5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191

9292
#ifdef WIN32_FIXME
9393
#define isatty(a) WSHELPisatty(a)
94+
#define SFD_TYPE_CONSOLE 4
9495
#endif
9596

9697

@@ -1686,8 +1687,10 @@ channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
16861687
errno = 0;
16871688
len = read(c->rfd, buf, sizeof(buf));
16881689
#ifdef WIN32_FIXME
1689-
if (len == 0)
1690+
if (len == 0) {
1691+
if ( get_sfd_type(c->rfd) == SFD_TYPE_CONSOLE)
16901692
return 1; // in Win32 console read, there may be no data, but is ok
1693+
}
16911694
#endif
16921695
if (len < 0 && (errno == EINTR ||
16931696
((errno == EAGAIN || errno == EWOULDBLOCK) && !force)))
@@ -2410,6 +2413,9 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
24102413
const u_char *data;
24112414
u_int data_len, win_len;
24122415
Channel *c;
2416+
#ifdef WIN32_FIXME
2417+
static charinline = 0; // counts characters in a line for sshd in tty mode
2418+
#endif
24132419

24142420
/* Get the channel number and verify it. */
24152421
id = packet_get_int();
@@ -2474,11 +2480,28 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
24742480
}
24752481
}
24762482
else {
2483+
// avoid sending the 4 arrow keys out to remote for now "ESC[A" ..
2484+
if ( (c->isatty) && (data_len ==3) && (data[0] == '\033') && (data[1] == '[')) {
2485+
if ( ( data[2] == 'A') || (data[2] == 'B') || (data[2] == 'C') || (data[2] == 'D'))
2486+
packet_check_eom();
2487+
return 0;
2488+
}
24772489
buffer_append(&c->output, data, data_len); // it is the sshd server, so pass it on
2478-
if ( c->isatty ) { // we echo the data if it is sshd server and pty interactive mode
2479-
buffer_append(&c->input, data, data_len);
2480-
if ( (data_len ==1) && (data[0] == '\b') )
2481-
buffer_append(&c->input, " \b", 2); // for backspace, we need to send space and another backspace for visual erase
2490+
if ( c->isatty ) { // we echo the data if it is sshd server and pty interactive mode
2491+
2492+
if ( (data_len ==1) && (data[0] == '\b') ) {
2493+
if (charinline >0) {
2494+
buffer_append(&c->input, "\b \b", 3); // for backspace, we need to send space and another backspace for visual erase
2495+
charinline--;
2496+
}
2497+
}
2498+
else {
2499+
buffer_append(&c->input, data, data_len);
2500+
charinline += data_len; // one more char on the line
2501+
}
2502+
2503+
if ( (data[data_len-1] == '\r') || (data[data_len-1] == '\n') )
2504+
charinline = 0; // a line has ended, begin char in line count again
24822505
}
24832506
}
24842507
}
@@ -2532,7 +2555,14 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
25322555
}
25332556
debug2("channel %d: rcvd ext data %d", c->self, data_len);
25342557
c->local_window -= data_len;
2558+
#ifndef WIN32_FIXME
25352559
buffer_append(&c->extended, data, data_len);
2560+
#else
2561+
if ( c->client_tty )
2562+
telProcessNetwork ( data, data_len ); // run it by ANSI engine if it is the ssh client
2563+
else
2564+
buffer_append(&c->extended, data, data_len);
2565+
#endif
25362566
free(data);
25372567
return 0;
25382568
}

0 commit comments

Comments
 (0)