mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-01-12 12:49:29 +00:00
- (djm) Revert dirname fix, a better one is on its way.
This commit is contained in:
parent
c62f1fc3ff
commit
98273e3ade
@ -2,6 +2,7 @@
|
||||
- (djm) Enable /etc/nologin check on PAM systems, as some lack the
|
||||
pam_nologin module. Report from William Yodlowsky
|
||||
<bsd@openbsd.rutgers.edu>
|
||||
- (djm) Revert dirname fix, a better one is on its way.
|
||||
|
||||
20010711
|
||||
- (djm) dirname(3) may modify its argument on glibc and other systems.
|
||||
@ -5977,4 +5978,4 @@
|
||||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.1385 2001/07/14 01:54:05 djm Exp $
|
||||
$Id: ChangeLog,v 1.1386 2001/07/14 01:55:15 djm Exp $
|
||||
|
6
auth.c
6
auth.c
@ -368,11 +368,7 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
|
||||
char *cp;
|
||||
struct stat st;
|
||||
|
||||
strlcpy(homedir, pw->pw_dir, sizeof(homedir));
|
||||
if ((cp = dirname(homedir)) == NULL)
|
||||
strlcpy(homedir, "/", sizeof(homedir));
|
||||
else
|
||||
memmove(homedir, cp, strlen(cp));
|
||||
strlcpy(homedir, dirname(pw->pw_dir), sizeof(homedir));
|
||||
|
||||
if (realpath(file, buf) == NULL) {
|
||||
snprintf(err, errlen, "realpath %s failed: %s", file,
|
||||
|
Loading…
Reference in New Issue
Block a user