Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mod_vroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ static int vroot_lchown(pr_fs_t *fs, const char *path, uid_t uid, gid_t gid) {
#endif /* ProFTPD 1.3.4c or later */

static int vroot_chroot(pr_fs_t *fs, const char *path) {
char *chroot_path = "/", *tmp = NULL;
char *chroot_path = vroot_base, *tmp = NULL;
config_rec *c;

if (!path ||
Expand Down Expand Up @@ -962,7 +962,9 @@ static int vroot_chroot(pr_fs_t *fs, const char *path) {
return -1;
}

session.chroot_path = pstrdup(session.pool, chroot_path);
if (chroot_path && chroot_path[0])
session.chroot_path = pstrdup(session.pool, chroot_path);

return 0;
}

Expand Down