summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-20 12:49:31 +1000
committerDamien Miller <djm@mindrot.org>2000-05-20 12:49:31 +1000
commitd999ae26b7bad888b7a9b375faa38c1d6a8db1ce (patch)
tree30fe70eadced6dc89b2a37848015de9e3958926f
parentef7df540735d5ee8889f7f87cc74fc4ec5f4e260 (diff)
- Xauth fix from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
-rw-r--r--ChangeLog3
-rw-r--r--session.c13
-rw-r--r--sshd.c2
3 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0628bb08..a4e0d739 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
diff --git a/session.c b/session.c
index 23c56605..4b7404f7 100644
--- a/session.c
+++ b/session.c
@@ -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);
diff --git a/sshd.c b/sshd.c
index 256018f6..39fbcba4 100644
--- a/sshd.c
+++ b/sshd.c
@@ -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"