summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--auth.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ce9cf665..965af424 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 $
diff --git a/auth.c b/auth.c
index 43680234..84e0be76 100644
--- a/auth.c
+++ b/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,