summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendftp.c
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Set filesystem::use-preview explicitlyAntónio Fernandes2021-01-221-0/+1
| | | | | | | It can be correctly implied from the value of filesystem::remote for many backends, but let's make it explicit for them too. Fixes https://gitlab.gnome.org/GNOME/gvfs/-/issues/497
* Use shorter strings for prompt dialog titlesJonas Dreßler2021-01-151-3/+3
| | | | | | | | | | | | | The layout of the modal dialogs in gnome-shell changed [1] and the title now is larger and uses the style of a headline. Make sure all titles remain fully visible and use shorter strings for those. Also unify the generic "Enter password" strings a bit to make work easier for translators and use this string for most cases: "Authentication Required\nEnter password for “%s”:" [1] https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343
* ftp: Prevent source file removal in case of transfer failureOndrej Holy2020-12-011-1/+1
| | | | | | When moving file from FTP to local filesystem, the remote file is removed regradless of transfer failure. This is pretty bad as it might lead to data loss. Let's delete the remote file only if the transfer suceeded.
* ftp: Close output stream properly in pull jobOndrej Holy2020-12-011-48/+8
| | | | | | The output stream is not properly closed in pull job, which might potentially lead to data loss. Let's use the recently added splice function and close the output stream with the help of G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET flag.
* trash: Do not fail when G_FILE_COPY_NO_FALLBACK_FOR_MOVE is usedwip/oholy/trash-performanceOndrej Holy2020-09-241-0/+9
| | | | | | | | | | | | | | Restoring files from the trash folder is slow in Nautilus as it attempts to do it recursively. This is because G_IO_ERROR_NOT_SUPPORTED is returned from g_file_move when G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag is used. The error is returned from client-side for pull/push operations after commit 2e765449 as in the most cases the copy-and-delete approach is really used there. But the problem is that it is not in all cases, like in the trash backend case, where the native move operation is used in fact. Let's handle the G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag directly in the backends, but not in the trash backend. Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1589
* daemon: Use "Operation not supported" consistentlyMayank Sharma2019-03-211-3/+3
| | | | | | | | | GVfs uses different forms of "Operation not supported" string, e.g. "Operation unsupported", "Operation not supported by backend". Let's use "Operation not supported" consistently as this is also used in GLib. https://gitlab.gnome.org/GNOME/gvfs/issues/170
* ftp: Add implicit TLS modeMantas Mikulėnas2018-07-301-26/+43
| | | | | | | | | | | | | | Although specs discourage it, ftps:// is generally accepted to mean "implicit" TLS on a separate port (in the same style as HTTPS); some servers still use this method and it's regaining popularity within IANA. gvfs couldn't connect to such servers, as it only implemented "explicit" TLS (STARTTLS) mode. This patch implements "implicit" TLS mode and adds the 'ftpis' URI scheme for it. https://gitlab.gnome.org/GNOME/gvfs/issues/4
* Add missing casts for g_object_refOndrej Holy2018-02-081-1/+1
| | | | | g_object_ref() currently propagates parameter type to its return value, so type casts needs to be added in order to prevent compiler warnings.
* Use Unicode in translatable stringsPiotr Drąg2016-10-031-4/+4
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772219
* daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attributeOndrej Holy2016-06-281-0/+1
| | | | | | | Mark all network-based backends as remote. This is useful to remove some hardcoded lists of filesystem types in GTK+. Bump required GLib version accordingly.
* 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.