diff options
author | Damien Miller <djm@mindrot.org> | 2001-07-14 03:55:15 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-07-14 03:55:15 +0200 |
commit | 98273e3adeac9aba6851bd74a662a3735fc2448b (patch) | |
tree | eb8702a0e0c338a019a734c7cb8e5d5cc40c15c6 /auth.c | |
parent | - (djm) Enable /etc/nologin check on PAM systems, as some lack the (diff) | |
download | openssh-98273e3adeac9aba6851bd74a662a3735fc2448b.tar.xz openssh-98273e3adeac9aba6851bd74a662a3735fc2448b.zip |
- (djm) Revert dirname fix, a better one is on its way.
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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, |