summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-08-15 23:19:21 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-08-15 23:19:21 +0000
commit930b14a28e78be2884b87c8b4503f3df04de5316 (patch)
treed6e3caf66ee73fe6176fc6d0fa88797ec7e44f8a /ssh.c
parent049e0dd6cffbf6b5bffe0e2901957e87caccc869 (diff)
- jakob@cvs.openbsd.org 2001/08/11 22:51:27
[ssh.c tildexpand.c] fix more paths beginning with "//"; <bradshaw@staff.crosswalk.com>. ok markus@
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);