Bugzilla – Attachment 1178 Details for
Bug 1153
DISPLAY should be set form the connected IP, not the hostname
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Set $DISPLAY to match what xauth ends up using
openssh-bug1153.patch (text/plain), 1.53 KB, created by
Darren Tucker
on 2006-08-20 15:49:44 AEST
(
hide
)
Description:
Set $DISPLAY to match what xauth ends up using
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2006-08-20 15:49:44 AEST
Size:
1.53 KB
patch
obsolete
>Index: session.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/session.c,v >retrieving revision 1.346 >diff -u -p -r1.346 session.c >--- session.c 18 Aug 2006 14:32:46 -0000 1.346 >+++ session.c 20 Aug 2006 05:41:23 -0000 >@@ -1193,7 +1193,7 @@ static void > do_rc_files(Session *s, const char *shell) > { > FILE *f = NULL; >- char cmd[1024]; >+ char cmd[1024], dpy[1024]; > int do_xauth; > struct stat st; > >@@ -1248,10 +1248,39 @@ do_rc_files(Session *s, const char *shel > fprintf(f, "add %s %s %s\n", > s->auth_display, s->auth_proto, > s->auth_data); >- pclose(f); >+ if (pclose(f) != 0) >+ error("%s failed.", options.xauth_location); > } else { > fprintf(stderr, "Could not run %s\n", > cmd); >+ return; >+ } >+ if (options.x11_use_localhost) >+ return; >+ snprintf(cmd, sizeof cmd, "%s -q list %s", >+ options.xauth_location, s->auth_display); >+ f = popen(cmd, "r"); >+ if (f) { >+ if (fgets(cmd, sizeof(cmd), f) == NULL) { >+ error("Could not read xauth data: %s", >+ strerror(errno)); >+ } else { >+ if (sscanf(cmd, "%1024s %*s %*s", dpy) != 1) { >+ error("Bad xauth data"); >+ } else { >+ debug("xauth returned display %s", >+ s->display); >+ xfree(s->display); >+ s->display = xstrdup(dpy); >+ setenv("DISPLAY", s->display, 1); >+ } >+ } >+ if (pclose(f) != 0) >+ error("%s failed.", options.xauth_location); >+ } else { >+ fprintf(stderr, "Could not run %s list\n", >+ cmd); >+ return; > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 1153
:
1064
| 1178