diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.150 2002/09/16 19:55:33 stevesk Exp $"); | 36 | RCSID("$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); |