diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.137 2001/08/02 16:14:05 jakob Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.138 2001/08/11 22:51:27 jakob Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -709,7 +709,7 @@ again: | |||
709 | * Now that we are back to our own permissions, create ~/.ssh | 709 | * Now that we are back to our own permissions, create ~/.ssh |
710 | * directory if it doesn\'t already exist. | 710 | * directory if it doesn\'t already exist. |
711 | */ | 711 | */ |
712 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_DIR); | 712 | snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); |
713 | if (stat(buf, &st) < 0) | 713 | if (stat(buf, &st) < 0) |
714 | if (mkdir(buf, 0700) < 0) | 714 | if (mkdir(buf, 0700) < 0) |
715 | error("Could not create directory '%.200s'.", buf); | 715 | error("Could not create directory '%.200s'.", buf); |