diff options
author | Darren Tucker <dtucker@zip.com.au> | 2011-11-04 10:50:40 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2011-11-04 10:50:40 +1100 |
commit | 45c66d7ad4a06ffe85014c6522eebcede042e87f (patch) | |
tree | a223009e8f0d439e630d1758179e0b038c4878c0 | |
parent | 9f157abbb64a252a8751bc78b8acb2857447225e (diff) |
- 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-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh.c | 19 |
2 files changed, 17 insertions, 8 deletions
@@ -1,3 +1,9 @@ | |||
1 | 20111104 | ||
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 | |||
1 | 20111025 | 7 | 20111025 |
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. |
@@ -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(); |