Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1af7516f1e | |||
| 15f911853e | |||
| eff1631428 | |||
| 4399cfca84 | |||
| dd258a5117 | |||
| feeaf76340 | |||
| b3ffcfe3ac | |||
| d045a9be5e | |||
| 09d5ee2eee | |||
| b917f9a420 | |||
| 2d2ad5176a | |||
| 006aa04ff4 | |||
| 4046be4487 | |||
| d8c313ff85 | |||
| 666119d285 | |||
| f3e8d58bd7 | |||
| 326ff7f97e | |||
| 7f4eaea507 | |||
| 57fc3f4b6a | |||
| b436754a11 | |||
| e277fe1ca2 | |||
| c9c9e9dfbd | |||
| 3cfb3a6dab | |||
| 790bb8dd36 | |||
| accc218cdb | |||
| 8468900705 | |||
| b60a970602 | |||
| 27c1b7b09d | |||
| 6f0233e11e | |||
| 89da93d07e | |||
| cb4239036a | |||
| 40393a4b0b | |||
| a6e0d2ddd9 | |||
| 1cb9aba6ea | |||
| 3883b4eb0c | |||
| f1f738d5b8 | |||
| d2a3ed327e | |||
| cd6a924cdc |
@@ -1,6 +1,7 @@
|
||||
.deps
|
||||
COPYING
|
||||
INSTALL
|
||||
FAQ.txt
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
|
||||
@@ -1,3 +1,173 @@
|
||||
2007-05-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Released 1.8
|
||||
|
||||
2007-05-15 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* 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
|
||||
|
||||
+22
-3
@@ -2,9 +2,28 @@
|
||||
|
||||
bin_PROGRAMS = sshfs
|
||||
|
||||
sshfs_SOURCES = sshfs.c cache.c cache.h
|
||||
if FUSE_OPT_COMPAT
|
||||
compat_sources = compat/fuse_opt.c compat/fuse_opt.h
|
||||
sshfs_SOURCES += compat/fuse_opt.c compat/fuse_opt.h
|
||||
endif
|
||||
|
||||
sshfs_SOURCES = sshfs.c cache.c cache.h $(compat_sources)
|
||||
sshfs_CPPFLAGS = -DFUSE_USE_VERSION=25
|
||||
sshfs_LDADD = $(SSHFS_LIBS)
|
||||
sshfs_CFLAGS = $(SSHFS_CFLAGS)
|
||||
sshfs_CPPFLAGS = -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"$(libdir)\"
|
||||
|
||||
EXTRA_DIST = sshnodelay.c FAQ.txt
|
||||
CLEANFILES = sshnodelay.so
|
||||
|
||||
if SSH_NODELAY_SO
|
||||
all-local: sshnodelay.so
|
||||
|
||||
install-exec-local: sshnodelay.so
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
$(INSTALL) -m 755 sshnodelay.so "$(DESTDIR)$(libdir)/sshnodelay.so"
|
||||
|
||||
uninstall-local:
|
||||
rm -f "$(DESTDIR)$(libdir)/sshnodelay.so"
|
||||
|
||||
sshnodelay.so:
|
||||
$(CC) -Wall -W -s --shared -fPIC $(sshnodelay_libs) sshnodelay.c -o sshnodelay.so
|
||||
endif
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
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
|
||||
------------------
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ static void cache_purge_parent(const char *path)
|
||||
}
|
||||
}
|
||||
|
||||
static void cache_invalidate(const char *path)
|
||||
void cache_invalidate(const char *path)
|
||||
{
|
||||
pthread_mutex_lock(&cache.lock);
|
||||
cache_purge(path);
|
||||
@@ -116,9 +116,20 @@ static void cache_invalidate_dir(const char *path)
|
||||
pthread_mutex_unlock(&cache.lock);
|
||||
}
|
||||
|
||||
static int cache_del_children(const char *key, void *val_, const char *path)
|
||||
{
|
||||
(void) val_;
|
||||
if (strncmp(key, path, strlen(path)) == 0)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void cache_do_rename(const char *from, const char *to)
|
||||
{
|
||||
pthread_mutex_lock(&cache.lock);
|
||||
g_hash_table_foreach_remove(cache.table, (GHRFunc) cache_del_children,
|
||||
(char *) from);
|
||||
cache_purge(from);
|
||||
cache_purge(to);
|
||||
cache_purge_parent(from);
|
||||
@@ -137,7 +148,7 @@ static struct node *cache_get(const char *path)
|
||||
return node;
|
||||
}
|
||||
|
||||
static void cache_add_attr(const char *path, const struct stat *stbuf)
|
||||
void cache_add_attr(const char *path, const struct stat *stbuf)
|
||||
{
|
||||
struct node *node;
|
||||
time_t now;
|
||||
@@ -251,11 +262,13 @@ static int cache_dirfill(fuse_cache_dirh_t ch, const char *name,
|
||||
{
|
||||
int err = ch->filler(ch->h, name, 0, 0);
|
||||
if (!err) {
|
||||
char *fullpath;
|
||||
g_ptr_array_add(ch->dir, g_strdup(name));
|
||||
fullpath = g_strdup_printf("%s/%s", !ch->path[1] ? "" : ch->path, name);
|
||||
cache_add_attr(fullpath, stbuf);
|
||||
g_free(fullpath);
|
||||
if (stbuf->st_mode & S_IFMT) {
|
||||
char *fullpath =
|
||||
g_strdup_printf("%s/%s", !ch->path[1] ? "" : ch->path, name);
|
||||
cache_add_attr(fullpath, stbuf);
|
||||
g_free(fullpath);
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -24,3 +24,5 @@ struct fuse_cache_operations {
|
||||
|
||||
struct fuse_operations *cache_init(struct fuse_cache_operations *oper);
|
||||
int cache_parse_options(struct fuse_args *args);
|
||||
void cache_add_attr(const char *path, const struct stat *stbuf);
|
||||
void cache_invalidate(const char *path);
|
||||
|
||||
+30
-25
@@ -62,6 +62,21 @@ int fuse_opt_add_arg(struct fuse_args *args, const char *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg)
|
||||
{
|
||||
assert(pos <= args->argc);
|
||||
if (fuse_opt_add_arg(args, arg) == -1)
|
||||
return -1;
|
||||
|
||||
if (pos != args->argc - 1) {
|
||||
char *newarg = args->argv[args->argc - 1];
|
||||
memmove(&args->argv[pos + 1], &args->argv[pos],
|
||||
sizeof(char *) * (args->argc - pos - 1));
|
||||
args->argv[pos] = newarg;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int next_arg(struct fuse_opt_context *ctx, const char *opt)
|
||||
{
|
||||
if (ctx->argctr + 1 >= ctx->argc) {
|
||||
@@ -102,25 +117,13 @@ static int add_opt(struct fuse_opt_context *ctx, const char *opt)
|
||||
return fuse_opt_add_opt(&ctx->opts, opt);
|
||||
}
|
||||
|
||||
static int insert_arg(struct fuse_opt_context *ctx, int pos, const char *arg)
|
||||
{
|
||||
assert(pos <= ctx->outargs.argc);
|
||||
if (add_arg(ctx, arg) == -1)
|
||||
return -1;
|
||||
|
||||
if (pos != ctx->outargs.argc - 1) {
|
||||
char *newarg = ctx->outargs.argv[ctx->outargs.argc - 1];
|
||||
memmove(&ctx->outargs.argv[pos + 1], &ctx->outargs.argv[pos],
|
||||
sizeof(char *) * (ctx->outargs.argc - pos - 1));
|
||||
ctx->outargs.argv[pos] = newarg;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int call_proc(struct fuse_opt_context *ctx, const char *arg, int key,
|
||||
int iso)
|
||||
{
|
||||
if (ctx->proc) {
|
||||
if (key == FUSE_OPT_KEY_DISCARD)
|
||||
return 0;
|
||||
|
||||
if (key != FUSE_OPT_KEY_KEEP && ctx->proc) {
|
||||
int res = ctx->proc(ctx->data, arg, key, &ctx->outargs);
|
||||
if (res == -1 || !res)
|
||||
return res;
|
||||
@@ -155,8 +158,8 @@ static int match_template(const char *t, const char *arg, unsigned *sepp)
|
||||
static const struct fuse_opt *find_opt(const struct fuse_opt *opt,
|
||||
const char *arg, unsigned *sepp)
|
||||
{
|
||||
for (; opt && opt->template; opt++)
|
||||
if (match_template(opt->template, arg, sepp))
|
||||
for (; opt && opt->templ; opt++)
|
||||
if (match_template(opt->templ, arg, sepp))
|
||||
return opt;
|
||||
return NULL;
|
||||
}
|
||||
@@ -195,11 +198,11 @@ static int process_opt(struct fuse_opt_context *ctx,
|
||||
return -1;
|
||||
} else {
|
||||
void *var = ctx->data + opt->offset;
|
||||
if (sep && opt->template[sep + 1]) {
|
||||
if (sep && opt->templ[sep + 1]) {
|
||||
const char *param = arg + sep;
|
||||
if (opt->template[sep] == '=')
|
||||
if (opt->templ[sep] == '=')
|
||||
param ++;
|
||||
if (process_opt_param(var, opt->template + sep + 1,
|
||||
if (process_opt_param(var, opt->templ + sep + 1,
|
||||
param, arg) == -1)
|
||||
return -1;
|
||||
} else
|
||||
@@ -239,7 +242,7 @@ static int process_gopt(struct fuse_opt_context *ctx, const char *arg, int iso)
|
||||
if (opt) {
|
||||
for (; opt; opt = find_opt(opt + 1, arg, &sep)) {
|
||||
int res;
|
||||
if (sep && opt->template[sep] == ' ' && !arg[sep])
|
||||
if (sep && opt->templ[sep] == ' ' && !arg[sep])
|
||||
res = process_opt_sep_arg(ctx, opt, sep, arg, iso);
|
||||
else
|
||||
res = process_opt(ctx, opt, sep, arg, iso);
|
||||
@@ -321,12 +324,14 @@ static int opt_parse(struct fuse_opt_context *ctx)
|
||||
return -1;
|
||||
|
||||
if (ctx->opts) {
|
||||
if (insert_arg(ctx, 1, "-o") == -1 ||
|
||||
insert_arg(ctx, 2, ctx->opts) == -1)
|
||||
if (fuse_opt_insert_arg(&ctx->outargs, 1, "-o") == -1 ||
|
||||
fuse_opt_insert_arg(&ctx->outargs, 2, ctx->opts) == -1)
|
||||
return -1;
|
||||
}
|
||||
if (ctx->nonopt && ctx->nonopt == ctx->outargs.argc)
|
||||
if (ctx->nonopt && ctx->nonopt == ctx->outargs.argc) {
|
||||
free(ctx->outargs.argv[ctx->outargs.argc - 1]);
|
||||
ctx->outargs.argv[--ctx->outargs.argc] = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+36
-5
@@ -72,7 +72,7 @@ extern "C" {
|
||||
*/
|
||||
struct fuse_opt {
|
||||
/** Matching template and optional parameter formatting */
|
||||
const char *template;
|
||||
const char *templ;
|
||||
|
||||
/**
|
||||
* Offset of variable within 'data' parameter of fuse_opt_parse()
|
||||
@@ -82,7 +82,7 @@ struct fuse_opt {
|
||||
|
||||
/**
|
||||
* Value to set the variable to, or to be passed as 'key' to the
|
||||
* processing function. Ignored if template a format
|
||||
* processing function. Ignored if template has a format
|
||||
*/
|
||||
int value;
|
||||
};
|
||||
@@ -91,13 +91,13 @@ struct fuse_opt {
|
||||
* Key option. In case of a match, the processing function will be
|
||||
* called with the specified key.
|
||||
*/
|
||||
#define FUSE_OPT_KEY(template, key) { template, -1U, key }
|
||||
#define FUSE_OPT_KEY(templ, key) { templ, -1U, key }
|
||||
|
||||
/**
|
||||
* Last option. An array of 'struct fuse_opt' must end with a NULL
|
||||
* template value
|
||||
*/
|
||||
#define FUSE_OPT_END { .template = NULL }
|
||||
#define FUSE_OPT_END { .templ = NULL }
|
||||
|
||||
/**
|
||||
* Argument list
|
||||
@@ -120,7 +120,7 @@ struct fuse_args {
|
||||
|
||||
/**
|
||||
* Key value passed to the processing function if an option did not
|
||||
* match any templated
|
||||
* match any template
|
||||
*/
|
||||
#define FUSE_OPT_KEY_OPT -1
|
||||
|
||||
@@ -132,6 +132,22 @@ struct fuse_args {
|
||||
*/
|
||||
#define FUSE_OPT_KEY_NONOPT -2
|
||||
|
||||
/**
|
||||
* Special key value for options to keep
|
||||
*
|
||||
* Argument is not passed to processing function, but behave as if the
|
||||
* processing function returned 1
|
||||
*/
|
||||
#define FUSE_OPT_KEY_KEEP -3
|
||||
|
||||
/**
|
||||
* Special key value for options to discard
|
||||
*
|
||||
* Argument is not passed to processing function, but behave as if the
|
||||
* processing function returned zero
|
||||
*/
|
||||
#define FUSE_OPT_KEY_DISCARD -4
|
||||
|
||||
/**
|
||||
* Processing function
|
||||
*
|
||||
@@ -201,6 +217,21 @@ int fuse_opt_add_opt(char **opts, const char *opt);
|
||||
*/
|
||||
int fuse_opt_add_arg(struct fuse_args *args, const char *arg);
|
||||
|
||||
/**
|
||||
* Add an argument at the specified position in a NULL terminated
|
||||
* argument vector
|
||||
*
|
||||
* Adds the argument to the N-th position. This is useful for adding
|
||||
* options at the beggining of the array which must not come after the
|
||||
* special '--' option.
|
||||
*
|
||||
* @param args is the structure containing the current argument list
|
||||
* @param pos is the position at which to add the argument
|
||||
* @param arg is the new argument to add
|
||||
* @return -1 on allocation error, 0 on success
|
||||
*/
|
||||
int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg);
|
||||
|
||||
/**
|
||||
* Free the contents of argument list
|
||||
*
|
||||
|
||||
+18
-4
@@ -1,12 +1,26 @@
|
||||
AC_INIT(sshfs-fuse, 1.4)
|
||||
AC_INIT(sshfs-fuse, 1.8)
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
CFLAGS="$CFLAGS -Wall -W"
|
||||
LIBS=
|
||||
AC_SEARCH_LIBS(dlsym, [dl])
|
||||
sshnodelay_libs=$LIBS
|
||||
AC_SUBST(sshnodelay_libs)
|
||||
LIBS=
|
||||
|
||||
AC_ARG_ENABLE(sshnodelay,
|
||||
[ --disable-sshnodelay Don't compile NODELAY workaround for ssh])
|
||||
|
||||
if test "$enable_sshnodelay" != "no"; then
|
||||
AC_DEFINE(SSH_NODELAY_WORKAROUND, 1, [Compile ssh NODELAY workaround])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(SSH_NODELAY_SO, test "$enable_sshnodelay" != "no")
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
PKG_CHECK_MODULES(SSHFS, [fuse >= 2.2 glib-2.0])
|
||||
CFLAGS="$CFLAGS -Wall -W -D_REENTRANT $SSHFS_CFLAGS"
|
||||
LIBS="$SSHFS_LIBS"
|
||||
PKG_CHECK_MODULES(SSHFS, [fuse >= 2.2 glib-2.0 gthread-2.0])
|
||||
have_fuse_opt_parse=no
|
||||
AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes])
|
||||
if test "$have_fuse_opt_parse" = no; then
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#! /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
|
||||
@@ -0,0 +1,18 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <dlfcn.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
int connect(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);
|
||||
if (!res && addr->sa_family == AF_INET) {
|
||||
int opt = 1;
|
||||
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
Reference in New Issue
Block a user