summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-07 15:38:31 +1100
committerDamien Miller <djm@mindrot.org>1999-12-07 15:38:31 +1100
commit037a0dc0835bb5a442bdcbeecdd5baed723f0b45 (patch)
treed02954d57ac437fd036e3e9544f24559ca8f0f0f /serverloop.c
parenteabf3417bc73ca9546a3ed489cd809ffdf303853 (diff)
- Merged more OpenBSD changes:
- [atomicio.c authfd.c scp.c serverloop.c ssh.h sshconnect.c sshd.c] move atomicio into it's own file. wrap all socket write()s which were doing write(sock, buf, len) != len, with atomicio() calls. - [auth-skey.c] fd leak - [authfile.c] properly name fd variable - [channels.c] display great hatred towards strcpy - [pty.c pty.h sshd.c] use openpty() if it exists (it does on BSD4_4) - [tildexpand.c] check for ~ expansion past MAXPATHLEN - Modified helper.c to use new atomicio function. - Reformat Makefile a little - Moved RC4 routines from rc4.[ch] into helper.c - Added autoconf code to detect /dev/ptmx (Solaris) and /dev/ptc (AIX)
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/serverloop.c b/serverloop.c
index 94c211571..a5ecfe97d 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -170,7 +170,7 @@ make_packets_from_stderr_data()
170 170
171 /* Send buffered stderr data to the client. */ 171 /* Send buffered stderr data to the client. */
172 while (buffer_len(&stderr_buffer) > 0 && 172 while (buffer_len(&stderr_buffer) > 0 &&
173 packet_not_very_much_data_to_write()) { 173 packet_not_very_much_data_to_write()) {
174 len = buffer_len(&stderr_buffer); 174 len = buffer_len(&stderr_buffer);
175 if (packet_is_interactive()) { 175 if (packet_is_interactive()) {
176 if (len > 512) 176 if (len > 512)
@@ -199,7 +199,7 @@ make_packets_from_stdout_data()
199 199
200 /* Send buffered stdout data to the client. */ 200 /* Send buffered stdout data to the client. */
201 while (buffer_len(&stdout_buffer) > 0 && 201 while (buffer_len(&stdout_buffer) > 0 &&
202 packet_not_very_much_data_to_write()) { 202 packet_not_very_much_data_to_write()) {
203 len = buffer_len(&stdout_buffer); 203 len = buffer_len(&stdout_buffer);
204 if (packet_is_interactive()) { 204 if (packet_is_interactive()) {
205 if (len > 512) 205 if (len > 512)
@@ -364,7 +364,7 @@ process_output(fd_set * writeset)
364 /* Write buffered data to program stdin. */ 364 /* Write buffered data to program stdin. */
365 if (fdin != -1 && FD_ISSET(fdin, writeset)) { 365 if (fdin != -1 && FD_ISSET(fdin, writeset)) {
366 len = write(fdin, buffer_ptr(&stdin_buffer), 366 len = write(fdin, buffer_ptr(&stdin_buffer),
367 buffer_len(&stdin_buffer)); 367 buffer_len(&stdin_buffer));
368 if (len <= 0) { 368 if (len <= 0) {
369#ifdef USE_PIPES 369#ifdef USE_PIPES
370 close(fdin); 370 close(fdin);