summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-26 14:04:36 +1100
committerDamien Miller <djm@mindrot.org>2006-03-26 14:04:36 +1100
commit71a73671305a2248a6c4a243134ebf28f7d8ee7a (patch)
treec81a7c7ae47bfc385a42cf4f86a9df3af7eeda3e
parent6d39bcf898f2cf296333590330a2d945f2f123a4 (diff)
- deraadt@cvs.openbsd.org 2006/03/20 18:14:02
[channels.c clientloop.c monitor_wrap.c monitor_wrap.h serverloop.c] [ssh.c sshpty.c sshpty.h] sprinkle u_int throughout pty subsystem, ok markus
-rw-r--r--ChangeLog5
-rw-r--r--channels.c8
-rw-r--r--clientloop.c16
-rw-r--r--monitor_wrap.c2
-rw-r--r--serverloop.c8
-rw-r--r--ssh.c8
-rw-r--r--sshpty.c7
7 files changed, 29 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index efe73053f..70ecbcdcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,9 @@
74 - deraadt@cvs.openbsd.org 2006/03/20 17:17:23 74 - deraadt@cvs.openbsd.org 2006/03/20 17:17:23
75 [ssh-rsa.c] 75 [ssh-rsa.c]
76 in a switch (), break after return or goto is stupid 76 in a switch (), break after return or goto is stupid
77 - deraadt@cvs.openbsd.org 2006/03/20 18:14:02
78 [channels.c clientloop.c monitor_wrap.c monitor_wrap.h serverloop.c ssh.c sshpty.c sshpty.h]
79 sprinkle u_int throughout pty subsystem, ok markus
77 80
7820060325 8120060325
79 - OpenBSD CVS Sync 82 - OpenBSD CVS Sync
@@ -4331,4 +4334,4 @@
4331 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 4334 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
4332 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 4335 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
4333 4336
4334$Id: ChangeLog,v 1.4262 2006/03/26 03:03:21 djm Exp $ 4337$Id: ChangeLog,v 1.4263 2006/03/26 03:04:36 djm Exp $
diff --git a/channels.c b/channels.c
index ce868dc4e..6cb88ad44 100644
--- a/channels.c
+++ b/channels.c
@@ -2737,10 +2737,10 @@ channel_send_window_changes(void)
2737 if (ioctl(channels[i]->rfd, TIOCGWINSZ, &ws) < 0) 2737 if (ioctl(channels[i]->rfd, TIOCGWINSZ, &ws) < 0)
2738 continue; 2738 continue;
2739 channel_request_start(i, "window-change", 0); 2739 channel_request_start(i, "window-change", 0);
2740 packet_put_int(ws.ws_col); 2740 packet_put_int((u_int)ws.ws_col);
2741 packet_put_int(ws.ws_row); 2741 packet_put_int((u_int)ws.ws_row);
2742 packet_put_int(ws.ws_xpixel); 2742 packet_put_int((u_int)ws.ws_xpixel);
2743 packet_put_int(ws.ws_ypixel); 2743 packet_put_int((u_int)ws.ws_ypixel);
2744 packet_send(); 2744 packet_send();
2745 } 2745 }
2746} 2746}
diff --git a/clientloop.c b/clientloop.c
index d321cb8bf..36a4a64ae 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -434,10 +434,10 @@ client_check_window_change(void)
434 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) 434 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0)
435 return; 435 return;
436 packet_start(SSH_CMSG_WINDOW_SIZE); 436 packet_start(SSH_CMSG_WINDOW_SIZE);
437 packet_put_int(ws.ws_row); 437 packet_put_int((u_int)ws.ws_row);
438 packet_put_int(ws.ws_col); 438 packet_put_int((u_int)ws.ws_col);
439 packet_put_int(ws.ws_xpixel); 439 packet_put_int((u_int)ws.ws_xpixel);
440 packet_put_int(ws.ws_ypixel); 440 packet_put_int((u_int)ws.ws_ypixel);
441 packet_send(); 441 packet_send();
442 } 442 }
443} 443}
@@ -1881,10 +1881,10 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
1881 1881
1882 channel_request_start(id, "pty-req", 0); 1882 channel_request_start(id, "pty-req", 0);
1883 packet_put_cstring(term != NULL ? term : ""); 1883 packet_put_cstring(term != NULL ? term : "");
1884 packet_put_int(ws.ws_col); 1884 packet_put_int((u_int)ws.ws_col);
1885 packet_put_int(ws.ws_row); 1885 packet_put_int((u_int)ws.ws_row);
1886 packet_put_int(ws.ws_xpixel); 1886 packet_put_int((u_int)ws.ws_xpixel);
1887 packet_put_int(ws.ws_ypixel); 1887 packet_put_int((u_int)ws.ws_ypixel);
1888 tio = get_saved_tio(); 1888 tio = get_saved_tio();
1889 tty_make_modes(-1, tiop != NULL ? tiop : &tio); 1889 tty_make_modes(-1, tiop != NULL ? tiop : &tio);
1890 packet_send(); 1890 packet_send();
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 7536bf305..e5a65491d 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -636,7 +636,7 @@ mm_send_keystate(struct monitor *monitor)
636} 636}
637 637
638int 638int
639mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) 639mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
640{ 640{
641 Buffer m; 641 Buffer m;
642 char *p, *msg; 642 char *p, *msg;
diff --git a/serverloop.c b/serverloop.c
index 816215e05..3bc0c5a76 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -880,10 +880,10 @@ server_input_eof(int type, u_int32_t seq, void *ctxt)
880static void 880static void
881server_input_window_size(int type, u_int32_t seq, void *ctxt) 881server_input_window_size(int type, u_int32_t seq, void *ctxt)
882{ 882{
883 int row = packet_get_int(); 883 u_int row = packet_get_int();
884 int col = packet_get_int(); 884 u_int col = packet_get_int();
885 int xpixel = packet_get_int(); 885 u_int xpixel = packet_get_int();
886 int ypixel = packet_get_int(); 886 u_int ypixel = packet_get_int();
887 887
888 debug("Window change received."); 888 debug("Window change received.");
889 packet_check_eom(); 889 packet_check_eom();
diff --git a/ssh.c b/ssh.c
index 3615d1c40..550218444 100644
--- a/ssh.c
+++ b/ssh.c
@@ -889,10 +889,10 @@ ssh_session(void)
889 /* Store window size in the packet. */ 889 /* Store window size in the packet. */
890 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) 890 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0)
891 memset(&ws, 0, sizeof(ws)); 891 memset(&ws, 0, sizeof(ws));
892 packet_put_int(ws.ws_row); 892 packet_put_int((u_int)ws.ws_row);
893 packet_put_int(ws.ws_col); 893 packet_put_int((u_int)ws.ws_col);
894 packet_put_int(ws.ws_xpixel); 894 packet_put_int((u_int)ws.ws_xpixel);
895 packet_put_int(ws.ws_ypixel); 895 packet_put_int((u_int)ws.ws_ypixel);
896 896
897 /* Store tty modes in the packet. */ 897 /* Store tty modes in the packet. */
898 tty_make_modes(fileno(stdin), NULL); 898 tty_make_modes(fileno(stdin), NULL);
diff --git a/sshpty.c b/sshpty.c
index 2e42aee11..9ac4903ef 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -46,7 +46,7 @@
46 */ 46 */
47 47
48int 48int
49pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) 49pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
50{ 50{
51 /* openpty(3) exists in OSF/1 and some other os'es */ 51 /* openpty(3) exists in OSF/1 and some other os'es */
52 char *name; 52 char *name;
@@ -169,11 +169,12 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
169/* Changes the window size associated with the pty. */ 169/* Changes the window size associated with the pty. */
170 170
171void 171void
172pty_change_window_size(int ptyfd, int row, int col, 172pty_change_window_size(int ptyfd, u_int row, u_int col,
173 int xpixel, int ypixel) 173 u_int xpixel, u_int ypixel)
174{ 174{
175 struct winsize w; 175 struct winsize w;
176 176
177 /* may truncate u_int -> u_short */
177 w.ws_row = row; 178 w.ws_row = row;
178 w.ws_col = col; 179 w.ws_col = col;
179 w.ws_xpixel = xpixel; 180 w.ws_xpixel = xpixel;