Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database backed virtual directories for pure-ftpd #1

Closed
wants to merge 4 commits into from

Conversation

draco2003
Copy link

This is the code to allow pure-ftpd to present virtual directories to the ftp client.

@feralbob
Copy link

Is there any progress on getting this integrated into master? This would be real handy for something I'm looking into.

@reikoshea
Copy link

So there was one big issue with this patch. Fasmide mentioned it, there's a buffer overrun possible in this patch (which is what causes that random client disconnect after auth).

fakechroot.c (line 253):

Current:
memcpy(curdir_virtual, dir_storage, sizeof dir_storage + (size_t) 1U);
Proposed:
memcpy(curdir_virtual, dir_storage, MAXPATHLEN);

I'm running the patch in my testing, and it's working quite well (Before I was getting the same issue as fasmide).

@yuzer
Copy link

yuzer commented Sep 17, 2014

Hi,
Any news to have this patch + reikoshea correction integrated into master branch ?
Line 253 in fakechroot.c cause a buffer overflow (*** buffer overflow detected ***: pure-ftpd (IDLE) terminated)
@reikoshea : When I change line 253 in fakechroot.c . I can login to ftp but I don't see virtual directory.
I tested to launch pure-ftpd with/without -A; -d shows no interesting information, no error.
I tested different --with parameter during configure (like --with-virtualchroot, --with-everything).
Strace shows MySQLGetVirtualDirs query and mysql log too.

@fasmide : Have you finally managed to got it working ?

Any Idea ?

@jedisct1
Copy link
Owner

Sorry, I'm not very comfortable with changes to the virtual chroot code, especially when the data comes from an SQL database.

@jedisct1 jedisct1 closed this Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants