=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh.c,v retrieving revision 1.260 retrieving revision 1.261 diff -u -r1.260 -r1.261 --- src/usr.bin/ssh/ssh.c 2006/02/10 00:27:13 1.260 +++ src/usr.bin/ssh/ssh.c 2006/02/12 06:45:34 1.261 @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.260 2006/02/10 00:27:13 stevesk Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.261 2006/02/12 06:45:34 djm Exp $"); #include #include @@ -631,11 +631,15 @@ options.control_path = NULL; if (options.control_path != NULL) { + char me[NI_MAXHOST]; + + if (gethostname(me, sizeof(me)) == -1) + fatal("gethostname: %s", strerror(errno)); snprintf(buf, sizeof(buf), "%d", options.port); cp = tilde_expand_filename(options.control_path, original_real_uid); options.control_path = percent_expand(cp, "p", buf, "h", host, - "r", options.user, (char *)NULL); + "r", options.user, "l", me, (char *)NULL); xfree(cp); } if (mux_command != 0 && options.control_path == NULL)