summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2000-07-15 04:01:38 +0000
committerDamien Miller <djm@cvs.openbsd.org>2000-07-15 04:01:38 +0000
commitce61b9fbb6d793da12df5a6831d6fe9f19443bc9 (patch)
tree827b1c621586bbf851b3b72c4ec857fd5c459769 /usr.bin
parent9983b01904b6bdebf7dc0326e65924e8aabde205 (diff)
Always create ~/.ssh with mode 700; ok Markus
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/ssh-keygen.c4
-rw-r--r--usr.bin/ssh/ssh.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index 8fca7199e5e..3d5b8fb095c 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/ssh-keygen.c
@@ -7,7 +7,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.28 2000/07/07 03:55:04 todd Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.29 2000/07/15 04:01:37 djm Exp $");
#include <openssl/evp.h>
#include <openssl/pem.h>
@@ -654,7 +654,7 @@ main(int ac, char **av)
snprintf(dotsshdir, sizeof dotsshdir, "%s/%s", pw->pw_dir, SSH_USER_DIR);
if (strstr(identity_file, dotsshdir) != NULL &&
stat(dotsshdir, &st) < 0) {
- if (mkdir(dotsshdir, 0755) < 0)
+ if (mkdir(dotsshdir, 0700) < 0)
error("Could not create directory '%s'.", dotsshdir);
else if (!quiet)
printf("Created directory '%s'.\n", dotsshdir);
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 0058d5eb3b6..92b7edf0a8f 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -11,7 +11,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.56 2000/06/20 01:39:44 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.57 2000/07/15 04:01:37 djm Exp $");
#include <openssl/evp.h>
#include <openssl/dsa.h>
@@ -612,7 +612,7 @@ main(int ac, char **av)
*/
snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, SSH_USER_DIR);
if (stat(buf, &st) < 0)
- if (mkdir(buf, 0755) < 0)
+ if (mkdir(buf, 0700) < 0)
error("Could not create directory '%.200s'.", buf);
/* Check if the connection failed, and try "rsh" if appropriate. */