home *** CD-ROM | disk | FTP | other *** search
- http://marc.theaimsgroup.com/?l=secure-shell&m=94904735600815&w=2
-
- List: secure-shell
- Subject: X11DisplayOffset in SSH 2 (patch)
- From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
- Date: 2000-01-28 6:46:45
-
-
- (I'm not on the list.)
-
- The default offset of 10 in SSH is too low on one of our servers. In
- SSH 1 the offset can be defined in /etc/ssh_config, but the keyword
- disappeared in SSH 2. Here's a patch to put it back in:
-
-
- Kjetil T.
-
- --- ./apps/ssh/sshchx11.c.orig Fri Jan 28 07:18:37 2000
- +++ ./apps/ssh/sshchx11.c Fri Jan 28 07:23:01 2000
- @@ -473,7 +473,8 @@
-
-
- /* Open the first available display, starting at number 10. */
- - for (display_number = 10; display_number < X11_MAX_DISPLAYS;
- + for (display_number = session->common->config->x11displayoffset;
- + display_number < X11_MAX_DISPLAYS;
- display_number++)
- {
- /* Format a port number for the display. */
- --- ./apps/ssh/sshconfig.c.orig Thu Jan 27 21:44:00 2000
- +++ ./apps/ssh/sshconfig.c Fri Jan 28 07:20:39 2000
- @@ -174,6 +174,7 @@
-
- config->forward_agent = TRUE;
- config->forward_x11 = TRUE;
- + config->x11displayoffset = 10;
- config->password_authentication = -1;
- config->rhosts_authentication = TRUE;
- config->rhosts_pubkey_authentication = TRUE;
- @@ -457,6 +458,20 @@
- if (strcmp(var, "forwardx11") == 0)
- {
- config->forward_x11 = bool;
- + return FALSE;
- + }
- +
- + if (strcmp(var, "x11displayoffset") == 0)
- + {
- + if (num >= 0 && num < 1000)
- + {
- + config->x11displayoffset = num;
- + }
- + else
- + {
- + ssh_warning("Ignoring illegal X11 display offset %s", val);
- + return TRUE;
- + }
- return FALSE;
- }
-
- --- ./apps/ssh/sshconfig.h.orig Thu Jan 27 21:50:27 2000
- +++ ./apps/ssh/sshconfig.h Fri Jan 28 05:45:19 2000
- @@ -86,6 +86,7 @@
-
- Boolean forward_agent;
- Boolean forward_x11;
- + int x11displayoffset;
- Boolean password_authentication;
- Boolean rhosts_authentication;
- Boolean rhosts_pubkey_authentication;
-