summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
120111104
2 - (dtucker) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2011/10/18 05:15:28
4 [ssh.c]
5 ssh(1): skip attempting to create ~/.ssh when -F is passed; ok markus@
6
120111025 720111025
2 - (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file 8 - (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file
3 fails. Patch from Corinna Vinschen. 9 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 @@
1/* $OpenBSD: ssh.c,v 1.366 2011/09/23 07:45:05 markus Exp $ */ 1/* $OpenBSD: ssh.c,v 1.367 2011/10/18 05:15:28 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -886,17 +886,20 @@ main(int ac, char **av)
886 * Now that we are back to our own permissions, create ~/.ssh 886 * Now that we are back to our own permissions, create ~/.ssh
887 * directory if it doesn't already exist. 887 * directory if it doesn't already exist.
888 */ 888 */
889 r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir, 889 if (config == NULL) {
890 strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); 890 r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir,
891 if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) { 891 strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
892 if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) {
892#ifdef WITH_SELINUX 893#ifdef WITH_SELINUX
893 ssh_selinux_setfscreatecon(buf); 894 ssh_selinux_setfscreatecon(buf);
894#endif 895#endif
895 if (mkdir(buf, 0700) < 0) 896 if (mkdir(buf, 0700) < 0)
896 error("Could not create directory '%.200s'.", buf); 897 error("Could not create directory '%.200s'.",
898 buf);
897#ifdef WITH_SELINUX 899#ifdef WITH_SELINUX
898 ssh_selinux_setfscreatecon(NULL); 900 ssh_selinux_setfscreatecon(NULL);
899#endif 901#endif
902 }
900 } 903 }
901 /* load options.identity_files */ 904 /* load options.identity_files */
902 load_public_identity_files(); 905 load_public_identity_files();