summaryrefslogtreecommitdiffstats
path: root/auth.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-07-14 03:55:15 +0200
committerDamien Miller <djm@mindrot.org>2001-07-14 03:55:15 +0200
commit98273e3adeac9aba6851bd74a662a3735fc2448b (patch)
treeeb8702a0e0c338a019a734c7cb8e5d5cc40c15c6 /auth.c
parent - (djm) Enable /etc/nologin check on PAM systems, as some lack the (diff)
downloadopenssh-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.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/auth.c b/auth.c
index 436802342..84e0be761 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,