summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorjakob <jakob@openbsd.org>2001-08-11 22:51:27 +0000
committerjakob <jakob@openbsd.org>2001-08-11 22:51:27 +0000
commitbe8ff50078f8f75618107b8681101af3e38a8742 (patch)
treeb4777ceb8e78bce9dc1b532d060b144bb5553877 /usr.bin/ssh/ssh.c
parentno need to include vm_prot.h here. (diff)
downloadwireguard-openbsd-be8ff50078f8f75618107b8681101af3e38a8742.tar.xz
wireguard-openbsd-be8ff50078f8f75618107b8681101af3e38a8742.zip
fix more paths beginning with "//"; <bradshaw@staff.crosswalk.com>. ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index f0016c7b5e8..7cac7f5e590 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.137 2001/08/02 16:14:05 jakob Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.138 2001/08/11 22:51:27 jakob Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -685,7 +685,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);