summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh.c b/ssh.c
index e2d2c16bd..09e4ee540 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.137 2001/08/02 16:14:05 jakob Exp $"); 42RCSID("$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);