Commit Graph

437 Commits

Author SHA1 Message Date
Nikolaus Rath e812e29d39 Merge pull request #5 from jmmv/merge-osxfuse
Merge osxfuse.
2016-02-10 19:53:49 -08:00
Julio Merino 80db43d7dc Improve the sshnodelay hack after osxfuse's merge
Document the strage-looking symbol interposition that is necessary for the
OS X case.

While doing this, homogenize the code to do the real connect call for both
the Linux and OS X cases into a helper function.  This logic is generic
and should not be replicated into various OS-specific cases.
2016-02-08 21:40:30 -05:00
Julio Merino 27e7029148 Unconditionally mlock the password in memory
Revision b4023a19 added an mlock call to ensure the sshfs password is kept
in memory, but did so only for OS X.  This is a good idea in general, so
let's remove the condition.
2016-02-08 21:26:53 -05:00
Julio Merino 30e90ae080 Remove apparently-unnecessary lock
Revision b4023a19dd, which imported the
MacFUSE-specific sshfs fixes into osxfuse-sshfs, added a lock to handle
the refs reference counter of the sshfs_file structure.  However, this
lock was only added for OS X, which is a very strange thing to do.

One may think that this was only because MacFUSE 2.2 had some semantics
that differed from regular FUSE, and that would have been quite stupid
for compatibility reasons.  A few simple tests show no issues after
removing this lock, so let's keep it out for now.  If things break, we
know what to look at.
2016-02-08 21:20:21 -05:00
Julio Merino 9b4ca1aade Avoid using cpp for sshfs.1 generation
Move the logic to determine which values to stick into the manual page
to the configure script and replace the logic to build the sshfs.1
manual page with sed instead of abusing cpp.

I'm not using AC_OUTPUT here because this macro is typically used to
generate support build files.  Final artifacts of the build should, in
general, be built by the Makefile itself.
2016-02-08 21:10:48 -05:00
Julio Merino a03d3eab39 Fix path to compat in -I flag
When defining a -I flag to point into the source directory, we should
prefix the directory with ${srcdir} so that it can be found when the
build is configured to use a build directory that differs from the
source directory.

This fixes "make distcheck".
2016-02-08 20:50:23 -05:00
Julio Merino 665bb97ef6 Document merge of osxfuse's sshfs 2016-02-08 20:50:23 -05:00
Julio Merino b7e8fee81b Sync AUTHORS list after osxfuse-sshfs's merge 2016-02-08 20:50:23 -05:00
Julio Merino 869aa42e97 Remove LIBDIR explicit definition
Makefile.am always sets LIBDIR in CPPFLAGS.  There is no need for sshfs.c
to redefine it to a bogus value when not present, and much less to only
do so for the Darwin case only.
2016-02-08 20:50:23 -05:00
Julio Merino d8230e72ca Drop the cache_enabled hack
cache_enabled leaked the cache.on setting from the cache module abstraction
back into sshfs, and it only did so for the Darwin case.

This hack was being used to avoid calling cache_add_attr and cache_invalidate
when the cache was disabled... but these two functions already do nothing when
in that case: there is no need to do a second check in the caller.
2016-02-08 20:50:22 -05:00
Julio Merino e0025219b3 Drop OSXFUSE_SSHFS_VERSION
Now that we are unifying osxfuse's sshfs into libfuse's version, there
should not be two different version identifiers.  Drop osxfuse's one.
2016-02-08 20:50:22 -05:00
Julio Merino 19ab22abec Improve sshfs.1 manpage generation
* Fix dependencies of the sshfs.1 target to actually specify sshfs.1.in as a
  source.

* Ensure that failures during the generation of sshfs.1 do not result in a
  potentially bogus manpage by first outputting the contents to a temporary
  file unknown to the Makefile rule and then replacing the target file once
  all is known to be OK.

* Use $(AM_V_GEN) in the command to respect automake's silent rules.
2016-02-08 20:50:22 -05:00
Julio Merino 3bf3be3bcd Rename arch to osname
Operating system names are not architectures; therefore, rename the arch
variable to osname to better represent its contents.

While doing this, drop a bunch of unused values from the osname.
2016-02-08 20:46:45 -05:00
Julio Merino ddbe3bee44 Merge remote-tracking branch 'osxfuse/master' into merge-osxfuse
Pull in all changes from osxfuse's fork of sshfs into libfuse's sshfs.
There need not be two different copies of this codebase, particularly
because libfuse's version is already autoconf-ified and can support
multiple platforms.

The merge is mostly clean with just a few manual edits to resolve
conflicts.
2016-02-08 20:46:37 -05:00
Nikolaus Rath b10d21db31 Merge pull request #4 from gala132/patch-1
Fix typo in README.md
2016-02-05 09:25:28 -08:00
gala f7c7713a82 Update README.md
Typo fixed
2016-02-05 09:18:25 +01:00
Nikolaus Rath 3087690aba Released 2.6 2016-01-28 17:16:08 -08:00
Nikolaus Rath 3a60def57e Rename project from sshfs-fuse to sshfs 2016-01-28 17:15:49 -08:00
Nikolaus Rath f5b939d40c Don't attempt to download FAQ for tarball generation. 2016-01-28 17:13:05 -08:00
Nikolaus Rath 9b3fb20112 Added missing ChangeLog entries for 2.4 and 2.5 2016-01-28 17:13:05 -08:00
Nikolaus Rath d20b25cd2d Enable subdir-objects automake option
This is recommended for forward-compatibility.
2016-01-28 17:13:05 -08:00
Nikolaus Rath 055649e2fa Changed Changelog format
Up to now, the Changelog has essentially been a (manually maintained)
copy of the git commit history. This doesn't seem to have any point
other than following the GNU coding standards. I believe it's much
better to use the Changelog to summarize the release-to-release
changes that are most important for users (as was done in the NEWS
file until now).
2016-01-28 17:12:49 -08:00
Nikolaus Rath d18349da3b Removed placeholder README file and switch automake to foreign flavor.
The GNU flavor merely requires to existence of some files (including
README, but we prefer README.md), so there seems to be little point
in using it.
2016-01-28 16:52:50 -08:00
Nikolaus Rath cf10c34573 Updated credits from git. 2016-01-28 16:51:08 -08:00
Nikolaus Rath 008cf7bcf4 Renamed README to README.md for Markdown rendering on Github.
Remaining README file is just to make automake happy.
2015-12-21 19:23:10 -08:00
Miklos Szeredi e4e14109ad sshfs: Increase the maximum length of the password
read from stdin to 1024 characters.

Reported by: Mario A. Valdez-Ramirez.
2015-04-14 11:01:19 +02:00
Qais Patankar 9bcb989454 Fix english 2015-03-16 15:34:34 +01:00
Miklos Szeredi 48122e8043 sshfs-return-the-correct-x_ok-access
sshfs-fuse always returned 0 in access(file, X_OK) calls, causing nautilus
to prompt "Do you want to run "login.defs", or display its contents?" for
text files that were not executable.

Reported by: Alkis Georgopoulos
2014-02-10 14:09:13 +01:00
Benjamin Fleischer f2b17c299b Bump version to 2.5.0 2014-02-03 09:01:38 +01:00
Benjamin Fleischer c3d83ee24b Fix redefinition of struct __local_sem_t 2014-02-03 09:01:26 +01:00
Benjamin Fleischer 1fc97d3f2c Add AC_CANONICAL_TARGET to configure.ac 2014-02-03 09:01:07 +01:00
Benjamin Fleischer b42f84218c Merge tag 'sshfs_2_5'
Conflicts:
	sshfs.c
2014-02-02 23:16:13 +01:00
Miklos Szeredi 6b4415ada4 Released 2.5 2014-01-14 15:23:31 +01:00
Alexander Neumann 6a2d06e36f Implement asynchronous readdir
Accessing directories with many (several thousand) files over sshfs is
slow, because most SFTP server implementations only send a fixed amount
of entries per READDIR command (e.g. OpenSSH SFTP: 100 entries). This
patch implements sending several READDIR commands in parallel, in order
to speed up directory listing in these cases.

An option (sync_readdir) is also added so that users can easily switch
on the old behaviour.

The performance improvement is astonishing. Accessing a directory with
30k files in from a remote server that has a RTT of 15ms via OpenSSH
SFTP:

Synchronous readdir:
 $ ./sshfs -o sync_readdir host:/tmp /mnt/temp
 $ time "ls" -1 /mnt/temp/test | wc -l
 30000
 "ls" -1 /mnt/temp/test  0.07s user 0.01s system 1% cpu 6.928 total

Asynchronous readdir:
 $ ./sshfs host:/tmp /mnt/temp
 $ time "ls" -1 /mnt/temp/test | wc -l
 30000
 "ls" -1 /mnt/temp/test  0.07s user 0.01s system 12% cpu 0.605 total

Accessing a directory with 100k files shows even more dramatic
improvement:

Synchronous readdir:
 $ ./sshfs -o sync_readdir host:/tmp /mnt/temp
 $ time "ls" -1 /mnt/temp/test2 | wc -l
 100000
 "ls" -1 /mnt/temp/test2  0.67s user 1.22s system 0% cpu 3:31.56 total

Asynchronous readdir:
 $ ./sshfs host:/tmp /mnt/temp
 $ time "ls" -1 /mnt/temp/test2 | wc -l
 100000
 "ls" -1 /mnt/temp/test2  0.20s user 0.03s system 14% cpu 1.631 total

This can easily be reproduced by creating a directory on a server and
touching a lot of files in it:
 $ mkdir /tmp/test
 $ cd /tmp/test
 $ for i in $(seq 1 30000); do touch $i; done

Signed-off-by: Alexander Neumann <alexander@bumpern.de>
2014-01-08 16:34:52 +01:00
Miklos Szeredi 334e9e6a27 Add -o disable_hardlink option (debian bug #670926)
Reported by Louis-David Mitterrand
2014-01-08 12:31:18 +01:00
Miklos Szeredi 91c1f2ba9e Map SSH2_FX_FAILURE to ENOTEMPTY for rmdir
Reported by Ross Lagerwall
2014-01-07 18:52:51 +01:00
Benjamin Fleischer 990f30d767 Merge remote-tracking branch 'upstream/master'
Conflicts:
	ChangeLog
	configure.ac
	sshfs.1.in
	sshfs.c
2013-08-03 11:50:50 +02:00
Miklos Szeredi c1d62f2032 fix a typo in man page 2013-04-11 17:58:21 +02:00
Alan Jenkins 61524cd1e8 fix missing newline in manual page 2013-02-18 14:36:51 +01:00
Miklos Szeredi 9f4ba56b52 Add FIXME for deadlock if $PATH contains mountpoint.
Reported by Joachim Kopp
2013-02-05 12:33:36 +01:00
Benjamin Fleischer d04fd55128 Update copyright year in darwin_compat 2013-01-08 15:44:18 +01:00
Benjamin Fleischer 1458193728 Add unnamed semaphore implementation for Mac OS X
In the past we relied on libosxfuse including a working unnamed semaphore
implmentation for Mac OS X. This will not be the case in future releases of
OSXFUSE, therefore we need to add our own implementation.
2013-01-08 15:32:57 +01:00
Miklos Szeredi ce6753c88f When checking root directory use LSTAT not STAT
This prevents I/O error being returned after a successful mount if a symlink is
mounted.

Reported by Bart Friederichs
2012-05-14 16:18:22 +02:00
Benjamin Fleischer 66458931dd Bump version to OSXFUSE SSHFS 2.4.1
The only difference between version 2.4.0 and 2.4.1 is the updated man page to
reflect Darwin/OS X specific changes to upstream SSHFS.
2012-03-11 17:36:01 +01:00
Benjamin Fleischer f4631f0a17 Add Darwin/OS X specific information to man page
* Volumes are unmounted using "umount" not "fusermount"

* idmap=user is the deafault setting on Darwin/OS X
2012-03-11 17:35:25 +01:00
Benjamin Fleischer 3c44e22ddd Bump version to OSXFUSE SSHFS 2.4.0 2012-03-09 22:52:56 +01:00
Benjamin Fleischer b389c66b32 Use "#ifdef __APPLE__" instead of "#if __APPLE__" 2012-03-09 22:51:56 +01:00
Miklos Szeredi f64407d865 Released 2.4 2012-03-09 22:51:49 +01:00
Mike Kelly eb60e2d1a2 make sure idmap files aren't writable by others
otherwise, other local users could change the mapping, and gain access
to things they shouldn't
2012-03-09 22:48:58 +01:00
Chris Wolfe 0d34c7b742 Add slave option to run sftp over stdin and stdout
Add -o slave. This option routes the sftp communication over stdin and stdout,
bypassing SSH and network.
2012-03-09 22:48:58 +01:00