summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2011-11-04 00:50:40 +0100
committerDarren Tucker <dtucker@zip.com.au>2011-11-04 00:50:40 +0100
commit45c66d7ad4a06ffe85014c6522eebcede042e87f (patch)
treea223009e8f0d439e630d1758179e0b038c4878c0
parent - (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file (diff)
downloadopenssh-45c66d7ad4a06ffe85014c6522eebcede042e87f.tar.xz
openssh-45c66d7ad4a06ffe85014c6522eebcede042e87f.zip
- djm@cvs.openbsd.org 2011/10/18 05:15:28
[ssh.c] ssh(1): skip attempting to create ~/.ssh when -F is passed; ok markus@
-rw-r--r--ChangeLog6
-rw-r--r--ssh.c19
2 files changed, 17 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d7d44666..3e93ed2f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20111104
+ - (dtucker) OpenBSD CVS Sync
+ - djm@cvs.openbsd.org 2011/10/18 05:15:28
+ [ssh.c]
+ ssh(1): skip attempting to create ~/.ssh when -F is passed; ok markus@
+
20111025
- (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file
fails. Patch from Corinna Vinschen.
diff --git a/ssh.c b/ssh.c
index 9cee95969..8cf84c8be 100644
--- a/ssh.c
+++ b/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
@@ -886,17 +886,20 @@ 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 (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) {
#ifdef WITH_SELINUX
- ssh_selinux_setfscreatecon(buf);
+ ssh_selinux_setfscreatecon(buf);
#endif
- if (mkdir(buf, 0700) < 0)
- error("Could not create directory '%.200s'.", buf);
+ if (mkdir(buf, 0700) < 0)
+ error("Could not create directory '%.200s'.",
+ buf);
#ifdef WITH_SELINUX
- ssh_selinux_setfscreatecon(NULL);
+ ssh_selinux_setfscreatecon(NULL);
#endif
+ }
}
/* load options.identity_files */
load_public_identity_files();