summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendftp.c
Commit message (Collapse)AuthorAgeFilesLines
* ftp: Invalidate dir cache on write closeOndrej Holy2016-02-091-1/+18
| | | | | | | | | | Wrong file size is cached if query_info is executed during write operation, because dir cache is invalidated on open_for_write. Wrong file size might cause that e.g. POSIX editors fails to read file content over fuse daemon. Invalidate the cache also on close_write to fix this issue. https://bugzilla.gnome.org/show_bug.cgi?id=760159
* Unify strings to ease translationFelix Möller2015-08-051-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=657906
* Set filesystem::type for all backendsRoss Lagerwall2015-08-041-0/+13
| | | | | | | This attribute was being set inconsistently, and is used by the file chooser. https://bugzilla.gnome.org/show_bug.cgi?id=752834
* ftp: Implement TLS supportRoss Lagerwall2015-04-091-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement TLS support (aka explicit ftps). This is done by using a different URL scheme, ftps, so that it is only used if explicitly specified. Although the protocol allows transparently upgrading a normal connection to a secure one, there are several problems with this. FEAT is needed to determine support for it but some servers do not allow this before login. Some servers are configured to allow AUTH TLS but have firewalls that block data connections because they can't inspect the traffic. Servers may disallow TLS on the data connection, making it unclear to the user how secure the connection is. Finally, there may be verification errors which need to be presented to the user, and these are unexpected because they did not choose to use ftps. Making secure ftp opt-in as a separate URL scheme side-steps most of these issues as well as ensuring there are no regressions for normal ftp. When using ftps, we assume that the server implements AUTH TLS so the connection is secured before login. It is also assumed that TLS for data connections is allowed, so both control and data connection are secure before any information is transferred. Verification errors are presented during mounting. If the identity changes on subsequent reconnections, the connection is aborted. While presenting verification errors to the user in this way is perhaps not the best way of handling security, it is fairly standard. The implementation has been successfully tested on vsftpd, ProFTPD, Pure-FTPd, IIS, and FileZilla Server. Based on a patch by Benjamin Otte. https://bugzilla.gnome.org/show_bug.cgi?id=526582
* ftp: Implement backups for replaceRoss Lagerwall2015-02-111-9/+55
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=621917
* ftp: Implement G_FILE_COPY_NOFOLLOW_SYMLINKSRoss Lagerwall2015-02-031-0/+25
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=660077
* ftp: try copy and delete fallback if backup couldn't be createdOndrej Holy2014-11-191-4/+18
| | | | | | | | | | Move operation fails immediately with G_IO_ERROR_CANT_CREATE_BACKUP if G_FILE_COPY_BACKUP is specified. Consequently copy and delete fallback isn't executed. Return NOT_SUPPORTED instead of CANT_CREATE_BACKUP to proceed with the fallback if G_FILE_COPY_NO_FALLBACK_FOR_MOVE isn't specified. https://bugzilla.gnome.org/show_bug.cgi?id=740057
* ftp: Only send permission bits for SITE CHMODRoss Lagerwall2014-07-171-1/+4
| | | | | | | Some ftp servers give an error if more bits than just the permission bits are sent for SITE CHMOD so only send the permission bits. https://bugzilla.gnome.org/show_bug.cgi?id=733281
* ftp: clear queue when mount failsOndrej Holy2014-04-161-2/+4
|
* ftp: Remove custom progress callback rate limitingRoss Lagerwall2014-01-231-85/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=719807
* ftp: Return the correct error code for a failed move operationRoss Lagerwall2013-11-011-3/+11
| | | | | | | | When the source file does not exist for a move operation, return G_IO_ERROR_NOT_FOUND (as specified by the docs) instead of G_IO_ERROR_FAILED. https://bugzilla.gnome.org/show_bug.cgi?id=710321
* Use g_list_free_full() where applicableTomas Bzatek2013-01-171-2/+1
|
* Don't include jargon in mount display names and messagesWilliam Jon McCann2012-08-301-4/+4
| | | | | | | | | | | | | The backend protocol isn't necessary in the display name for a location. And having it there makes it much harder to actually find the user interesting part of the name. Once a mount is connected the user interesting part of the name is "what it is" and not "how it is accessed". This is possible now that we aren't using the display name to make a unique mount point. https://bugzilla.gnome.org/show_bug.cgi?id=682878
* Add symbolics support to the backendsWilliam Jon McCann2012-08-301-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=681458
* Update the Address of the FSFFelix Möller2012-07-301-2/+2
| | | | | | | | | | | | | | | Updating the address of the FSF. This has been done by: while read file; do sed -i 's:59 Temple Place:51 Franklin Street:' $file sed -i 's:Suite 330:Fifth Floor:' $file sed -i 's:02111-1307:02110-1301:' $file done https://bugzilla.gnome.org/show_bug.cgi?id=656598 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* Explicitly intialize mutexes on stackTomas Bzatek2011-11-141-0/+2
| | | | | | Turned out zeroing memory is not enough in some cases so let's be on the safe side and properly initialize all non-static mutexes. Also, don't initialize/clear the static ones.
* Adapt to glib mutex API changesTomas Bzatek2011-10-251-7/+5
| | | | A continuation to https://bugzilla.gnome.org/show_bug.cgi?id=661148
* ftp: Fix return value of try_get_settable_attributes() on failureChris Wulff2011-08-291-1/+1
| | | | | | This fixes a crash on failed try_get_settable_attributes() call. https://bugzilla.gnome.org/show_bug.cgi?id=651729
* Always write (S)FTP in capitals.Friedel Wolff2011-08-241-4/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=629116
* ftp: Handle NULL progress_callback casesTomas Bzatek2011-08-151-2/+4
| | | | | Just be precautious as we already test for this on other places. Found by Coverity Scan analysis
* ftp: Fix stupid proxy servers disconnecting on FEATBenjamin Otte2011-06-141-2/+9
| | | | | | | | A bunch of proxy servers assume that the first command sent by an FTP server is USER and if it isn't, they bomb out. We do want to support FEAT-before-USER though so we can do secure FTP (if we ever actually implement it). So we need to make sure we try it at least once and if it fails, we open a new connection and try with USER instead.
* ftp: Implement chmodLawrence Rust2011-01-241-0/+91
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=416221
* ftp: Parse SITE HELP output to detect chmod supportBenjamin Otte2011-01-231-0/+56
| | | | | | | Support for it will come in later patches. The patch also detects chgrp support, but we're not intending to use it yet.
* ftp: Detect TLS and SSL supportBenjamin Otte2010-12-081-0/+2
|
* ftp: Fix refcounting of addresses when connectingBenjamin Otte2010-12-081-0/+2
| | | | | | In error cases, we would get the refcounting wrong, which would lead to a warning when finalizing the backend, because we carried around an invalid pointer to an unreffed address for the whole time.
* ftp: Parse PWD reply according to RFCBenjamin Otte2010-04-081-19/+55
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=614401
* ftp: Add missing \n to debug messageBenjamin Otte2010-04-081-1/+1
|
* ftp: GVfsJobPull: perform any cache lookups before opening data connectionTomas Bzatek2010-02-191-10/+10
| | | | | | | | | After the delete op, cache was invalidated and an attempt was made to retrieve file size in do_pull() while data connection was already opened. This patch only moves all necessary operations before setting up actual data stream for download. Fixes bug 610395
* Handle the case where gnome-keyring has no password or no usernameBenjamin Otte2009-12-201-1/+7
| | | | Just ignore the keyring then.
* [FTP] implement default location supportBenjamin Otte2009-12-031-0/+53
| | | | | https://bugzilla.gnome.org/show_bug.cgi?id=560357 https://bugzilla.gnome.org/show_bug.cgi?id=561998
* Ensure timer_cancel is initializedAlexander Larsson2009-12-011-0/+3
| | | | Otherwise it may be used uninitialized if progress_callback is NULL
* Use FAILED_HANDLED error code when user abortsBenjamin Otte2009-10-121-1/+2
| | | | | | | | This allows Nautilus to check for FAILED_HANDLED and not displaying an error dialog to the user. Users don't like error dialogs thatdo nothing but tell them what they just did. Partial fix for https://bugzilla.gnome.org/show_bug.cgi?id=594495
* [FTP] Fix memleakBenjamin Otte2009-08-191-1/+1
|
* [FTP] plug memleak in query_infoBenjamin Otte2009-08-191-0/+1
|
* [FTP] plug memleak in login codeBenjamin Otte2009-08-191-9/+9
|
* [FTP] Properly close output stream in GVfsJobPullTomas Bzatek2009-08-101-1/+2
| | | | Don't leak output filedescriptor
* [FTP] Correctly close finished transferTomas Bzatek2009-08-101-0/+2
| | | | Re-add from commit 9c80d1ea68314ccd3b44d3a6c3761b1e42699953
* [FTP] Remove unecessary function callBenjamin Otte2009-08-101-1/+0
| | | | The matcher is ignored in g_file_info_copy_into().
* [FTP] Don't add random bytes whenever we send a progress notificationBenjamin Otte2009-08-101-2/+4
| | | | | | | | The code previously did update the write counters after being interrupted for progress updates. That would cause it to insert a random byte for every time it sent a progress update from the write loop. Noticed by Tomas Bzatek - sorry about your mp3s :(
* [FTP] Bug 590793 - Can't copy folders over FTPBenjamin Otte2009-08-061-6/+70
| | | | | Duplicate the machinery for returning the proper error when the source is a directory from gio and use it in the pull vfunc.
* [FTP] Do not lose info in cacheBenjamin Otte2009-08-061-3/+13
| | | | | As gvfs_job_enumerate_add_info() modifies the passed info, we cannot pass the cached items directly. So we do a copy instead.
* [FTP] Open source before target in pull methodBenjamin Otte2009-08-061-26/+27
| | | | | | | This way, we don't leave empty target files when opening the source resulted in an error. Also included is some code clarification.
* Bug 587484 – Interaction when unmounting mounts and misc fixesDavid Zeuthen2009-07-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Port everything to use _with_operation() variants of unmount/eject methods - Add support for g_file_poll_mountable() - new job class: GVfsJobPollMountable - Pass mount operation for unmount/eject ops on GDaemonFile and GDaemonMount - receive in the appropriate GVfsJob classes - also pass unmount flags where it was missing - port all backends to use this - Teach GMountSource and GMountOperationDBus about the new GMountOperation::show-processes signal - also provide new API - g_mount_source_is_dummy() - e.g. when the client didn't passed NULL for the GMountOperation - g_mount_source_abort() - to send the ::abort signal to the client-side GMountOperation - make the client-side of GMountSource return ::reply with NOT_HANDLED when we do an abort - Refactor the mount operation handling in GProxyVolumeMonitor - Pass mount operation for unmount/ejects in GProxyVolumeMonitor - Pass the process id of the actual reader/writer in OpenForRead and OpenForWrite daemon methods - add some private API for making the FUSE client set the pid of the POSIX client (otherwise it looks like the FUSE client is blocking) and pass the right pid. This is because the FUSE client is basically impersonating the POSIX processes. - Make the process id mentioned above available in appropriate GVfsJob classes - GVfsJobOpenForRead - GVfsJobOpenForWrite - GVfsChannel - Provide API to get a list of all blocking clients, e.g. an array of GPid - g_vfs_daemon_get_blocking_processes() - Provide convenience API to easily doing the right thing on unmount; e.g. interact with the user about blocking processes - see the gphoto2 backend for example usage - g_vfs_backend_has_blocking_processes() - g_vfs_backend_unmount_with_operation() and g_vfs_backend_unmount_with_operation_finish() - Only the gphoto2 backend supports ::show-processes right now. Support for other backends will be added shortly. - Implement support for ::show-processes in the GDU volume monitor - right now we don't support "Unmount Anyway" since it requires ABI changes in libgdu.so - this will be changed as soon as there's a new gnome-disk-utility release
* [FTP] use the EPRT feature response for EPRT support, not EPSVBenjamin Otte2009-06-171-0/+1
|
* [FTP] prepare the code for active FTP supportBenjamin Otte2009-06-151-3/+8
| | | | | | adds a bunch of new APIs necessary for supporting active FTP. These APIs don't do anything yet, as active FTP is still unsupported, it's just refactoring of code.
* [FTP] rework data connection codeBenjamin Otte2009-06-121-0/+19
| | | | | | | | | | | | | | The new code doesn't rely on funny workaround flags anymore and also doesn't set workaround flags unconditionally after any failure. It now works like this: 1) if a default method exists, try the default method. 2) if the default method failed, try all methods in order until one succeeds. 3) if any method succeeded, make it the new default method. This way, we take the proper method by default, and have a proper fallback mechanism for flaky connections/servers that sometimes fail to connect properly. Also, it's much easier to add new methods (like active FTP) later.
* [FTP] get rid of connection read/write functionsBenjamin Otte2009-06-111-10/+15
| | | | | use get_data_stream() instead and call read/write on that manually. Reduces the number of API.
* [FTP] simplify debug id APIBenjamin Otte2009-06-111-1/+1
| | | | Add a separate function for requesting the debug id
* [FTP] improve error handling for opening filesBenjamin Otte2009-06-111-3/+9
| | | | | permission handler now sets EPERM when file exists and ENOENT when it doesn't.
* [FTP] Bug 522208 - display not available error when ...Benjamin Otte2009-06-111-1/+23
| | | | | Try to return EPERM when there's a permission problem instead of returning the default error code "Operation failed".