aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
AgeCommit message (Collapse)Author
2019-11-03Remedy gcc 7.4.0 warnings (#187)kalvdans
* Use logical not for booleans Fixes a gcc 7.4.0 complaint: sshfs.c:1743:28: warning: ‘~’ on a boolean expression [-Wbool-operation] sshfs.c:1743:28: note: did you mean to use logical not? * strdup argument to keep it alive after function return Fixes gcc 7.4.0 complaint: sshfs.c: In function ‘sshfs_opt_proc’: sshfs.c:3488:50: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
2019-10-19Added direct_io option (#173)sunwire
2019-10-19Free addrinfo and close socket when returning error (#186)kalvdans
2019-09-12sshfs: fix another instance preventing use of global I/O size on macOS (#185)Viktor Szakats
Following-up on [1], there was another instance where blksize was set to a non-zero value, thus making it impossible to configure global I/O size on macOS, and using [2] the hard-wired value of 4096 bytes instead, resulting in uniformly poor performance [3]. With this patch, setting I/O size to a reasonable large value, will result in much improved performance, e.g.: -o iosize=1048576 [1] https://github.com/osxfuse/sshfs/commit/5c0dbfe3eb40100f9277e863926f2e7d7c9a5a4c [2] https://github.com/libfuse/sshfs/blob/4c21d696e9d46bebae0a936e2aec72326c5954ea/sshfs.c#L812 [3] https://github.com/libfuse/sshfs/issues/11#issuecomment-339407557
2019-06-30Include poll.h instead of sys/poll.h (#178)Michael Forney
The standard header for the poll(3) interface is poll.h[0]. This prevents a warning when building with musl libc: In file included from sshfs.c:44: /usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^~~~~~~ [0] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html
2019-06-30Add --verbose optionGalen Getsov
2019-04-08Gracefully handle multiple spaces in ssh_command option (#169)mssalvatore
When using the "ssh_command" option, commands with multiple spaces in a row will not be properly parsed. Example: Properly parsed: ssh_command = "ssh -o IdentityFile=~/.ssh/id_rsa" Improperly parsed: ssh_command = "ssh -o IdentityFile=~/.ssh/id_rsa" This commit changes the ssh_command parsing logic so that both of the above examples are considered valid and properly handled. Fixes: #114.
2019-03-31allow /dev/fd/N as a mountpoint (#166)DrDaveD
2019-02-25Update clean_req() to match the definition of GHRFunc (#160)mssalvatore
The current definition of the clean_req() function produces a compiler warning as it expects 2 parameters but GHRFunc expects 3. This commit resolves issue #157.
2019-01-04Also remap GID under non-MacOSClayton G. Hobbs
The manpage says that -o idmap=user maps the UID and GID, but it apparently only mapped the UID. The code was in place to map the GID as well, but it was hidden behind #ifdef __APPLE__. This commit removes those #ifdefs, and in a couple of cases the code inside an #else, to make the option behave as documented.
2018-12-22Added "BindInterface" as valid "-o" option.S. D. Cloudt
2018-08-01Port SSHFS to CygwinBill Zissimopoulos
2018-07-25Fix error return value from rename()Quentin Rameau
Fuse operations expect negated errno values.
2018-06-20Correct workaround condition for not using handle in sshfs_getattr (#127)Rian Hunter
In libfuse<3, when `fstat_workaround` was true, that meant to always use the `path` argument to resolve fgetattr instead of the supplied handle. Before this change, the logic was interpreting `fstat_workaround` to not use the `path` argument when it was true. This change reverts to the libfuse<3 behavior.
2018-06-18Make utimens(NULL) work correctlyDaniel Lublin
2018-06-09Add workaround to always pass a 0 mode when creating a file (#128)Josh Triplett
Add workaround to always pass a 0 mode when creating a file This works around servers that produce an error for any non-zero mode.
2018-03-28New workaround renamexdev to enable moving files across remote filesystemsG.raud Meyer
sshfs.rst: update the documentation.
2017-10-15Fix memory leak on opendir errorTimo Savola
2017-09-26Ignore fstab-specific mount optionsNikolaus Rath
Fixes: #96.
2017-09-20Dropped support for writeback cachingNikolaus Rath
As of kernel 4.14, the FUSE module's + writeback implementation is not compatible with network filesystems, and there are no imminent plans to change that. For more details, see https://marc.info/?l=fuse-devel&m=150592103107662&w=2 or As a consequence, the -o unreliable_append option has become obsolete as well. Fixes: #93 Fixes: #88 Fixes: #81
2017-08-06Re-enabled writeback cache.Nikolaus Rath
Fixes: #72.
2017-08-06Support O_APPEND.Nikolaus Rath
Fixes: #76.
2017-08-06Actually disable writeback cache, instead of just claiming to do so.Nikolaus Rath
2017-08-04Disable writeback cache for nowNikolaus Rath
Writeback cache seems to cause dataloss in some situations. We need to investigate this first. See https://github.com/libfuse/sshfs/issues/72.
2017-08-04Removed unused variable.Nikolaus Rath
2017-08-03Don't check st_mode of mountpointNikolaus Rath
It is not clear what this check is supposed to achieve, and it seems to fail in some situations (cf issue #57). Fixes: #57.
2017-08-03Accept -o cache_* options for backward compatibility.Nikolaus Rath
Fixes: #73.
2017-07-13Fall back to global I/O size on macOSBenjamin Fleischer
The st_blksize value of struct stat represents the optimal block size for file I/O operations. FUSE for macOS will use this value when preforming read or write operations on the file. The smaller st_blksize is the more context switches are required to complete the operation. Setting st_blksize to 0 results in FUSE for macOS falling back to the global I/O size, that can be specified through the "-o iosize=..." mount-time option. Fixes osxfuse/osxfuse#389 and osxfuse/sshfs#33
2017-07-13Don't require mount point to exists on macOSBenjamin Fleischer
By default volumes are mounted under /Volumes on macOS. Since macOS 10.12 the /Volumes directory is root-owned. In order to allow non- privileged users to mount FUSE volumes under /Volumes FUSE will create non-existent mount points automatically. Fixes osxfuse/sshfs#27
2017-07-12sshfs_open_commin(): fix compiler warningNikolaus Rath
wrctr cannot be used without having been initialized, but the compiler is too dumb to see that.
2017-07-12sftp_readdir_async(): don't access request when it may have been freedNikolaus Rath
Fixes: #7
2017-07-08Switch to libfuse 3.1.0Nikolaus Rath
libfuse 3.0.0 is rather new and not widely used yet, so requiring libfuse 3.1.0 right away shouldn't be a problem.
2017-07-08Switch to libfuse 3.0.Nikolaus Rath
2017-07-08Re-enabled cache support.Nikolaus Rath
2017-06-22Split readdir() into opendir(), readdir() and releasedir()Nikolaus Rath
This re-enables support for nullpath_ok. The cache remains disabled.
2017-06-22Transition from getdir() to readdir(), temporarily disable cacheNikolaus Rath
This commit enables the use of readdir() instead of getdir(). It also completely disables the cache and the nullpath_ok feature. This will be fixed in the next commits.
2017-06-07Fixed compiler warningsNikolaus Rath
2017-06-07Dropped support for libfuse < 2.9Nikolaus Rath
This is in preparation for the move to libfuse 3.0
2017-06-06Remove support for "all" workaroundsNikolaus Rath
This should never be used. We may add new workarounds in the future, and they should only be enabled explicitly when needed.
2017-06-06Add fstat workaround to help output.Nikolaus Rath
2017-06-06Dropped nodelaysrv workaroundNikolaus Rath
The same effect (enabling NODELAY on the server side *and* enabling X11 forwarding) can be achieved by explicitly passing `-o ForwardX11`
2017-06-06Don't call g_thread_init()Nikolaus Rath
No longer required since glib 2.32.
2017-06-06Fixed compiler warningNikolaus Rath
2017-06-06Dropped nodelay workaroundNikolaus Rath
This was a performance improvement for SSH versions prior to 4.4. There is no reason to continue to support this.
2017-06-05main(): setup signal handlers before connectingNikolaus Rath
Otherwise, aborting the password prompt with Ctrl+C will also kill the sshfs process and leave the mountpoint inaccessible. Fixes: #9.
2017-05-31Update the missing options (that make sense from ssh_config)Jakub Jelen
2017-01-12Merge pull request #23 from billziss-gh/masterNikolaus Rath
Port SSHFS to Cygwin
2016-07-28Remove call to g_slice_set_config()Benjamin Fleischer
It is unclear why G_SLICE_CONFIG_ALWAYS_MALLOC has been set before but doing so with the latest version of GLib (2.46.2) results in the following warning: GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed This fixes issue osxfuse/sshfs#17
2016-06-22port sshfs to cygwinBill Zissimopoulos
2016-06-06Require paths for truncate/fstat workaroundsRian Hunter
Commit 74bfa3850a2568f96dd1d090a9386534c9bb4629 allowed sshfs to run without requiring a non-NULL path argument for certain operations. This was erroneous in the case of using certain workarounds.