diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh.c | 4 | ||||
-rw-r--r-- | tildexpand.c | 4 |
3 files changed, 9 insertions, 5 deletions
@@ -16,6 +16,10 @@ | |||
16 | - markus@cvs.openbsd.org 2001/08/08 21:34:19 | 16 | - markus@cvs.openbsd.org 2001/08/08 21:34:19 |
17 | [uidswap.c] | 17 | [uidswap.c] |
18 | undo last change; does not work for sshd | 18 | undo last change; does not work for sshd |
19 | - jakob@cvs.openbsd.org 2001/08/11 22:51:27 | ||
20 | [ssh.c tildexpand.c] | ||
21 | fix more paths beginning with "//"; <bradshaw@staff.crosswalk.com>. | ||
22 | ok markus@ | ||
19 | 23 | ||
20 | 20010814 | 24 | 20010814 |
21 | - (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup | 25 | - (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup |
@@ -6305,4 +6309,4 @@ | |||
6305 | - Wrote replacements for strlcpy and mkdtemp | 6309 | - Wrote replacements for strlcpy and mkdtemp |
6306 | - Released 1.0pre1 | 6310 | - Released 1.0pre1 |
6307 | 6311 | ||
6308 | $Id: ChangeLog,v 1.1479 2001/08/15 23:17:22 mouring Exp $ | 6312 | $Id: ChangeLog,v 1.1480 2001/08/15 23:19:21 mouring Exp $ |
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.137 2001/08/02 16:14:05 jakob Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.138 2001/08/11 22:51:27 jakob Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -709,7 +709,7 @@ again: | |||
709 | * Now that we are back to our own permissions, create ~/.ssh | 709 | * Now that we are back to our own permissions, create ~/.ssh |
710 | * directory if it doesn\'t already exist. | 710 | * directory if it doesn\'t already exist. |
711 | */ | 711 | */ |
712 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_DIR); | 712 | snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); |
713 | if (stat(buf, &st) < 0) | 713 | if (stat(buf, &st) < 0) |
714 | if (mkdir(buf, 0700) < 0) | 714 | if (mkdir(buf, 0700) < 0) |
715 | error("Could not create directory '%.200s'.", buf); | 715 | error("Could not create directory '%.200s'.", buf); |
diff --git a/tildexpand.c b/tildexpand.c index 46bdaae87..e89a7ade8 100644 --- a/tildexpand.c +++ b/tildexpand.c | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include "includes.h" | 13 | #include "includes.h" |
14 | RCSID("$OpenBSD: tildexpand.c,v 1.11 2001/02/08 19:30:53 itojun Exp $"); | 14 | RCSID("$OpenBSD: tildexpand.c,v 1.12 2001/08/11 22:51:27 jakob Exp $"); |
15 | 15 | ||
16 | #include "xmalloc.h" | 16 | #include "xmalloc.h" |
17 | #include "log.h" | 17 | #include "log.h" |
@@ -67,6 +67,6 @@ tilde_expand_filename(const char *filename, uid_t my_uid) | |||
67 | if (len > MAXPATHLEN) | 67 | if (len > MAXPATHLEN) |
68 | fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1); | 68 | fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1); |
69 | expanded = xmalloc(len); | 69 | expanded = xmalloc(len); |
70 | snprintf(expanded, len, "%s/%s", pw->pw_dir, cp + 1); | 70 | snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", cp + 1); |
71 | return expanded; | 71 | return expanded; |
72 | } | 72 | } |