]> andersk Git - openssh.git/commitdiff
- (djm) Revert dirname fix, a better one is on its way.
authordjm <djm>
Sat, 14 Jul 2001 01:55:15 +0000 (01:55 +0000)
committerdjm <djm>
Sat, 14 Jul 2001 01:55:15 +0000 (01:55 +0000)
ChangeLog
auth.c

index 9c60f290fff2a8b90e112466ff0d2cb1ead00212..e477fc9f7ebfccbf58bd1d875512ea3377300ded 100644 (file)
--- 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. 
diff --git a/auth.c b/auth.c
index 436802342372f9826507d7ca3d7390612c1cf2c9..84e0be76152647435eabea5c04a643cb46afe6ad 100644 (file)
--- 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,
This page took 0.071604 seconds and 5 git commands to generate.