diff options
author | Damien Miller <djm@mindrot.org> | 2000-05-20 12:49:31 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-05-20 12:49:31 +1000 |
commit | d999ae26b7bad888b7a9b375faa38c1d6a8db1ce (patch) | |
tree | 30fe70eadced6dc89b2a37848015de9e3958926f | |
parent | ef7df540735d5ee8889f7f87cc74fc4ec5f4e260 (diff) |
- Xauth fix from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | session.c | 13 | ||||
-rw-r--r-- | sshd.c | 2 |
3 files changed, 14 insertions, 4 deletions
@@ -1,3 +1,6 @@ +20000520 + - Xauth fix from Markus Friedl <markus.friedl@informatik.uni-erlangen.de> + 20000518 - Include Andre Lucas' fixprogs script. Forgot to "cvs add" it yesterday - OpenBSD CVS updates: @@ -1035,13 +1035,20 @@ do_child(const char *command, struct passwd * pw, const char *term, else { /* Add authority data to .Xauthority if appropriate. */ if (auth_proto != NULL && auth_data != NULL) { - if (debug_flag) + char *screen = strchr(display, ':'); + if (debug_flag) { fprintf(stderr, "Running %.100s add %.100s %.100s %.100s\n", - XAUTH_PATH, display, auth_proto, auth_data); - + XAUTH_PATH, display, auth_proto, auth_data); + if (screen != NULL) + fprintf(stderr, "Adding %.*s/unix%s %s %s\n", + screen-display, display, screen, auth_proto, auth_data); + } f = popen(XAUTH_PATH " -q -", "w"); if (f) { fprintf(f, "add %s %s %s\n", display, auth_proto, auth_data); + if (screen != NULL) + fprintf(f, "add %.*s/unix%s %s %s\n", + screen-display, display, screen, auth_proto, auth_data); pclose(f); } else fprintf(stderr, "Could not run %s -q -\n", XAUTH_PATH); @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.116 2000/05/17 08:20:16 markus Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.117 2000/05/18 13:27:36 djm Exp $"); #include "xmalloc.h" #include "rsa.h" |