diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2010-04-28 08:59:12 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2010-04-28 08:59:12 +0000 |
commit | b1b0c4b6f58d278360243705cc1e67522ef23423 (patch) | |
tree | dc0d5243d102021a80018837dccdced49c65e422 | |
parent | f018ac3b1cf51ec3bf5d47f89f9dab3809cd2709 (diff) | |
download | sshfs-b1b0c4b6f58d278360243705cc1e67522ef23423.tar sshfs-b1b0c4b6f58d278360243705cc1e67522ef23423.tar.gz sshfs-b1b0c4b6f58d278360243705cc1e67522ef23423.tar.bz2 sshfs-b1b0c4b6f58d278360243705cc1e67522ef23423.zip |
* Set FD_CLOEXEC on fuse device. This prevents deadlocks that
happen in some circumstances (bugzilla.kernel.org #12864).
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | sshfs.1 | 5 | ||||
-rw-r--r-- | sshfs.c | 18 |
4 files changed, 25 insertions, 10 deletions
@@ -1,4 +1,10 @@ -2008-07-15 Miklos Szeredi <miklos@szeredi.hu> +2010-03-16 Miklos Szeredi <miklos@szeredi.hu> + + * Set FD_CLOEXEC on fuse device. This prevents deadlocks that + happen in some circumstances (bugzilla.kernel.org #12864). + Reported by Tim Connors + +2009-07-15 Miklos Szeredi <miklos@szeredi.hu> * Check mountpoint and fuse options before starting an ssh session (debian bug #535333). This is only supported if compiled @@ -10,7 +16,7 @@ * Allow mounting a single non-directory from the server -2008-07-15 Sebastian Dransfeld <sebastid@tango.flipp.net> +2009-07-15 Sebastian Dransfeld <sebastid@tango.flipp.net> * Add option 'delay_connect': This will always create the sshfs mount, even if the connection to the server can't be established. diff --git a/configure.ac b/configure.ac index ac69a38..1cf48b3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(sshfs-fuse, 2.2) +AC_INIT(sshfs-fuse, 2.3) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) @@ -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 @@ -241,7 +244,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). @@ -11,6 +11,7 @@ #include <fuse.h> #include <fuse_opt.h> +#include <fuse_lowlevel.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> @@ -3341,6 +3342,10 @@ int main(int argc, char *argv[]) if (!ch) exit(1); + res = fcntl(fuse_chan_fd(ch), F_SETFD, FD_CLOEXEC); + if (res == -1) + perror("WARNING: failed to set FD_CLOESEC on fuse device"); + fuse = fuse_new(ch, &args, cache_init(&sshfs_oper), sizeof(struct fuse_operations), NULL); if (fuse == NULL) { @@ -3348,19 +3353,20 @@ int main(int argc, char *argv[]) exit(1); } - res = fuse_daemonize(foreground); - if (res != -1) - res = fuse_set_signal_handlers(fuse_get_session(fuse)); - + res = ssh_connect(); if (res == -1) { fuse_unmount(mountpoint, ch); fuse_destroy(fuse); exit(1); } - res = ssh_connect(); + res = fuse_daemonize(foreground); + if (res != -1) + res = fuse_set_signal_handlers(fuse_get_session(fuse)); + if (res == -1) { - fuse_teardown(fuse, mountpoint); + fuse_unmount(mountpoint, ch); + fuse_destroy(fuse); exit(1); } |