summaryrefslogtreecommitdiffstats
path: root/auth.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-07-14 11:55:15 +1000
committerDamien Miller <djm@mindrot.org>2001-07-14 11:55:15 +1000
commit98273e3adeac9aba6851bd74a662a3735fc2448b (patch)
treeeb8702a0e0c338a019a734c7cb8e5d5cc40c15c6 /auth.c
parentc62f1fc3ff9181894095bd505c7d54d0b5411be7 (diff)
- (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 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,