diff options
author | 2011-10-18 05:15:28 +0000 | |
---|---|---|
committer | 2011-10-18 05:15:28 +0000 | |
commit | a2fe9def4c7afd94e2c94d72005bd3cfec567243 (patch) | |
tree | fac48754397e8f7556c4da991d596f966806a8d3 | |
parent | new "ssh-add -k" option to load plain keys (skipping certificates); (diff) | |
download | wireguard-openbsd-a2fe9def4c7afd94e2c94d72005bd3cfec567243.tar.xz wireguard-openbsd-a2fe9def4c7afd94e2c94d72005bd3cfec567243.zip |
ssh(1): skip attempting to create ~/.ssh when -F is passed; ok markus@
-rw-r--r-- | usr.bin/ssh/ssh.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index b261601b4a9..d2f4678a01e 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.366 2011/09/23 07:45:05 markus Exp $ */ +/* $OpenBSD: ssh.c,v 1.367 2011/10/18 05:15:28 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -841,11 +841,14 @@ main(int ac, char **av) * Now that we are back to our own permissions, create ~/.ssh * directory if it doesn't already exist. */ - r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir, - strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); - if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) - if (mkdir(buf, 0700) < 0) - error("Could not create directory '%.200s'.", buf); + if (config == NULL) { + r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir, + strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); + if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) + if (mkdir(buf, 0700) < 0) + error("Could not create directory '%.200s'.", + buf); + } /* load options.identity_files */ load_public_identity_files(); |