summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-12-04 04:36:48 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-12-04 04:36:48 +0000
commitbe1e9b84f3670dbb9a0b7988e5b30be91815876e (patch)
tree12773ad7c8627c203925cf2b1868cc49355f562f /usr.bin
parent3b5581ebc1935a473a69582a58e6bcb85b61fa79 (diff)
remove xauth entries before add; PR 2994 from janjaap@stack.nl.
ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/session.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c
index d5ae3c7e298..d17dd25b376 100644
--- a/usr.bin/ssh/session.c
+++ b/usr.bin/ssh/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.150 2002/09/16 19:55:33 stevesk Exp $");
+RCSID("$OpenBSD: session.c,v 1.151 2002/12/04 04:36:47 stevesk Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -966,8 +966,10 @@ do_rc_files(Session *s, const char *shell)
/* Add authority data to .Xauthority if appropriate. */
if (debug_flag) {
fprintf(stderr,
- "Running %.500s add "
- "%.100s %.100s %.100s\n",
+ "Running %.500s remove %.100s\n",
+ options.xauth_location, s->auth_display);
+ fprintf(stderr,
+ "%.500s add %.100s %.100s %.100s\n",
options.xauth_location, s->auth_display,
s->auth_proto, s->auth_data);
}
@@ -975,6 +977,8 @@ do_rc_files(Session *s, const char *shell)
options.xauth_location);
f = popen(cmd, "w");
if (f) {
+ fprintf(f, "remove %s\n",
+ s->auth_display);
fprintf(f, "add %s %s %s\n",
s->auth_display, s->auth_proto,
s->auth_data);