summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:15:57 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:15:57 +0000
commit611797ed1533f14ac2c04a2531ad90615afa6174 (patch)
tree96ecba14e265263a04cb3970ec45184f87ad156e /session.c
parentc276c1208e43ed4305d723004ddf602fbe99513b (diff)
- stevesk@cvs.openbsd.org 2002/12/04 04:36:47
[session.c] remove xauth entries before add; PR 2994 from janjaap@stack.nl. ok markus@
Diffstat (limited to 'session.c')
-rw-r--r--session.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/session.c b/session.c
index 9074525a4..ac1561756 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.150 2002/09/16 19:55:33 stevesk Exp $"); 36RCSID("$OpenBSD: session.c,v 1.151 2002/12/04 04:36:47 stevesk Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1146,8 +1146,10 @@ do_rc_files(Session *s, const char *shell)
1146 /* Add authority data to .Xauthority if appropriate. */ 1146 /* Add authority data to .Xauthority if appropriate. */
1147 if (debug_flag) { 1147 if (debug_flag) {
1148 fprintf(stderr, 1148 fprintf(stderr,
1149 "Running %.500s add " 1149 "Running %.500s remove %.100s\n",
1150 "%.100s %.100s %.100s\n", 1150 options.xauth_location, s->auth_display);
1151 fprintf(stderr,
1152 "%.500s add %.100s %.100s %.100s\n",
1151 options.xauth_location, s->auth_display, 1153 options.xauth_location, s->auth_display,
1152 s->auth_proto, s->auth_data); 1154 s->auth_proto, s->auth_data);
1153 } 1155 }
@@ -1155,6 +1157,8 @@ do_rc_files(Session *s, const char *shell)
1155 options.xauth_location); 1157 options.xauth_location);
1156 f = popen(cmd, "w"); 1158 f = popen(cmd, "w");
1157 if (f) { 1159 if (f) {
1160 fprintf(f, "remove %s\n",
1161 s->auth_display);
1158 fprintf(f, "add %s %s %s\n", 1162 fprintf(f, "add %s %s %s\n",
1159 s->auth_display, s->auth_proto, 1163 s->auth_display, s->auth_proto,
1160 s->auth_data); 1164 s->auth_data);