Compare commits
117 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2fa759358 | |||
| 1756abe6fd | |||
| df10d96ac2 | |||
| a2dda962c4 | |||
| 504e26f938 | |||
| 74bfa3850a | |||
| 0f6f33b1b4 | |||
| a9a1cc0046 | |||
| b5983a0ce8 | |||
| adc55c9d2b | |||
| 451f2075f2 | |||
| 391f676705 | |||
| c1e799b4da | |||
| ebfeebd468 | |||
| d1ddbbcae5 | |||
| e812e29d39 | |||
| 80db43d7dc | |||
| 27e7029148 | |||
| 30e90ae080 | |||
| 9b4ca1aade | |||
| a03d3eab39 | |||
| 665bb97ef6 | |||
| b7e8fee81b | |||
| 869aa42e97 | |||
| d8230e72ca | |||
| e0025219b3 | |||
| 19ab22abec | |||
| 3bf3be3bcd | |||
| ddbe3bee44 | |||
| b10d21db31 | |||
| f7c7713a82 | |||
| 3087690aba | |||
| 3a60def57e | |||
| f5b939d40c | |||
| 9b3fb20112 | |||
| d20b25cd2d | |||
| 055649e2fa | |||
| d18349da3b | |||
| cf10c34573 | |||
| 008cf7bcf4 | |||
| e4e14109ad | |||
| 9bcb989454 | |||
| 48122e8043 | |||
| f2b17c299b | |||
| c3d83ee24b | |||
| 1fc97d3f2c | |||
| b42f84218c | |||
| 6b4415ada4 | |||
| 6a2d06e36f | |||
| 334e9e6a27 | |||
| 91c1f2ba9e | |||
| 990f30d767 | |||
| c1d62f2032 | |||
| 61524cd1e8 | |||
| 9f4ba56b52 | |||
| d04fd55128 | |||
| 1458193728 | |||
| ce6753c88f | |||
| 66458931dd | |||
| f4631f0a17 | |||
| 3c44e22ddd | |||
| b389c66b32 | |||
| f64407d865 | |||
| eb60e2d1a2 | |||
| 0d34c7b742 | |||
| ff32332e83 | |||
| c1284b4089 | |||
| 0120e6b461 | |||
| 1ac41d2ae2 | |||
| ea6fa1d7c9 | |||
| 6a954f429c | |||
| 0e87004ab2 | |||
| e6f7fb4e50 | |||
| 857d634e09 | |||
| 4dc10686e0 | |||
| b3af91b123 | |||
| acb0832ffd | |||
| c5949f06fa | |||
| b0f3d73028 | |||
| a6b6b5c820 | |||
| a306a80b6e | |||
| bb3ea51117 | |||
| 20fafed0a4 | |||
| 69b2b3cc0e | |||
| fa9bfc6d08 | |||
| 90619fe249 | |||
| 04a610bad1 | |||
| d8da0c4ed6 | |||
| 163683d9ef | |||
| f2086ccfbc | |||
| b4023a19dd | |||
| 75bfa9a6c0 | |||
| e8e26c0bc1 | |||
| cfcae008e3 | |||
| 7ca565d80d | |||
| 301cc5218b | |||
| d666318c7a | |||
| ea0d68651e | |||
| 2f6665d84e | |||
| 2ce4069832 | |||
| 97228b866a | |||
| f3286cdf86 | |||
| 955751ad36 | |||
| b5f0c128f5 | |||
| 77d57a4a5d | |||
| 19cb995c23 | |||
| 49203ee923 | |||
| 6c1968e9e5 | |||
| a575d48234 | |||
| eac5268e87 | |||
| 6d5e12e1b6 | |||
| b1b0c4b6f5 | |||
| f018ac3b1c | |||
| 2431a280eb | |||
| 0eabd86300 | |||
| ae4614e690 | |||
| b1fa0408fb |
-17
@@ -1,17 +0,0 @@
|
||||
.deps
|
||||
COPYING
|
||||
INSTALL
|
||||
FAQ.txt
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
*.cache
|
||||
config.*
|
||||
configure
|
||||
compile
|
||||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
sshfs
|
||||
stamp*
|
||||
.deps
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# NOTE! Don't add files that are generated in specific
|
||||
# subdirectories here. Add them in the ".gitignore" file
|
||||
# in that subdirectory instead.
|
||||
#
|
||||
# NOTE! Please use 'git ls-files -i --exclude-standard'
|
||||
# command after changing this file, to see if there are
|
||||
# any tracked files which get ignored after the change.
|
||||
.*
|
||||
!.gitignore
|
||||
*.o
|
||||
*.lo
|
||||
*.la
|
||||
*.gz
|
||||
\#*#
|
||||
*.orig
|
||||
*~
|
||||
Makefile.in
|
||||
Makefile
|
||||
*.m4
|
||||
stamp-h*
|
||||
config.*
|
||||
sshfs.1
|
||||
/sshfs
|
||||
/ltmain.sh
|
||||
/configure
|
||||
/install-sh
|
||||
/mkinstalldirs
|
||||
/missing
|
||||
/*.cache
|
||||
/depcomp
|
||||
/compile
|
||||
/libtool
|
||||
/INSTALL
|
||||
/.pc
|
||||
/patches
|
||||
/m4
|
||||
@@ -1 +1,30 @@
|
||||
Miklos Szeredi <miklos@szeredi.hu>
|
||||
Current Maintainer
|
||||
------------------
|
||||
|
||||
Nikolaus Rath <Nikolaus@rath.org>
|
||||
|
||||
|
||||
Past Maintainers
|
||||
----------------
|
||||
|
||||
Miklos Szeredi <miklos@szeredi.hu> (until 12/2015)
|
||||
|
||||
|
||||
Contributors (autogenerated list)
|
||||
---------------------------------
|
||||
|
||||
Alan Jenkins <alan.christopher.jenkins@gmail.com>
|
||||
Alexander Neumann <alexander@bumpern.de>
|
||||
Benjamin Fleischer <fleiben@gmail.com>
|
||||
Chris Wolfe <cwolfe@chromium.org>
|
||||
gala <gala132@users.noreply.github.com>
|
||||
George Vlahavas <vlahavas@gmail.com>
|
||||
Julio Merino <jmmv@google.com>
|
||||
Julio Merino <jmmv@meroh.net>
|
||||
Mike Kelly <mike@pair.com>
|
||||
Miklos Szeredi <miklos@szeredi.hu>
|
||||
Miklos Szeredi <mszeredi@suse.cz>
|
||||
Nikolaus Rath <Nikolaus@rath.org>
|
||||
Percy Jahn <email@percyjahn.de>
|
||||
Qais Patankar <qaisjp@gmail.com>
|
||||
Rian Hunter <rian@alum.mit.edu>
|
||||
|
||||
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -1,474 +1,154 @@
|
||||
2008-10-20 Miklos Szeredi <miklos@szeredi.hu>
|
||||
Release 2.7 (2016-06-22)
|
||||
------------------------
|
||||
|
||||
* Released 2.2
|
||||
* Added support for the "fsync" extension.
|
||||
* Fixed a build problem with bitbake
|
||||
|
||||
2008-10-20 Miklos Szeredi <miklos@szeredi.hu>
|
||||
Release 2.6 (2016-03-01)
|
||||
------------------------
|
||||
|
||||
* Escape commas in fsname option if libfuse supports it
|
||||
* Integrated osxfuse's copy of sshfs, which means that sshfs now works
|
||||
on OS X out of the box.
|
||||
* Added -o cache_max_size=N option to let users tune the maximum size of
|
||||
the cache in number of entries.
|
||||
* Added -o cache_clean_interval=N and -o cache_min_clean_interval=N
|
||||
options to let users tune the cleaning behavior of the cache.
|
||||
|
||||
2008-10-08 Miklos Szeredi <miklos@szeredi.hu>
|
||||
Release 2.6 (2015-01-28)
|
||||
------------------------
|
||||
|
||||
* Handle numerical IPv6 addresses enclosed in square brackets.
|
||||
Reported by Andre-John Mas
|
||||
* New maintainer (Nikolaus Rath <Nikolaus@rath.org>)
|
||||
|
||||
* Fix error if username contains a comma character. Reported by
|
||||
Yang Zhang
|
||||
Release 2.5 (2014-01-14)
|
||||
------------------------
|
||||
|
||||
* Fix harmless glib assertations with "cache=no"
|
||||
* Some performance improvements for large directories.
|
||||
* New `disable_hardlink` option.
|
||||
* Various small bugfixes.
|
||||
|
||||
2008-07-11 Miklos Szeredi <miklos@szeredi.hu>
|
||||
Release 2.4 (2012-03-08)
|
||||
------------------------
|
||||
|
||||
* Released 2.1
|
||||
* New `slave` option.
|
||||
* New `idmap`, `uidmap` and `gidmap` options.
|
||||
* Various small bugfixes.
|
||||
|
||||
2008-07-11 Miklos Szeredi <miklos@szeredi.hu>
|
||||
Release 2.3 (2011-07-01)
|
||||
------------------------
|
||||
|
||||
* Fix statvfs extension to match the current protocol in
|
||||
opensshfs
|
||||
* Support hard link creation if server is OpenSSH 5.7 or later
|
||||
* Small improvements and bug fixes
|
||||
* Check mount point and options before connecting to ssh server
|
||||
* New 'delay_connect' option
|
||||
|
||||
* Check version numbers of extensions, so such changes wouldn't
|
||||
cause stupid behavior
|
||||
Release 2.2 (2008-10-20)
|
||||
------------------------
|
||||
|
||||
2008-06-24 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Handle numerical IPv6 addresses enclosed in square brackets
|
||||
* Handle commas in usernames
|
||||
|
||||
* Add '-F' option to specify the ssh config file. Patch by Pat
|
||||
Pascal.
|
||||
Release 2.1 (2008-07-11)
|
||||
------------------------
|
||||
|
||||
2008-05-06 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Small improvements and bug fixes
|
||||
|
||||
* Fix bug in caching which could cause file corruption for append
|
||||
mode writes. Reported by Jose Alonso
|
||||
Release 2.0 (2008-04-23)
|
||||
------------------------
|
||||
|
||||
2008-05-05 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Support password authentication with pam_mount
|
||||
|
||||
* Fix compile on OS X. Original patch from Michael G Schwern
|
||||
* Support atomic renames if server is OpenSSH 4.9 or later
|
||||
|
||||
* Fix compile on Solaris. Reported by Jean-Jacques Sarton
|
||||
* Support getting disk usage if server is OpenSSH 5.1 or later
|
||||
|
||||
2008-04-23 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Small enhancements and bug fixes
|
||||
|
||||
* Released 2.0
|
||||
What is new in 1.9
|
||||
------------------
|
||||
|
||||
2008-04-23 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Fix a serious bug, that could result in sshfs hanging, crashing, or
|
||||
reporting out-of-memory
|
||||
|
||||
* Add manual page. Written by Bartosz Fenski
|
||||
What is new in 1.8
|
||||
------------------
|
||||
|
||||
2008-04-22 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Bug fixes
|
||||
|
||||
* Add missing ssh options: ControlMaster, ControlPath,
|
||||
KbdInteractiveAuthentication, KbdInteractiveDevices, LocalCommand,
|
||||
RekeyLimit (Debian bug #430225).
|
||||
What is new in 1.7
|
||||
------------------
|
||||
|
||||
* Allow the '-ossh_command=CMD' command to contain parameters.
|
||||
Escape charater is backslash.
|
||||
* Tolerate servers which print a banner on login
|
||||
|
||||
* Limit write requests to 64kB.
|
||||
* Small improvements
|
||||
|
||||
* Support "statvfs@openssh.com" extension, which will be available
|
||||
in OpenSSH 5.1.
|
||||
What is new in 1.6
|
||||
------------------
|
||||
|
||||
2008-04-21 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Workaround for missing truncate operation on old sftp servers
|
||||
|
||||
* Fix incorrect disk usage reported by 'du' for files of size 4GB
|
||||
or above. Reported by Christian Boltz.
|
||||
* Bug fixes
|
||||
|
||||
2008-04-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
What is new in 1.5
|
||||
------------------
|
||||
|
||||
* If debugging is enabled, print some statistics at exit about the
|
||||
number of bytes transferred, etc..
|
||||
* Improvements to read performance. Now both read and write
|
||||
throughput should be very close to 'scp'
|
||||
|
||||
2008-03-31 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* If used with FUSE 2.6.0 or later, then perform better data caching.
|
||||
This should show dramatic speed improvements when a file is opened
|
||||
more than once
|
||||
|
||||
* Support "posix-rename@openssh.com" extension available in
|
||||
OpenSSH 4.9. This allows rename to be atomic even when target
|
||||
file or directory exists. If available, the extension will be
|
||||
used instead of the rename operation in the original protocol and
|
||||
the "-oworkaround=rename" option will be ignored.
|
||||
* Bug fixes
|
||||
|
||||
2008-03-28 Miklos Szeredi <miklos@szeredi.hu>
|
||||
What is new in 1.4
|
||||
------------------
|
||||
|
||||
* Add support for password authentication with pam_mount.
|
||||
Original patch and help with testing: John S. Skogtvedt
|
||||
* Updated to version 25 of libfuse API
|
||||
|
||||
2008-03-03 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* This means that the 'cp' of readonly file to sshfs bug is finally
|
||||
solved (as long as using libfuse 2.5.0 or later *and* Linux 2.6.15
|
||||
or later)
|
||||
|
||||
* Fix ssh debug only appearing if "-d" is used. Reported by
|
||||
Michael Gorbach
|
||||
* Sshfs now works on FreeBSD
|
||||
|
||||
2008-01-03 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Added option to "transform" absolute symbolic links
|
||||
|
||||
* Fix condition for building of sshnodelay.so
|
||||
What is new in 1.3
|
||||
------------------
|
||||
|
||||
2007-12-17 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Add workaround for failure to rename to an existing file
|
||||
|
||||
* Released 1.9
|
||||
* Simple user ID mapping
|
||||
|
||||
2007-12-12 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Estimate disk usage of files based on size
|
||||
|
||||
* Fix checking for fuse_opt_parse in configure
|
||||
* Report "infinite" disk space
|
||||
|
||||
2007-12-11 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Bug fixes
|
||||
|
||||
* Fill in st_ctime attribute with st_mtime, instead of leaving it
|
||||
zero
|
||||
What is new in 1.2
|
||||
------------------
|
||||
|
||||
* Check for OpenSSH version >= 4.4, and if found, don't build the
|
||||
sshnodelay.so workaround
|
||||
* Better compatibility with different sftp servers
|
||||
|
||||
2007-12-10 Miklos Szeredi <miklos@szeredi.hu>
|
||||
* Automatic reconnect (optional)
|
||||
|
||||
* Fix crash on writing files, caused by missing locking around
|
||||
sshfs_file_get()
|
||||
What is new in 1.1
|
||||
------------------
|
||||
|
||||
* Don't time requests when not debugging
|
||||
* Performance improvements:
|
||||
|
||||
* Add subtype support with libfuse >= 2.7.0
|
||||
- directory content caching
|
||||
|
||||
* Abort on allocation failure instead of exit
|
||||
- symlink caching
|
||||
|
||||
* Correctly show default of nodelaysrv workaround in help message
|
||||
- asynchronous writeback
|
||||
|
||||
2007-05-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
- readahead
|
||||
|
||||
* Released 1.8
|
||||
* Fixed '-p' option
|
||||
|
||||
2007-05-15 Miklos Szeredi <miklos@szeredi.hu>
|
||||
What is new in 1.0
|
||||
------------------
|
||||
|
||||
* Add needed g_thread_init() to fix rare crashes. Reported by
|
||||
Dimitrios Apostolou
|
||||
|
||||
* Fix memory leak in sshfs_open_common()
|
||||
|
||||
2007-04-18 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix crash within gdb, caused by sem_wait() returning with an
|
||||
error on interrupt. Reported by Dimitrios Apostolou
|
||||
|
||||
* Fix spurious cache entries remaining after renaming a directory
|
||||
|
||||
2007-02-28 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Don't set DISPLAY environment variable to "", because it breaks
|
||||
ssh-askpass. Make nodelaysrv_workaround default to off, because
|
||||
with this change it may have security implications.
|
||||
|
||||
2007-02-19 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* OpenSSH sftp-server can read requests faster, than it processes
|
||||
them, when it's buffer is full it aborts. This can happen on a
|
||||
large upload to a slow server. Work around this by limiting the
|
||||
total size of outstanding reqests. Debian bug #365541. Tracked
|
||||
down by Thue Janus Kristensen
|
||||
|
||||
* Add --disable-sshnodelay configure option. The sshnodelay.so
|
||||
hack shouldnt be needed with OpenSSH client versions >= 4.3
|
||||
|
||||
2006-12-20 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Work around write performace issues due to missing TCP_NODELAY
|
||||
in sshd. Reported by Justin Searle
|
||||
|
||||
2006-11-10 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix bug which ommitted directory entries for symlinks with the
|
||||
-ofollow_symlinks option. Bug reported by Mikael Ståldal
|
||||
|
||||
2006-09-29 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix segfault if there are outstanding writes to the server after
|
||||
release on the file descriptor. This only happened on FreeBSD.
|
||||
Reported by Andriy Gapon
|
||||
|
||||
2006-08-18 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.7
|
||||
|
||||
2006-08-17 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Cosmetics on bogus statfs numbers
|
||||
|
||||
2006-08-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add option 'follow_symlinks' to resolve symlinks on the server.
|
||||
|
||||
* On setups where the login shell prints a banner, the sftp
|
||||
protocol was confused, and bailed out with "reply len too large:
|
||||
...". So iterate over any rubbish read immediately after login
|
||||
until a valid reply is found.
|
||||
|
||||
* Check remote directory for existence before mounting. Closes
|
||||
Ubuntu bug #46633
|
||||
|
||||
2006-03-10 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Use socketpair() instead of pipe() for communication between ssh
|
||||
and sshfs. Patch from Csaba Henk
|
||||
|
||||
* Update to FUSE interface version 26
|
||||
|
||||
2006-03-09 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.6
|
||||
|
||||
2006-03-09 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix segfault if remote host is down and reconnection is enabled
|
||||
|
||||
2006-03-08 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix bug in symlink transformation. Reported by Ralf Hoffmann
|
||||
|
||||
2006-02-24 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add workaround for broken truncate on old sftp servers. Can be
|
||||
enabled with '-oworkaround=truncate'. Patch from Joseph M Link
|
||||
|
||||
2006-02-23 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Avoid double memcpy on writes. Patch by Joseph M Link
|
||||
|
||||
* More memory copy avoidance
|
||||
|
||||
2006-02-22 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add -fPIC to the comile flags of sshnodelay.so. Reported by
|
||||
Anthony Kolasny
|
||||
|
||||
2006-02-20 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.5
|
||||
|
||||
2006-02-19 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix compilation with old FUSE versions. Report by Kurt George
|
||||
Gjerde
|
||||
|
||||
2006-02-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Block TERM/INT/HUP/QUIT signals in sshfs reading thread, so they
|
||||
will always be received by the FUSE main thread. Fixes the
|
||||
"double ^C" problem seen on FreeBSD.
|
||||
|
||||
* Use 'auto_cache' option if available, so that file cache is not
|
||||
thrown away on each open. This should make repeated reading of a
|
||||
file much much faster.
|
||||
|
||||
2006-01-31 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix problems with nodelay workaround on FreeBSD.
|
||||
|
||||
2006-01-30 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix data consitency bug if readahead is enabled and writes are
|
||||
intermixed with reads. Solution is far from optimal, since it
|
||||
will prevent readahead in the above situation. If used with FUSE
|
||||
>= 2.6.0 with Linux-2.6.X, readahead will be done by the kernel,
|
||||
and hence there will be no performance penalty. Bug reported and
|
||||
test program written by Wolfgang Köbler. Further testing on
|
||||
FreeBSD by Csaba Henk
|
||||
|
||||
2006-01-29 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add '-olarge_read' option for Linux-2.4.*. This should
|
||||
generally improve download performance
|
||||
|
||||
2006-01-27 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add workaround (enabled by default) for ssh clients not setting
|
||||
TCP_NODELAY on the network connection. Currently this is all
|
||||
known versions of openssh. This may improve download speed in
|
||||
some circumstances
|
||||
|
||||
* Make it possible to idividually disable workarounds with a "no"
|
||||
prefix
|
||||
|
||||
* Change '-otransform_symlinks' not to prefix with the mountpoint
|
||||
(which is fragile wrt. moving/binding the mount). Rather convert
|
||||
absolute symlinks to relative if possible. Does not yet work if
|
||||
base path is itself relative
|
||||
|
||||
2006-01-25 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Use TCP_NODELAY socket option for direct connection. This may
|
||||
improve download speed in some circumstances
|
||||
|
||||
2006-01-20 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Update to fuse API 2.6
|
||||
|
||||
* Don't do readahead in sshfs if it's done in kernel
|
||||
|
||||
2006-01-14 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.4
|
||||
|
||||
2006-01-09 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Added 'transform_symlinks' option to "fix-up" absolute symlinks.
|
||||
Patch by Paul Jarc
|
||||
|
||||
* Add option parsing implementation, so linking with older than
|
||||
2.5.0 libfuse still works.
|
||||
|
||||
2005-12-09 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Use new option parsing interface of FUSE
|
||||
|
||||
2005-11-28 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Set statvfs::f_frsize
|
||||
|
||||
2005-11-23 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix warnings on 64bit systems. Reported by D. R. Evans
|
||||
|
||||
2005-11-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Replace EPROTO with the more portable EIO
|
||||
|
||||
* Fix bug in option parsing. Reported by Csaba Henk
|
||||
|
||||
2005-10-29 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Use FUSE version 25 if available
|
||||
|
||||
* Add <sys/socket.h> include. Reported by Csaba Henk
|
||||
|
||||
2005-10-29 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.3
|
||||
|
||||
2005-10-28 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add atomic create+open and ftruncate operation. This should fix
|
||||
issues with 'cp' and other programs failing with "Permission
|
||||
denied". To be effective, needs FUSE version 2.5 and kernel
|
||||
version 2.6.15 (just a guess, since neither of them is released
|
||||
yet).
|
||||
|
||||
2005-10-27 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add support for SSH protocol version 1. Bug reported by Miklos
|
||||
Bagi Jr.
|
||||
|
||||
2005-10-26 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix typo (ConnectTimeout -> ConnectionTimeout) in ssh options.
|
||||
Bug reported by Miklos Bagi Jr.
|
||||
|
||||
2005-10-19 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* GNOME Nautilus fails to copy file to sshfs filesystem, because
|
||||
FUSE returns zero free space. So instead return huge (999999999
|
||||
kbytes) amount of free space, yet it should be obvious that the
|
||||
number is artificial. Bug report by Peter Kronheimer
|
||||
|
||||
2005-10-18 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add remote uid detection and translation ('idmap=user' option).
|
||||
Idea and implementation details worked out by Jean-Marc Valin
|
||||
|
||||
2005-10-17 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add one more missing lock.
|
||||
|
||||
* Add workaround for failure to rename to an existing file. Based
|
||||
on patch by Michael Best
|
||||
|
||||
2005-10-15 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Protect request ID allocation with mutex. Bug report by Tvrtko
|
||||
Ursulin
|
||||
|
||||
2005-08-17 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Try to calculate approximate disk usage of files from their
|
||||
size, so that 'du' returns meaningful results. Problem reported
|
||||
by Bernd Amend.
|
||||
|
||||
2005-08-15 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.2
|
||||
|
||||
2005-08-13 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add 'reconnect' option, which tries to reconnect to the server
|
||||
when the connection is broken. If a password is required for
|
||||
connection, it is recommended that you install ssh-askpass, and
|
||||
set the SSH_ASKPASS environment variable (see 'man ssh' for more
|
||||
details).
|
||||
|
||||
2005-05-05 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Work around missing truncate() support in some older sftp
|
||||
servers (only works for zero size truncate). Thanks to Eduard
|
||||
Czimbalmos for the bug report and help with testing
|
||||
|
||||
2005-04-13 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix compilation with gcc-2.95. Reported by David A. Gershman
|
||||
|
||||
2005-03-08 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Make it work on server version 2 (e.g. Sun_SSH_1.0.1). Report
|
||||
and testing by Pieter J. Kersten
|
||||
|
||||
2005-03-04 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.1
|
||||
|
||||
2005-03-03 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Slightly optimize readahead. Still not clever enough to always
|
||||
keep the pipe filled.
|
||||
|
||||
* Add 'sshfs_debug' option
|
||||
|
||||
2005-02-17 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Parse 'max_read' mount option and if smaller than 65536 forward
|
||||
to FUSE
|
||||
|
||||
2005-02-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Added simple readahead (big performance gain in case of
|
||||
sequential read pattern). Can be disabled with '-o no_readahead'
|
||||
|
||||
2005-02-14 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Added asynchronous writeback (big performance gain) and made
|
||||
this the default. Can be disabled with '-o sshfs_sync'
|
||||
|
||||
2005-02-09 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Added option to start arbitary command instead of 'ssh'
|
||||
|
||||
* Re-added '-p PORT' as a convenience option, also '-C' works as
|
||||
in ssh.
|
||||
|
||||
2005-02-08 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Add caching of symlinks
|
||||
|
||||
* Add support for many ssh options to be passed to ssh
|
||||
|
||||
* Port number can now actually be specified with "-o port=PORT",
|
||||
bug spotted by Andrew Ukrainec
|
||||
|
||||
2005-02-07 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Separate attribute caching to a separate layer
|
||||
|
||||
* Add caching of directory contents
|
||||
|
||||
2005-02-03 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
Fix PKG_CONFIG_PATH setting in configure.ac (reported by Alpar
|
||||
Juttner)
|
||||
|
||||
2005-01-09 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.0
|
||||
|
||||
2004-12-04 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Started ChangeLog
|
||||
* Initial release
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
SSHFS FAQ
|
||||
=========
|
||||
|
||||
1. I've found a bug and there's no solution in this FAQ, what
|
||||
should I do?
|
||||
2. Advantage of sshfs over NFS and Samba
|
||||
3. Create the device node
|
||||
4. mv fails with "Operation not permitted"
|
||||
5. cvs fails with "cvs [status aborted]: cannot get working
|
||||
directory: No such file or directory" in a sshfs mounted directory
|
||||
6. Changes on the server are not immediately visible in the
|
||||
mounted directory.
|
||||
7. Configuring the ssh connection
|
||||
8. What are the no_readahead and sshfs_sync options for?
|
||||
9. Why does df return strange values on partitions mounted via
|
||||
sshfs?
|
||||
10. How do I specify the remote mount point (since the example
|
||||
defaults to the home directory)
|
||||
11. sshfs hangs after a while
|
||||
12. Following symlinks on the server side
|
||||
13. Making absolute symlinks work
|
||||
14. Mounting as root
|
||||
15. Exporting via NFS
|
||||
16. Automatical mounting using /etc/fstab
|
||||
17. Why does SVN (etc...) fail with permission denied?
|
||||
18. Why does SVN (etc...) fail to rename files?
|
||||
19. Is there some neat way to do it in reverse?
|
||||
20. Might it be reasonable to disallow loops?
|
||||
21. How to mount through an intermediary ssh server, eg:
|
||||
localhost -> A -> B; mount B from localhost
|
||||
22. Alternative Solution
|
||||
23. I seem to have successfully mounted a remote directory, but
|
||||
performing an `ls -l` on the directory above the mount point shows
|
||||
the mount point's attributes as `? ? ? ? ? ?`. Nothing shows up in
|
||||
the directory either. What am I doing wrong?
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
1. I've found a bug and there's no solution in this FAQ, what should I do?
|
||||
|
||||
Please report the bug in the Github issue tracker:
|
||||
https://github.com/libfuse/sshfs/issues
|
||||
|
||||
Also logs with debugging output can be useful for diagnosing the
|
||||
problem. Try running sshfs with the following options:
|
||||
sshfs -odebug,sshfs_debug,loglevel=debug ...
|
||||
|
||||
Doing strace on the application which fails may also sometimes help:
|
||||
strace -f -o /tmp/strace application args ...
|
||||
|
||||
Note that large messages (over 40k) will be rejected from the mailing
|
||||
list. So try to keep the logs as short as possible.
|
||||
|
||||
|
||||
2. Advantage of sshfs over NFS and Samba
|
||||
|
||||
Users can mount remote resources they already have ssh access to,
|
||||
without requiring the remote machine to export the resource.
|
||||
|
||||
The remote resource can be mounted when it is needed in a location
|
||||
that is convenient for the user at that time, without needing to rely
|
||||
on a central, root-controlled file system table.
|
||||
|
||||
Automatic mounting, if desired, can be added to a shell script such as
|
||||
.bashrc (provided authentication is done using RSA/DSA keys).
|
||||
|
||||
Resources can be mounted over slow and unreliable (distant)
|
||||
connections.
|
||||
|
||||
3. Create the device node
|
||||
|
||||
If you don't use udev, you may get this error message:
|
||||
|
||||
fusermount: failed to open /dev/fuse: No such device or address
|
||||
|
||||
Before loading the fuse kernel module, create the device node
|
||||
manually:
|
||||
|
||||
mknod -m 666 /dev/fuse c 10 229
|
||||
|
||||
4. mv fails with "Operation not permitted".
|
||||
|
||||
Use -o workaround=rename (requires sshfs version >= 1.3).
|
||||
|
||||
5. cvs fails with "cvs status aborted?: cannot get working directory: No such
|
||||
file or directory" in a sshfs mounted directory
|
||||
|
||||
Use the -oreaddir_ino option. Example:
|
||||
sshfs -oreaddir_ino hostname:remote_dir mount_point
|
||||
|
||||
6. Changes on the server are not immediately visible in the mounted directory.
|
||||
|
||||
By default, sshfs caches things for 20 seconds, use -o cache_timeout=N
|
||||
to change the default cache timeout (in seconds) or -o cache=no for
|
||||
disabling the cache.
|
||||
|
||||
You can also control cache timeouts for directory listing etc with
|
||||
-o cache_stat_timeout=N,
|
||||
-o cache_dir_timout=N, and
|
||||
-o cache_link_timout=N.
|
||||
|
||||
7. Configuring the ssh connection
|
||||
|
||||
In addition to flags like -C, -p, and -o SSHOPT...=, you may find it
|
||||
easier to edit your /.ssh/config file. You can add an entry with any
|
||||
customization you want, test it with ssh, and finally use it with
|
||||
sshfs. As a bonus, you get a short mnemonic for your configuration.
|
||||
|
||||
8. What are the no_readahead and sshfs_sync options for?
|
||||
|
||||
These disable read and write optimizations respectively. They don't
|
||||
really make sense unless you're doing something special.
|
||||
|
||||
9. Why does df return strange values on partitions mounted via sshfs?
|
||||
|
||||
Because the SFTP protocol doesn't have a statfs operation this is
|
||||
currently not possible to display proper usage on remote partition.
|
||||
|
||||
10. How do I specfy the remote mount point (since the example defaults to the
|
||||
home directory)
|
||||
|
||||
The example shows:
|
||||
sshfs hostname: mountpoint
|
||||
|
||||
To specify a remote mount point use:
|
||||
sshfs hostname:remotemountpoint mountpoint
|
||||
|
||||
This might be obvious to others, but I ended up looking up the
|
||||
interface to sftp to see if I could learn how to specify the remote
|
||||
mount point, then thought about the way that scp specifies the remote
|
||||
directory, and it worked.
|
||||
|
||||
11. sshfs hangs after a while
|
||||
|
||||
Mounting works fine, I can use the files in Mountpoint as good as any
|
||||
other files on my system, but after bit of time, changing nothing on
|
||||
the remote files sshfs crashes. This means, I can not cd into the
|
||||
Mountpoint (xterm hangs, nautilus hangs... every program trying to
|
||||
access the Mountpoint gets stuck, and won't return).
|
||||
|
||||
Solution: add
|
||||
ServerAliveInterval 15
|
||||
|
||||
in your .ssh/config (or use -o ServerAliveInterval=15 on the sshfs
|
||||
command line but I did not test that solution). This will force the
|
||||
ssh connection to stay alive even if you have no activity.
|
||||
|
||||
12. Following symlinks on the server side
|
||||
|
||||
The -o follow_symlinks option will enable this.
|
||||
|
||||
13. Making absolute symlinks work
|
||||
|
||||
Use the -o transform_symlinks option, which will transform absolute
|
||||
symlinks (ones which point somewhere inside the mount) into relative
|
||||
ones.
|
||||
|
||||
14. Mounting as root
|
||||
|
||||
Generally it's not possible to use an sshfs mount as a "real"
|
||||
filesystem shared between multiple users. Some of this functionality
|
||||
can be enabled with the -o allow_other and -o default_permissions
|
||||
options, but files will not be created with the correct ownership,
|
||||
etc...
|
||||
|
||||
15. Exporting via NFS
|
||||
|
||||
Use the userspace NFS daemon http://sourceforge.net/projects/unfs
|
||||
|
||||
16. Automatical mounting using /etc/fstab
|
||||
|
||||
A line in /etc/fstab has the following format:
|
||||
sshfs#USERNAME@REMOTE_HOST:REMOTE_PATH MOUNT_POINT fuse SSHFS_OPTIONS 0 0
|
||||
|
||||
eg.
|
||||
sshfs#guest@guest.login.com:data /mnt/guest fuse \
|
||||
uid=1003,gid=100,umask=0,allow_other 0 0
|
||||
|
||||
17. Why does SVN (etc...) fail with permission denied?
|
||||
|
||||
This is a bug that happens when an application creates a read-only
|
||||
file opened for writing (e.g. open("foo", O_WRONLY|O_CREAT, 0444))
|
||||
|
||||
It has been fixed in sshfs version 1.3, but also requires FUSE version
|
||||
>=2.5.X and Linux kernel version >=2.6.15.
|
||||
|
||||
18. Why does SVN (etc...) fail to rename files?
|
||||
|
||||
$ svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs
|
||||
svn: Can't move 'kdelibs/.svn/tmp/entries' to 'kdelibs/.svn/entries':
|
||||
Operation not permitted
|
||||
|
||||
The reason is that SFTP protocol version 3 (which is implemented by
|
||||
OpenSSH's sftp-server) defines the rename operation slightly
|
||||
differently than POSIX. The difference is that renaming to an existing
|
||||
file or directory will fail instead of atomically replacing the old
|
||||
file.
|
||||
|
||||
The -o workaround=rename option will try to emulate POSIX rename
|
||||
semantics, but it cannot guarantee atomicity. In most of the cases
|
||||
this doesn't matter, and things will work fine with this option.
|
||||
|
||||
19. Is there some neat way to do it in reverse?
|
||||
|
||||
You want to mount a USB thumb drive onto a file server that is rather
|
||||
remote.
|
||||
|
||||
Assuming this is difficult because the laptop with the thumb drive is
|
||||
sitting behind NAT, firewalls, etc. then you need to create a
|
||||
port-forward:
|
||||
client$ ssh -R 2222:localhost:22 server
|
||||
server$ sshfs -p 2222 localhost:/media/usb1 myusb1
|
||||
|
||||
(Now, is there is there a smarter way that does not involve port
|
||||
opening login permissions in an undesireable direction?)
|
||||
|
||||
20. Might it be reasonable to disallow loops?
|
||||
|
||||
sshfs localhost:/mnt /mnt
|
||||
|
||||
This seems to produce undesirable results. --JoshuaRodman
|
||||
|
||||
21. How to mount through an intermediary ssh server, eg: localhost -> A -> B;
|
||||
mount B from localhost
|
||||
|
||||
Start by mounting the folder you need that is on "a" to a folder on
|
||||
"b" then mount the new folder that is on "a" to a folder on localhost.
|
||||
|
||||
IE: (These are NOT real commands, but a sequence of steps.
|
||||
A mounts B:/home/x on /mnt/Bx
|
||||
localhost mounts A:/mnt/Bx on ~/mydir
|
||||
|
||||
22. Alternative Solution:
|
||||
|
||||
1) Create a shell script to wrap the tunneling of one ssh command over
|
||||
another,
|
||||
$ cat >Atunnel <<EOF
|
||||
#!/bin/bash
|
||||
ssh -q A ssh -q "$@"
|
||||
EOF
|
||||
$ chmod u+x Atunnel
|
||||
|
||||
N.B. make sure to put this somewhere on your path. 2) sshfs mount as
|
||||
normal but using this script as the ssh command.
|
||||
$ sshfs -o ssh_command='Atunnel' B: ~/mydir
|
||||
|
||||
23. I seem to have successfully mounted a remote directory, but performing an
|
||||
`ls -l` on the directory above the mount point shows the mount point's
|
||||
attributes as `? ? ? ? ? ?`. Nothing shows up in the directory either. What
|
||||
am I doing wrong?
|
||||
|
||||
You probably specified a remote path with the tilde (~) in it. This
|
||||
doesn't seem to work. Instead, specify an absolute remote path:
|
||||
sshfs username@remote.host:/home/username/whatever my/mount
|
||||
|
||||
What options do i use to make playing media files (music) over sshfs more
|
||||
efficient?
|
||||
|
||||
MacFUSE doesn't seem to let me move files from one directory to another. It
|
||||
first asks for my local user password (i.e. the password on my Macbook Pro)
|
||||
and then produces the error message "The operation cannot be completed
|
||||
because one or more required items cannot be found. (Error code -120).
|
||||
|
||||
+14
-3
@@ -6,16 +6,27 @@ sshfs_SOURCES = sshfs.c cache.c cache.h
|
||||
if FUSE_OPT_COMPAT
|
||||
sshfs_SOURCES += compat/fuse_opt.c compat/fuse_opt.h
|
||||
endif
|
||||
if DARWIN_COMPAT
|
||||
sshfs_SOURCES += compat/darwin_compat.c compat/darwin_compat.h
|
||||
endif
|
||||
|
||||
sshfs_LDADD = $(SSHFS_LIBS)
|
||||
sshfs_CFLAGS = $(SSHFS_CFLAGS)
|
||||
sshfs_CPPFLAGS = -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"$(libdir)\"
|
||||
sshfs_CPPFLAGS = -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"$(libdir)\" \
|
||||
-DIDMAP_DEFAULT="\"$(IDMAP_DEFAULT)\""
|
||||
|
||||
EXTRA_DIST = sshnodelay.c FAQ.txt
|
||||
CLEANFILES = sshnodelay.so
|
||||
EXTRA_DIST = sshnodelay.c sshfs.1.in
|
||||
CLEANFILES = sshnodelay.so sshfs.1 sshfs.1.tmp
|
||||
|
||||
dist_man_MANS = sshfs.1
|
||||
|
||||
sshfs.1: sshfs.1.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's,__IDMAP_DEFAULT__,$(IDMAP_DEFAULT),g' \
|
||||
-e 's,__UNMOUNT_COMMAND__,$(UNMOUNT_COMMAND),g' \
|
||||
<sshfs.1.in >sshfs.1.tmp || exit 1; \
|
||||
mv sshfs.1.tmp sshfs.1
|
||||
|
||||
if SSH_NODELAY_SO
|
||||
all-local: sshnodelay.so
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
What is new in 2.0
|
||||
------------------
|
||||
|
||||
* Support password authentication with pam_mount
|
||||
|
||||
* Support atomic renames if server is OpenSSH 4.9 or later
|
||||
|
||||
* Support getting disk usage if server is OpenSSH 5.1 or later
|
||||
|
||||
* Small enhancements and bug fixes
|
||||
|
||||
What is new in 1.9
|
||||
------------------
|
||||
|
||||
* Fix a serious bug, that could result in sshfs hanging, crashing, or
|
||||
reporting out-of-memory
|
||||
|
||||
What is new in 1.8
|
||||
------------------
|
||||
|
||||
* Bug fixes
|
||||
|
||||
What is new in 1.7
|
||||
------------------
|
||||
|
||||
* Tolerate servers which print a banner on login
|
||||
|
||||
* Small improvements
|
||||
|
||||
What is new in 1.6
|
||||
------------------
|
||||
|
||||
* Workaround for missing truncate operation on old sftp servers
|
||||
|
||||
* Bug fixes
|
||||
|
||||
What is new in 1.5
|
||||
------------------
|
||||
|
||||
* Improvements to read performance. Now both read and write
|
||||
throughput should be very close to 'scp'
|
||||
|
||||
* If used with FUSE 2.6.0 or later, then perform better data caching.
|
||||
This should show dramatic speed improvements when a file is opened
|
||||
more than once
|
||||
|
||||
* Bug fixes
|
||||
|
||||
What is new in 1.4
|
||||
------------------
|
||||
|
||||
* Updated to version 25 of libfuse API
|
||||
|
||||
* This means that the 'cp' of readonly file to sshfs bug is finally
|
||||
solved (as long as using libfuse 2.5.0 or later *and* Linux 2.6.15
|
||||
or later)
|
||||
|
||||
* Sshfs now works on FreeBSD
|
||||
|
||||
* Added option to "transform" absolute symbolic links
|
||||
|
||||
What is new in 1.3
|
||||
------------------
|
||||
|
||||
* Add workaround for failure to rename to an existing file
|
||||
|
||||
* Simple user ID mapping
|
||||
|
||||
* Estimate disk usage of files based on size
|
||||
|
||||
* Report "infinite" disk space
|
||||
|
||||
* Bug fixes
|
||||
|
||||
What is new in 1.2
|
||||
------------------
|
||||
|
||||
* Better compatibility with different sftp servers
|
||||
|
||||
* Automatic reconnect (optional)
|
||||
|
||||
What is new in 1.1
|
||||
------------------
|
||||
|
||||
* Performance improvements:
|
||||
|
||||
- directory content caching
|
||||
|
||||
- symlink caching
|
||||
|
||||
- asynchronous writeback
|
||||
|
||||
- readahead
|
||||
|
||||
* Fixed '-p' option
|
||||
|
||||
What is new in 1.0
|
||||
------------------
|
||||
|
||||
* Initial release
|
||||
+11
-13
@@ -26,8 +26,7 @@ Latest version
|
||||
==============
|
||||
|
||||
The latest version and more information can be found on
|
||||
|
||||
http://fuse.sourceforge.net/sshfs.html
|
||||
http://github.com/libfuse/sshfs
|
||||
|
||||
|
||||
How to mount a filesystem
|
||||
@@ -35,7 +34,7 @@ How to mount a filesystem
|
||||
|
||||
Once sshfs is installed (see next section) running it is very simple:
|
||||
|
||||
sshfs hostname: mountpoint
|
||||
sshfs hostname: mountpoint
|
||||
|
||||
Note, that it's recommended to run it as user, not as root. For this
|
||||
to work the mountpoint must be owned by the user. If the username is
|
||||
@@ -47,28 +46,27 @@ is the home directory.
|
||||
|
||||
Also many ssh options can be specified (see the manual pages for
|
||||
sftp(1) and ssh_config(5)), including the remote port number
|
||||
('-oport=PORT')
|
||||
(`-oport=PORT`)
|
||||
|
||||
To unmount the filesystem:
|
||||
|
||||
fusermount -u moutpoint
|
||||
fusermount -u mountpoint
|
||||
|
||||
|
||||
Installing
|
||||
==========
|
||||
|
||||
First you need to download FUSE 2.2 or later from:
|
||||
|
||||
http://fuse.sourceforge.net
|
||||
First you need to download FUSE 2.2 or later from
|
||||
http://github.com/libfuse/libfuse.
|
||||
|
||||
You also need to install the devel package for glib2.0. After
|
||||
installing FUSE, compile sshfs the usual way:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install (as root)
|
||||
./configure
|
||||
make
|
||||
make install (as root)
|
||||
|
||||
And you are ready to go.
|
||||
|
||||
If checking out from CVS for the first time also do 'autoreconf -i'
|
||||
before doing './configure'.
|
||||
If checking out from git for the first time also do `autoreconf -i`
|
||||
before doing `./configure`.
|
||||
@@ -14,16 +14,19 @@
|
||||
#include <glib.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#define DEFAULT_CACHE_TIMEOUT 20
|
||||
#define MAX_CACHE_SIZE 10000
|
||||
#define MIN_CACHE_CLEAN_INTERVAL 5
|
||||
#define CACHE_CLEAN_INTERVAL 60
|
||||
#define DEFAULT_CACHE_TIMEOUT_SECS 20
|
||||
#define DEFAULT_MAX_CACHE_SIZE 10000
|
||||
#define DEFAULT_CACHE_CLEAN_INTERVAL_SECS 60
|
||||
#define DEFAULT_MIN_CACHE_CLEAN_INTERVAL_SECS 5
|
||||
|
||||
struct cache {
|
||||
int on;
|
||||
unsigned stat_timeout;
|
||||
unsigned dir_timeout;
|
||||
unsigned link_timeout;
|
||||
unsigned int stat_timeout_secs;
|
||||
unsigned int dir_timeout_secs;
|
||||
unsigned int link_timeout_secs;
|
||||
unsigned int max_size;
|
||||
unsigned int clean_interval_secs;
|
||||
unsigned int min_clean_interval_secs;
|
||||
struct fuse_cache_operations *next_oper;
|
||||
GHashTable *table;
|
||||
pthread_mutex_t lock;
|
||||
@@ -70,9 +73,9 @@ static int cache_clean_entry(void *key_, struct node *node, time_t *now)
|
||||
static void cache_clean(void)
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
if (now > cache.last_cleaned + MIN_CACHE_CLEAN_INTERVAL &&
|
||||
(g_hash_table_size(cache.table) > MAX_CACHE_SIZE ||
|
||||
now > cache.last_cleaned + CACHE_CLEAN_INTERVAL)) {
|
||||
if (now > cache.last_cleaned + cache.min_clean_interval_secs &&
|
||||
(g_hash_table_size(cache.table) > cache.max_size ||
|
||||
now > cache.last_cleaned + cache.clean_interval_secs)) {
|
||||
g_hash_table_foreach_remove(cache.table,
|
||||
(GHRFunc) cache_clean_entry, &now);
|
||||
cache.last_cleaned = now;
|
||||
@@ -164,7 +167,6 @@ static struct node *cache_get(const char *path)
|
||||
void cache_add_attr(const char *path, const struct stat *stbuf, uint64_t wrctr)
|
||||
{
|
||||
struct node *node;
|
||||
time_t now;
|
||||
|
||||
if (!cache.on)
|
||||
return;
|
||||
@@ -172,9 +174,8 @@ void cache_add_attr(const char *path, const struct stat *stbuf, uint64_t wrctr)
|
||||
pthread_mutex_lock(&cache.lock);
|
||||
if (wrctr == cache.write_ctr) {
|
||||
node = cache_get(path);
|
||||
now = time(NULL);
|
||||
node->stat = *stbuf;
|
||||
node->stat_valid = time(NULL) + cache.stat_timeout;
|
||||
node->stat_valid = time(NULL) + cache.stat_timeout_secs;
|
||||
if (node->stat_valid > node->valid)
|
||||
node->valid = node->stat_valid;
|
||||
cache_clean();
|
||||
@@ -185,14 +186,12 @@ void cache_add_attr(const char *path, const struct stat *stbuf, uint64_t wrctr)
|
||||
static void cache_add_dir(const char *path, char **dir)
|
||||
{
|
||||
struct node *node;
|
||||
time_t now;
|
||||
|
||||
pthread_mutex_lock(&cache.lock);
|
||||
node = cache_get(path);
|
||||
now = time(NULL);
|
||||
g_strfreev(node->dir);
|
||||
node->dir = dir;
|
||||
node->dir_valid = time(NULL) + cache.dir_timeout;
|
||||
node->dir_valid = time(NULL) + cache.dir_timeout_secs;
|
||||
if (node->dir_valid > node->valid)
|
||||
node->valid = node->dir_valid;
|
||||
cache_clean();
|
||||
@@ -209,14 +208,12 @@ static size_t my_strnlen(const char *s, size_t maxsize)
|
||||
static void cache_add_link(const char *path, const char *link, size_t size)
|
||||
{
|
||||
struct node *node;
|
||||
time_t now;
|
||||
|
||||
pthread_mutex_lock(&cache.lock);
|
||||
node = cache_get(path);
|
||||
now = time(NULL);
|
||||
g_free(node->link);
|
||||
node->link = g_strndup(link, my_strnlen(link, size-1));
|
||||
node->link_valid = time(NULL) + cache.link_timeout;
|
||||
node->link_valid = time(NULL) + cache.link_timeout_secs;
|
||||
if (node->link_valid > node->valid)
|
||||
node->valid = node->link_valid;
|
||||
cache_clean();
|
||||
@@ -496,6 +493,7 @@ static void cache_unity_fill(struct fuse_cache_operations *oper,
|
||||
cache_oper->init = oper->oper.init;
|
||||
#endif
|
||||
cache_oper->getattr = oper->oper.getattr;
|
||||
cache_oper->access = oper->oper.access;
|
||||
cache_oper->readlink = oper->oper.readlink;
|
||||
cache_oper->getdir = cache_unity_getdir;
|
||||
cache_oper->mknod = oper->oper.mknod;
|
||||
@@ -525,6 +523,10 @@ static void cache_unity_fill(struct fuse_cache_operations *oper,
|
||||
cache_oper->ftruncate = oper->oper.ftruncate;
|
||||
cache_oper->fgetattr = oper->oper.fgetattr;
|
||||
#endif
|
||||
#if FUSE_VERSION >= 29
|
||||
cache_oper->flag_nullpath_ok = oper->oper.flag_nullpath_ok;
|
||||
cache_oper->flag_nopath = oper->oper.flag_nopath;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void cache_fill(struct fuse_cache_operations *oper,
|
||||
@@ -550,6 +552,10 @@ static void cache_fill(struct fuse_cache_operations *oper,
|
||||
cache_oper->ftruncate = oper->oper.ftruncate ? cache_ftruncate : NULL;
|
||||
cache_oper->fgetattr = oper->oper.fgetattr ? cache_fgetattr : NULL;
|
||||
#endif
|
||||
#if FUSE_VERSION >= 29
|
||||
cache_oper->flag_nullpath_ok = 0;
|
||||
cache_oper->flag_nopath = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -575,20 +581,28 @@ struct fuse_operations *cache_init(struct fuse_cache_operations *oper)
|
||||
static const struct fuse_opt cache_opts[] = {
|
||||
{ "cache=yes", offsetof(struct cache, on), 1 },
|
||||
{ "cache=no", offsetof(struct cache, on), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, stat_timeout), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, dir_timeout), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, link_timeout), 0 },
|
||||
{ "cache_stat_timeout=%u", offsetof(struct cache, stat_timeout), 0 },
|
||||
{ "cache_dir_timeout=%u", offsetof(struct cache, dir_timeout), 0 },
|
||||
{ "cache_link_timeout=%u", offsetof(struct cache, link_timeout), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, stat_timeout_secs), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, dir_timeout_secs), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, link_timeout_secs), 0 },
|
||||
{ "cache_stat_timeout=%u", offsetof(struct cache, stat_timeout_secs), 0 },
|
||||
{ "cache_dir_timeout=%u", offsetof(struct cache, dir_timeout_secs), 0 },
|
||||
{ "cache_link_timeout=%u", offsetof(struct cache, link_timeout_secs), 0 },
|
||||
{ "cache_max_size=%u", offsetof(struct cache, max_size), 0 },
|
||||
{ "cache_clean_interval=%u", offsetof(struct cache,
|
||||
clean_interval_secs), 0 },
|
||||
{ "cache_min_clean_interval=%u", offsetof(struct cache,
|
||||
min_clean_interval_secs), 0 },
|
||||
FUSE_OPT_END
|
||||
};
|
||||
|
||||
int cache_parse_options(struct fuse_args *args)
|
||||
{
|
||||
cache.stat_timeout = DEFAULT_CACHE_TIMEOUT;
|
||||
cache.dir_timeout = DEFAULT_CACHE_TIMEOUT;
|
||||
cache.link_timeout = DEFAULT_CACHE_TIMEOUT;
|
||||
cache.stat_timeout_secs = DEFAULT_CACHE_TIMEOUT_SECS;
|
||||
cache.dir_timeout_secs = DEFAULT_CACHE_TIMEOUT_SECS;
|
||||
cache.link_timeout_secs = DEFAULT_CACHE_TIMEOUT_SECS;
|
||||
cache.max_size = DEFAULT_MAX_CACHE_SIZE;
|
||||
cache.clean_interval_secs = DEFAULT_CACHE_CLEAN_INTERVAL_SECS;
|
||||
cache.min_clean_interval_secs = DEFAULT_MIN_CACHE_CLEAN_INTERVAL_SECS;
|
||||
cache.on = 1;
|
||||
|
||||
return fuse_opt_parse(args, &cache, cache_opts, NULL);
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2008 Amit Singh/Google Inc.
|
||||
* Copyright (c) 2012 Anatol Pomozov
|
||||
* Copyright (c) 2011-2013 Benjamin Fleischer
|
||||
*/
|
||||
|
||||
#include "darwin_compat.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Semaphore implementation based on:
|
||||
*
|
||||
* Copyright (C) 2000,02 Free Software Foundation, Inc.
|
||||
* This file is part of the GNU C Library.
|
||||
* Written by Ga<EB>l Le Mignot <address@hidden>
|
||||
*
|
||||
* The GNU C Library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* The GNU C Library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* Semaphores */
|
||||
|
||||
#define __SEM_ID_NONE ((int)0x0)
|
||||
#define __SEM_ID_LOCAL ((int)0xcafef00d)
|
||||
|
||||
/* http://www.opengroup.org/onlinepubs/007908799/xsh/sem_init.html */
|
||||
int
|
||||
darwin_sem_init(darwin_sem_t *sem, int pshared, unsigned int value)
|
||||
{
|
||||
if (pshared) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
sem->id = __SEM_ID_NONE;
|
||||
|
||||
if (pthread_cond_init(&sem->__data.local.count_cond, NULL)) {
|
||||
goto cond_init_fail;
|
||||
}
|
||||
|
||||
if (pthread_mutex_init(&sem->__data.local.count_lock, NULL)) {
|
||||
goto mutex_init_fail;
|
||||
}
|
||||
|
||||
sem->__data.local.count = value;
|
||||
sem->id = __SEM_ID_LOCAL;
|
||||
|
||||
return 0;
|
||||
|
||||
mutex_init_fail:
|
||||
|
||||
pthread_cond_destroy(&sem->__data.local.count_cond);
|
||||
|
||||
cond_init_fail:
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* http://www.opengroup.org/onlinepubs/007908799/xsh/sem_destroy.html */
|
||||
int
|
||||
darwin_sem_destroy(darwin_sem_t *sem)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
pthread_mutex_lock(&sem->__data.local.count_lock);
|
||||
|
||||
sem->id = __SEM_ID_NONE;
|
||||
pthread_cond_broadcast(&sem->__data.local.count_cond);
|
||||
|
||||
if (pthread_cond_destroy(&sem->__data.local.count_cond)) {
|
||||
res = -1;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&sem->__data.local.count_lock);
|
||||
|
||||
if (pthread_mutex_destroy(&sem->__data.local.count_lock)) {
|
||||
res = -1;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
darwin_sem_getvalue(darwin_sem_t *sem, unsigned int *sval)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
pthread_mutex_lock(&sem->__data.local.count_lock);
|
||||
|
||||
if (sem->id != __SEM_ID_LOCAL) {
|
||||
res = -1;
|
||||
errno = EINVAL;
|
||||
} else {
|
||||
*sval = sem->__data.local.count;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&sem->__data.local.count_lock);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/* http://www.opengroup.org/onlinepubs/007908799/xsh/sem_post.html */
|
||||
int
|
||||
darwin_sem_post(darwin_sem_t *sem)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
pthread_mutex_lock(&sem->__data.local.count_lock);
|
||||
|
||||
if (sem->id != __SEM_ID_LOCAL) {
|
||||
res = -1;
|
||||
errno = EINVAL;
|
||||
} else if (sem->__data.local.count < DARWIN_SEM_VALUE_MAX) {
|
||||
sem->__data.local.count++;
|
||||
if (sem->__data.local.count == 1) {
|
||||
pthread_cond_signal(&sem->__data.local.count_cond);
|
||||
}
|
||||
} else {
|
||||
errno = ERANGE;
|
||||
res = -1;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&sem->__data.local.count_lock);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/* http://www.opengroup.org/onlinepubs/009695399/functions/sem_timedwait.html */
|
||||
int
|
||||
darwin_sem_timedwait(darwin_sem_t *sem, const struct timespec *abs_timeout)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
if (abs_timeout &&
|
||||
(abs_timeout->tv_nsec < 0 || abs_timeout->tv_nsec >= 1000000000)) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
pthread_cleanup_push((void(*)(void*))&pthread_mutex_unlock,
|
||||
&sem->__data.local.count_lock);
|
||||
|
||||
pthread_mutex_lock(&sem->__data.local.count_lock);
|
||||
|
||||
if (sem->id != __SEM_ID_LOCAL) {
|
||||
errno = EINVAL;
|
||||
res = -1;
|
||||
} else {
|
||||
if (!sem->__data.local.count) {
|
||||
res = pthread_cond_timedwait(&sem->__data.local.count_cond,
|
||||
&sem->__data.local.count_lock,
|
||||
abs_timeout);
|
||||
}
|
||||
if (res) {
|
||||
assert(res == ETIMEDOUT);
|
||||
res = -1;
|
||||
errno = ETIMEDOUT;
|
||||
} else if (sem->id != __SEM_ID_LOCAL) {
|
||||
res = -1;
|
||||
errno = EINVAL;
|
||||
} else {
|
||||
sem->__data.local.count--;
|
||||
}
|
||||
}
|
||||
|
||||
pthread_cleanup_pop(1);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/* http://www.opengroup.org/onlinepubs/007908799/xsh/sem_trywait.html */
|
||||
int
|
||||
darwin_sem_trywait(darwin_sem_t *sem)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
pthread_mutex_lock(&sem->__data.local.count_lock);
|
||||
|
||||
if (sem->id != __SEM_ID_LOCAL) {
|
||||
res = -1;
|
||||
errno = EINVAL;
|
||||
} else if (sem->__data.local.count) {
|
||||
sem->__data.local.count--;
|
||||
} else {
|
||||
res = -1;
|
||||
errno = EAGAIN;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock (&sem->__data.local.count_lock);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/* http://www.opengroup.org/onlinepubs/007908799/xsh/sem_wait.html */
|
||||
int
|
||||
darwin_sem_wait(darwin_sem_t *sem)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
pthread_cleanup_push((void(*)(void*))&pthread_mutex_unlock,
|
||||
&sem->__data.local.count_lock);
|
||||
|
||||
pthread_mutex_lock(&sem->__data.local.count_lock);
|
||||
|
||||
if (sem->id != __SEM_ID_LOCAL) {
|
||||
errno = EINVAL;
|
||||
res = -1;
|
||||
} else {
|
||||
if (!sem->__data.local.count) {
|
||||
pthread_cond_wait(&sem->__data.local.count_cond,
|
||||
&sem->__data.local.count_lock);
|
||||
if (!sem->__data.local.count) {
|
||||
/* spurious wakeup, assume it is an interruption */
|
||||
res = -1;
|
||||
errno = EINTR;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (sem->id != __SEM_ID_LOCAL) {
|
||||
res = -1;
|
||||
errno = EINVAL;
|
||||
} else {
|
||||
sem->__data.local.count--;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
pthread_cleanup_pop(1);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2008 Amit Singh/Google Inc.
|
||||
* Copyright (c) 2011-2013 Benjamin Fleischer
|
||||
*/
|
||||
|
||||
#ifndef _DARWIN_COMPAT_
|
||||
#define _DARWIN_COMPAT_
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/* Semaphores */
|
||||
|
||||
typedef struct darwin_sem {
|
||||
int id;
|
||||
union {
|
||||
struct
|
||||
{
|
||||
unsigned int count;
|
||||
pthread_mutex_t count_lock;
|
||||
pthread_cond_t count_cond;
|
||||
} local;
|
||||
} __data;
|
||||
} darwin_sem_t;
|
||||
|
||||
#define DARWIN_SEM_VALUE_MAX ((int32_t)32767)
|
||||
|
||||
int darwin_sem_init(darwin_sem_t *sem, int pshared, unsigned int value);
|
||||
int darwin_sem_destroy(darwin_sem_t *sem);
|
||||
int darwin_sem_getvalue(darwin_sem_t *sem, unsigned int *value);
|
||||
int darwin_sem_post(darwin_sem_t *sem);
|
||||
int darwin_sem_timedwait(darwin_sem_t *sem, const struct timespec *abs_timeout);
|
||||
int darwin_sem_trywait(darwin_sem_t *sem);
|
||||
int darwin_sem_wait(darwin_sem_t *sem);
|
||||
|
||||
/* Caller must not include <semaphore.h> */
|
||||
|
||||
typedef darwin_sem_t sem_t;
|
||||
|
||||
#define sem_init(s, p, v) darwin_sem_init(s, p, v)
|
||||
#define sem_destroy(s) darwin_sem_destroy(s)
|
||||
#define sem_getvalue(s, v) darwin_sem_getvalue(s, v)
|
||||
#define sem_post(s) darwin_sem_post(s)
|
||||
#define sem_timedwait(s, t) darwin_sem_timedwait(s, t)
|
||||
#define sem_trywait(s) darwin_sem_trywait(s)
|
||||
#define sem_wait(s) darwin_sem_wait(s)
|
||||
|
||||
#define SEM_VALUE_MAX DARWIN_SEM_VALUE_MAX
|
||||
|
||||
#endif /* _DARWIN_COMPAT_ */
|
||||
+24
-5
@@ -1,5 +1,6 @@
|
||||
AC_INIT(sshfs-fuse, 2.2)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_INIT(sshfs, 2.8)
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
@@ -11,6 +12,12 @@ sshnodelay_libs=$LIBS
|
||||
AC_SUBST(sshnodelay_libs)
|
||||
LIBS=
|
||||
|
||||
case "$target_os" in
|
||||
*linux*) osname=linux;;
|
||||
*darwin*) osname=darwin;;
|
||||
*) osname=unknown;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(sshnodelay,
|
||||
[ --disable-sshnodelay Don't compile NODELAY workaround for ssh])
|
||||
|
||||
@@ -37,16 +44,28 @@ fi
|
||||
AM_CONDITIONAL(SSH_NODELAY_SO, test "$enable_sshnodelay" = "yes")
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
PKG_CHECK_MODULES(SSHFS, [fuse >= 2.2 glib-2.0 gthread-2.0])
|
||||
PKG_CHECK_MODULES([SSHFS], [fuse >= 2.3 glib-2.0 gthread-2.0])
|
||||
have_fuse_opt_parse=no
|
||||
oldlibs="$LIBS"
|
||||
LIBS="$LIBS $SSHFS_LIBS"
|
||||
AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes])
|
||||
LIBS="$oldlibs"
|
||||
if test "$have_fuse_opt_parse" = no; then
|
||||
CFLAGS="$CFLAGS -Icompat"
|
||||
if test "$have_fuse_opt_parse" = no -o "$osname" = darwin; then
|
||||
CFLAGS="$CFLAGS -I${srcdir}/compat"
|
||||
fi
|
||||
AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no)
|
||||
AM_CONDITIONAL(DARWIN_COMPAT, test "$osname" = darwin)
|
||||
|
||||
AC_CHECK_PROG(UNMOUNT_COMMAND, fusermount, fusermount -u, umount)
|
||||
|
||||
# TODO: Figure out why we special-case this in Darwin. Would be nice if
|
||||
# the default setting was consistent across platforms so we wouldn't need
|
||||
# to care about it here.
|
||||
case "$osname" in
|
||||
darwin) IDMAP_DEFAULT=user ;;
|
||||
*) IDMAP_DEFAULT=none ;;
|
||||
esac
|
||||
AC_SUBST(IDMAP_DEFAULT)
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
(
|
||||
echo "See http://fuse.sourceforge.net/wiki/index.php/SshfsFaq for the latest"
|
||||
echo "version of this FAQ"
|
||||
echo "---"
|
||||
echo
|
||||
|
||||
lynx -nolist -dump http://fuse.sourceforge.net/wiki/index.php/SshfsFaq \
|
||||
| sed -e '1,12d' -e '/____/,$d'
|
||||
) > FAQ.txt
|
||||
+52
-12
@@ -7,7 +7,7 @@ SSHFS \- filesystem client based on ssh
|
||||
\fBsshfs\fP [\fIuser\fP@]\fBhost\fP:[\fIdir\fP] \fBmountpoint\fP [\fIoptions\fP]
|
||||
.SS unmounting
|
||||
.TP
|
||||
\fBfusermount -u mountpoint\fP
|
||||
\fB__UNMOUNT_COMMAND__ mountpoint\fP
|
||||
.SH DESCRIPTION
|
||||
SSHFS (Secure SHell FileSystem) is a file system for Linux (and other
|
||||
operating systems with a FUSE implementation, such as Mac OS X or FreeBSD)
|
||||
@@ -18,6 +18,9 @@ Userspace) kernel module. The practical effect of this is that the end user
|
||||
can seamlessly interact with remote files being securely served over SSH
|
||||
just as if they were local files on his/her computer. On the remote
|
||||
computer the SFTP subsystem of SSH is used.
|
||||
.PP
|
||||
If \fIhost\fP is a numeric IPv6 address, it needs to be enclosed in
|
||||
square brackets.
|
||||
.SH OPTIONS
|
||||
.SS "general options:"
|
||||
.TP
|
||||
@@ -46,16 +49,22 @@ equivalent to '\-o ssh_protocol=1'
|
||||
\fB\-o\fR reconnect
|
||||
reconnect to server
|
||||
.TP
|
||||
\fB\-o\fR delay_connect
|
||||
delay connection to server
|
||||
.TP
|
||||
\fB\-o\fR sshfs_sync
|
||||
synchronous writes
|
||||
.TP
|
||||
\fB\-o\fR no_readahead
|
||||
synchronous reads (no speculative readahead)
|
||||
.TP
|
||||
\fB\-o\fR sync_readdir
|
||||
synchronous readdir
|
||||
.TP
|
||||
\fB\-o\fR sshfs_debug
|
||||
print some debugging information
|
||||
.TP
|
||||
\fB\-o\fR cache=YESNO
|
||||
\fB\-o\fR cache=BOOL
|
||||
enable caching {yes,no} (default: yes)
|
||||
.TP
|
||||
\fB\-o\fR cache_timeout=N
|
||||
@@ -88,14 +97,37 @@ fix buffer fillup bug in server (default: on)
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR idmap=TYPE
|
||||
user/group ID mapping, possible types are:
|
||||
user/group ID mapping (default: __IDMAP_DEFAULT__)
|
||||
.RS 8
|
||||
.TP
|
||||
none
|
||||
no translation of the ID space (default)
|
||||
no translation of the ID space
|
||||
.TP
|
||||
user
|
||||
only translate UID of connecting user
|
||||
only translate UID/GID of connecting user
|
||||
.TP
|
||||
file
|
||||
translate UIDs/GIDs based upon the contents of \fBuidfile \fR and
|
||||
\fBgidfile\fR
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR uidfile=FILE
|
||||
file containing username:uid mappings for \fBidmap=file\fR
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR gidfile=FILE
|
||||
file containing groupname:gid mappings for \fBidmap=file\fR
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR nomap=TYPE
|
||||
with idmap=file, how to handle missing mappings
|
||||
.RS 8
|
||||
.TP
|
||||
ignore
|
||||
don't do any re-mapping
|
||||
.TP
|
||||
error
|
||||
return an error (default)
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR ssh_command=CMD
|
||||
@@ -109,6 +141,16 @@ path to sftp server or subsystem (default: sftp)
|
||||
.TP
|
||||
\fB\-o\fR directport=PORT
|
||||
directly connect to PORT bypassing ssh
|
||||
\fB\-o\fR slave
|
||||
communicate over stdin and stdout bypassing network
|
||||
.TP
|
||||
\fB\-o\fR slave
|
||||
communicate over stdin and stdout bypassing network
|
||||
.TP
|
||||
\fB\-o\fR disable_hardlink
|
||||
link(2) will return with errno set to ENOSYS. Hard links don't currently work
|
||||
perfectly on sshfs, and this confuses some programs. If that happens try
|
||||
disabling hard links with this option.
|
||||
.TP
|
||||
\fB\-o\fR transform_symlinks
|
||||
transform absolute symlinks to relative
|
||||
@@ -144,7 +186,7 @@ allow access to root
|
||||
\fB\-o\fR nonempty
|
||||
allow mounts over non\-empty file/dir
|
||||
.HP
|
||||
\fB\-o\fR default_permissions
|
||||
\fB\-o\fR default_permissions
|
||||
enable permission checking by kernel
|
||||
.TP
|
||||
\fB\-o\fR fsname=NAME
|
||||
@@ -219,15 +261,15 @@ perform reads asynchronously (default)
|
||||
\fB\-o\fR sync_read
|
||||
perform reads synchronously
|
||||
.SS "Module options:"
|
||||
.TP
|
||||
.TP
|
||||
[subdir]
|
||||
.TP
|
||||
\fB\-o\fR subdir=DIR
|
||||
prepend this directory to all paths (mandatory)
|
||||
.TP
|
||||
\fB\-o\fR [no]rellinksa
|
||||
\fB\-o\fR [no]rellinks
|
||||
transform absolute symlinks to relative
|
||||
.TP
|
||||
.TP
|
||||
[iconv]
|
||||
.TP
|
||||
\fB\-o\fR from_code=CHARSET
|
||||
@@ -238,9 +280,7 @@ new encoding of the file names (default: ISO-8859-2)
|
||||
.PD
|
||||
.SH "AUTHORS"
|
||||
.LP
|
||||
SSHFS has been written by Miklos Seredi <miklos@szeredi.hu>.
|
||||
SSHFS has been written by Miklos Szeredi <miklos@szeredi.hu>.
|
||||
.LP
|
||||
This man page was written by Bartosz Fenski <fenio@debian.org> for the
|
||||
Debian GNU/Linux distribution (but it may be used by others).
|
||||
|
||||
|
||||
+45
-4
@@ -5,14 +5,55 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
int connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
|
||||
/* Wrapper around connect(2) to explicitly set TCP_NODELAY. */
|
||||
static int nodelay_connect(
|
||||
int (*real_connect)(int, const struct sockaddr *, socklen_t),
|
||||
int sock, const struct sockaddr *addr, socklen_t addrlen)
|
||||
{
|
||||
int (*next_connect)(int, const struct sockaddr *, socklen_t) =
|
||||
dlsym(RTLD_NEXT, "connect");
|
||||
int res = next_connect(sock, addr, addrlen);
|
||||
int res = real_connect(sock, addr, addrlen);
|
||||
if (!res && addr->sa_family == AF_INET) {
|
||||
int opt = 1;
|
||||
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
|
||||
/* OS X does not have LD_PRELOAD but has DYLD_INSERT_LIBRARIES. The right
|
||||
* environment variable is set by sshfs.c when attempting to load the
|
||||
* sshnodelay workaround.
|
||||
*
|
||||
* However, things are not that simple: DYLD_INSERT_LIBRARIES does not
|
||||
* behave exactly like LD_PRELOAD. Instead, the dyld dynamic linker will
|
||||
* look for __DATA __interpose sections on the libraries given via the
|
||||
* DYLD_INSERT_LIBRARIES variable. The contents of this section are pairs
|
||||
* of replacement functions and functions to be replaced, respectively.
|
||||
* Prepare such section here. */
|
||||
|
||||
int custom_connect(int sock, const struct sockaddr *addr, socklen_t addrlen);
|
||||
|
||||
typedef struct interpose_s {
|
||||
void *new_func;
|
||||
void *orig_func;
|
||||
} interpose_t;
|
||||
|
||||
static const interpose_t interposers[] \
|
||||
__attribute__ ((section("__DATA, __interpose"))) = {
|
||||
{ (void *)custom_connect, (void *)connect },
|
||||
};
|
||||
|
||||
int custom_connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
|
||||
{
|
||||
return nodelay_connect(connect, sock, addr, addrlen);
|
||||
}
|
||||
|
||||
#else /* !__APPLE__ */
|
||||
|
||||
int connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
|
||||
{
|
||||
return nodelay_connect(dlsym(RTLD_NEXT, "connect"),
|
||||
sock, addr, addrlen);
|
||||
}
|
||||
|
||||
#endif /* !__APPLE__ */
|
||||
|
||||
Reference in New Issue
Block a user