Index: openssh_cvs/ssh.c =================================================================== RCS file: /cvs/openssh_cvs/ssh.c,v retrieving revision 1.111 diff -u -p -r1.111 ssh.c --- openssh_cvs/ssh.c 2001/08/06 21:59:26 1.111 +++ openssh_cvs/ssh.c 2001/08/09 14:53:14 @@ -709,7 +709,7 @@ again: * Now that we are back to our own permissions, create ~/.ssh * directory if it doesn\'t already exist. */ - snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_DIR); + snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); if (stat(buf, &st) < 0) if (mkdir(buf, 0700) < 0) error("Could not create directory '%.200s'.", buf); Index: openssh_cvs/tildexpand.c =================================================================== RCS file: /cvs/openssh_cvs/tildexpand.c,v retrieving revision 1.9 diff -u -p -r1.9 tildexpand.c --- openssh_cvs/tildexpand.c 2001/02/09 02:11:25 1.9 +++ openssh_cvs/tildexpand.c 2001/08/09 14:53:14 @@ -67,6 +67,6 @@ tilde_expand_filename(const char *filena if (len > MAXPATHLEN) fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1); expanded = xmalloc(len); - snprintf(expanded, len, "%s/%s", pw->pw_dir, cp + 1); + snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", cp + 1); return expanded; }