зеркало из https://github.com/Azure/sonic-openssh.git
- jakob@cvs.openbsd.org 2001/08/11 22:51:27
[ssh.c tildexpand.c] fix more paths beginning with "//"; <bradshaw@staff.crosswalk.com>. ok markus@
This commit is contained in:
Родитель
049e0dd6cf
Коммит
930b14a28e
|
@ -16,6 +16,10 @@
|
||||||
- markus@cvs.openbsd.org 2001/08/08 21:34:19
|
- markus@cvs.openbsd.org 2001/08/08 21:34:19
|
||||||
[uidswap.c]
|
[uidswap.c]
|
||||||
undo last change; does not work for sshd
|
undo last change; does not work for sshd
|
||||||
|
- jakob@cvs.openbsd.org 2001/08/11 22:51:27
|
||||||
|
[ssh.c tildexpand.c]
|
||||||
|
fix more paths beginning with "//"; <bradshaw@staff.crosswalk.com>.
|
||||||
|
ok markus@
|
||||||
|
|
||||||
20010814
|
20010814
|
||||||
- (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup
|
- (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup
|
||||||
|
@ -6305,4 +6309,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1479 2001/08/15 23:17:22 mouring Exp $
|
$Id: ChangeLog,v 1.1480 2001/08/15 23:19:21 mouring Exp $
|
||||||
|
|
4
ssh.c
4
ssh.c
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: ssh.c,v 1.137 2001/08/02 16:14:05 jakob Exp $");
|
RCSID("$OpenBSD: ssh.c,v 1.138 2001/08/11 22:51:27 jakob Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
@ -709,7 +709,7 @@ again:
|
||||||
* Now that we are back to our own permissions, create ~/.ssh
|
* Now that we are back to our own permissions, create ~/.ssh
|
||||||
* directory if it doesn\'t already exist.
|
* directory if it doesn\'t already exist.
|
||||||
*/
|
*/
|
||||||
snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_DIR);
|
snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
|
||||||
if (stat(buf, &st) < 0)
|
if (stat(buf, &st) < 0)
|
||||||
if (mkdir(buf, 0700) < 0)
|
if (mkdir(buf, 0700) < 0)
|
||||||
error("Could not create directory '%.200s'.", buf);
|
error("Could not create directory '%.200s'.", buf);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: tildexpand.c,v 1.11 2001/02/08 19:30:53 itojun Exp $");
|
RCSID("$OpenBSD: tildexpand.c,v 1.12 2001/08/11 22:51:27 jakob Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -67,6 +67,6 @@ tilde_expand_filename(const char *filename, uid_t my_uid)
|
||||||
if (len > MAXPATHLEN)
|
if (len > MAXPATHLEN)
|
||||||
fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1);
|
fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1);
|
||||||
expanded = xmalloc(len);
|
expanded = xmalloc(len);
|
||||||
snprintf(expanded, len, "%s/%s", pw->pw_dir, cp + 1);
|
snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", cp + 1);
|
||||||
return expanded;
|
return expanded;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче