commit: 28e4786f06f2468b0fc304daed245bf908f2ae0e
parent b62a42b67fdb29b449b10601618dc53847c19024
Author: Michael Forney <mforney@mforney.org>
Date: Thu, 21 Sep 2017 22:30:20 -0700
sshfs: Update to 3.3.0
Diffstat:
9 files changed, 358 insertions(+), 51 deletions(-)
diff --git a/pkg/sshfs/config.h b/pkg/sshfs/config.h
@@ -1,2 +1,2 @@
#define IDMAP_DEFAULT "none"
-#define PACKAGE_VERSION "3.2.0"
+#define PACKAGE_VERSION "3.3.0"
diff --git a/pkg/sshfs/gen.lua b/pkg/sshfs/gen.lua
@@ -4,17 +4,10 @@ cflags{
'-I pkg/libfuse/src/include',
}
-build('sed', '$outdir/sshfs.1', '$srcdir/sshfs.1.in', {
- expr={
- [[-e 's,@UNMOUNT_COMMAND@,fusermount3 -u,']],
- [[-e 's,@IDMAP_DEFAULT@,"none",']],
- },
-})
-
exe('sshfs', {
'sshfs.c', 'nocache.c', '$builddir/pkg/libfuse/libfuse.a',
}, {'$builddir/pkg/libfuse/fetch.stamp'})
file('bin/sshfs', '755', '$outdir/sshfs')
-man{'$outdir/sshfs.1'}
+man{'$dir/sshfs.1'}
fetch 'git'
diff --git a/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch b/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch
@@ -1,4 +1,4 @@
-From bc0f086e2d95b79c6061ea8894c57a5b5350bd4d Mon Sep 17 00:00:00 2001
+From 62e87ccce46212f06297e92b7dbe56427a80b864 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 17:25:36 -0700
Subject: [PATCH] Use a compact array and free list for requests
@@ -8,7 +8,7 @@ Subject: [PATCH] Use a compact array and free list for requests
1 file changed, 80 insertions(+), 45 deletions(-)
diff --git a/sshfs.c b/sshfs.c
-index a76ae8a..7078618 100644
+index 50ec384..ac0b889 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -171,6 +171,17 @@ struct request {
@@ -29,7 +29,7 @@ index a76ae8a..7078618 100644
struct sshfs_io {
int num_reqs;
pthread_cond_t finished;
-@@ -250,7 +261,7 @@ struct sshfs {
+@@ -249,7 +260,7 @@ struct sshfs {
int slave;
char *host;
char *base_path;
@@ -220,7 +220,7 @@ index a76ae8a..7078618 100644
fprintf(stderr, "bad reply ID\n");
goto out;
}
-@@ -1821,7 +1861,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
+@@ -1817,7 +1857,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
struct request **reqp)
{
int err;
@@ -228,7 +228,7 @@ index a76ae8a..7078618 100644
struct request *req = g_new0(struct request, 1);
req->want_reply = want_reply;
-@@ -1832,8 +1871,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
+@@ -1828,8 +1867,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
pthread_mutex_lock(&sshfs.lock);
if (begin_func)
begin_func(req);
@@ -237,7 +237,7 @@ index a76ae8a..7078618 100644
err = start_processing_thread();
if (err) {
pthread_mutex_unlock(&sshfs.lock);
-@@ -1844,21 +1881,24 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
+@@ -1840,21 +1877,24 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
while (sshfs.outstanding_len > sshfs.max_outstanding_len)
pthread_cond_wait(&sshfs.outstanding_cond, &sshfs.lock);
@@ -266,7 +266,7 @@ index a76ae8a..7078618 100644
pthread_mutex_unlock(&sshfs.lock);
if (!rmed && !want_reply) {
-@@ -2031,7 +2071,7 @@ static int sftp_readdir_send(struct request **req, struct buffer *handle)
+@@ -2027,7 +2067,7 @@ static int sftp_readdir_send(struct request **req, struct buffer *handle)
static int sshfs_req_pending(struct request *req)
{
@@ -275,7 +275,7 @@ index a76ae8a..7078618 100644
return 1;
else
return 0;
-@@ -3308,11 +3348,6 @@ static int processing_init(void)
+@@ -3286,11 +3326,6 @@ static int processing_init(void)
pthread_mutex_init(&sshfs.lock, NULL);
pthread_mutex_init(&sshfs.lock_write, NULL);
pthread_cond_init(&sshfs.outstanding_cond, NULL);
diff --git a/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch b/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch
@@ -1,4 +1,4 @@
-From 57729cac91c4ccccec2a98c7589bdacc6220f232 Mon Sep 17 00:00:00 2001
+From 7005f705fb992abcd511465339b819ca93ec6f84 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 17:28:40 -0700
Subject: [PATCH] Use bool instead of gboolean
@@ -8,7 +8,7 @@ Subject: [PATCH] Use bool instead of gboolean
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sshfs.c b/sshfs.c
-index 7078618..9e86ec0 100644
+index ac0b889..30013ab 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -18,6 +18,7 @@
@@ -19,7 +19,7 @@ index 7078618..9e86ec0 100644
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-@@ -1893,7 +1894,7 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
+@@ -1889,7 +1890,7 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
err = -EIO;
if (sftp_send_iov(type, req->id, iov, count) == -1) {
diff --git a/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch b/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch
@@ -1,4 +1,4 @@
-From c9574c7ceb8195007bd3dde81dc06438beaf4f69 Mon Sep 17 00:00:00 2001
+From 4fb86974c0713baf526ad9a7ea2cf8a7666d9045 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 17:30:20 -0700
Subject: [PATCH] Use struct list_head instead of GList
@@ -8,10 +8,10 @@ Subject: [PATCH] Use struct list_head instead of GList
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/sshfs.c b/sshfs.c
-index 9e86ec0..4a01e4b 100644
+index 30013ab..9cb3965 100644
--- a/sshfs.c
+++ b/sshfs.c
-@@ -2081,14 +2081,14 @@ static int sshfs_req_pending(struct request *req)
+@@ -2077,14 +2077,14 @@ static int sshfs_req_pending(struct request *req)
static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
fuse_fill_dir_t filler)
{
@@ -29,7 +29,7 @@ index 9e86ec0..4a01e4b 100644
while (!done || outstanding) {
struct request *req;
struct buffer name;
-@@ -2103,16 +2103,14 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
+@@ -2099,16 +2099,14 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
break;
}
@@ -49,7 +49,7 @@ index 9e86ec0..4a01e4b 100644
outstanding--;
if (done) {
-@@ -2151,7 +2149,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
+@@ -2147,7 +2145,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
}
}
}
diff --git a/pkg/sshfs/patch/0005-Use-standard-C-functions.patch b/pkg/sshfs/patch/0005-Use-standard-C-functions.patch
@@ -1,4 +1,4 @@
-From 088c5b6b0fa85da8fdb8490f8a587631967488ad Mon Sep 17 00:00:00 2001
+From 85a40a85e9847621bd808833997517e35ee42e26 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 17:42:29 -0700
Subject: [PATCH] Use standard C functions
@@ -8,7 +8,7 @@ Subject: [PATCH] Use standard C functions
1 file changed, 55 insertions(+), 36 deletions(-)
diff --git a/sshfs.c b/sshfs.c
-index 4a01e4b..3f03640 100644
+index 9cb3965..2087f71 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -654,25 +654,25 @@ static inline void buf_add_path(struct buffer *buf, const char *path)
@@ -68,7 +68,7 @@ index 4a01e4b..3f03640 100644
}
static void chunk_put(struct read_chunk *chunk)
-@@ -1862,8 +1862,10 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
+@@ -1858,8 +1858,10 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
struct request **reqp)
{
int err;
@@ -80,7 +80,7 @@ index 4a01e4b..3f03640 100644
req->want_reply = want_reply;
req->end_func = end_func;
req->data = data;
-@@ -2579,8 +2581,10 @@ static int sshfs_open_common(const char *path, mode_t mode,
+@@ -2557,8 +2559,10 @@ static int sshfs_open_common(const char *path, mode_t mode,
if (fi->flags & O_APPEND)
pflags |= SSH_FXF_APPEND;
@@ -93,7 +93,7 @@ index 4a01e4b..3f03640 100644
list_init(&sf->write_reqs);
pthread_cond_init(&sf->write_finished, NULL);
/* Assume random read after open */
-@@ -2624,7 +2628,7 @@ static int sshfs_open_common(const char *path, mode_t mode,
+@@ -2602,7 +2606,7 @@ static int sshfs_open_common(const char *path, mode_t mode,
} else {
if (sshfs.dir_cache)
cache_invalidate(path);
@@ -102,7 +102,7 @@ index 4a01e4b..3f03640 100644
}
buf_free(&buf);
return err;
-@@ -2691,7 +2695,7 @@ static void sshfs_file_put(struct sshfs_file *sf)
+@@ -2669,7 +2673,7 @@ static void sshfs_file_put(struct sshfs_file *sf)
{
sf->refs--;
if (!sf->refs)
@@ -111,7 +111,7 @@ index 4a01e4b..3f03640 100644
}
static void sshfs_file_get(struct sshfs_file *sf)
-@@ -2761,9 +2765,11 @@ static void sshfs_read_begin(struct request *req)
+@@ -2739,9 +2743,11 @@ static void sshfs_read_begin(struct request *req)
static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size,
off_t offset)
{
@@ -124,7 +124,7 @@ index 4a01e4b..3f03640 100644
pthread_cond_init(&chunk->sio.finished, NULL);
list_init(&chunk->reqs);
chunk->size = size;
-@@ -2777,7 +2783,9 @@ static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size,
+@@ -2755,7 +2761,9 @@ static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size,
struct read_req *rreq;
size_t bsize = size < sshfs.max_read ? size : sshfs.max_read;
@@ -135,7 +135,7 @@ index 4a01e4b..3f03640 100644
rreq->sio = &chunk->sio;
rreq->size = bsize;
buf_init(&rreq->data, 0);
-@@ -2848,7 +2856,7 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size)
+@@ -2826,7 +2834,7 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size)
size -= rreq->res;
list_del(&rreq->list);
buf_free(&rreq->data);
@@ -144,7 +144,7 @@ index 4a01e4b..3f03640 100644
}
}
-@@ -3468,9 +3476,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
+@@ -3444,9 +3452,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
switch (key) {
case FUSE_OPT_KEY_OPT:
if (is_ssh_opt(arg)) {
@@ -157,7 +157,7 @@ index 4a01e4b..3f03640 100644
return 0;
}
/* Pass through */
-@@ -3495,9 +3504,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
+@@ -3471,9 +3480,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
case KEY_PORT:
@@ -170,7 +170,7 @@ index 4a01e4b..3f03640 100644
return 0;
case KEY_COMPRESS:
-@@ -3505,9 +3515,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
+@@ -3481,9 +3491,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
return 0;
case KEY_CONFIGFILE:
@@ -183,7 +183,7 @@ index 4a01e4b..3f03640 100644
return 0;
default:
-@@ -3663,17 +3674,19 @@ static char *find_base_path(void)
+@@ -3639,17 +3650,19 @@ static char *find_base_path(void)
static char *fsname_escape_commas(char *fsnameold)
{
@@ -205,7 +205,7 @@ index 4a01e4b..3f03640 100644
return fsname;
}
-@@ -4008,15 +4021,20 @@ int main(int argc, char *argv[])
+@@ -3982,15 +3995,20 @@ int main(int argc, char *argv[])
else
sshfs.max_outstanding_len = ~0;
@@ -230,7 +230,7 @@ index 4a01e4b..3f03640 100644
ssh_add_arg(sshfs.host);
if (sshfs.sftp_server)
sftp_server = sshfs.sftp_server;
-@@ -4043,10 +4061,11 @@ int main(int argc, char *argv[])
+@@ -4017,10 +4035,11 @@ int main(int argc, char *argv[])
sshfs.max_write = 65536;
fsname = fsname_escape_commas(fsname);
diff --git a/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch b/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch
@@ -1,4 +1,4 @@
-From dd4e958a1aedb579c7ebbc4fae78849c3db42d9f Mon Sep 17 00:00:00 2001
+From 6769e1407bf4a239501a8c401e9c3e38de66d4a9 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 18:24:16 -0700
Subject: [PATCH] Disable uidmap and gidmap support
@@ -8,10 +8,10 @@ Subject: [PATCH] Disable uidmap and gidmap support
1 file changed, 16 insertions(+)
diff --git a/sshfs.c b/sshfs.c
-index 58cf1ff..b7effca 100644
+index 5ab4ca9..f09164a 100644
--- a/sshfs.c
+++ b/sshfs.c
-@@ -247,10 +247,12 @@ struct sshfs {
+@@ -246,10 +246,12 @@ struct sshfs {
char *mountpoint;
char *uid_file;
char *gid_file;
@@ -24,7 +24,7 @@ index 58cf1ff..b7effca 100644
unsigned max_read;
unsigned max_write;
unsigned ssh_ver;
-@@ -382,7 +384,9 @@ enum {
+@@ -381,7 +383,9 @@ enum {
enum {
IDMAP_NONE,
IDMAP_USER,
@@ -34,7 +34,7 @@ index 58cf1ff..b7effca 100644
};
enum {
-@@ -403,7 +407,9 @@ static struct fuse_opt sshfs_opts[] = {
+@@ -402,7 +406,9 @@ static struct fuse_opt sshfs_opts[] = {
SSHFS_OPT("workaround=%s", workarounds, 0),
SSHFS_OPT("idmap=none", idmap, IDMAP_NONE),
SSHFS_OPT("idmap=user", idmap, IDMAP_USER),
@@ -75,7 +75,7 @@ index 58cf1ff..b7effca 100644
memset(stbuf, 0, sizeof(struct stat));
stbuf->st_mode = mode;
-@@ -2466,12 +2476,14 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid,
+@@ -2462,12 +2472,14 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid,
if (sshfs.remote_uid_detected && uid == sshfs.local_uid)
uid = sshfs.remote_uid;
#endif /* __APPLE__ */
@@ -90,7 +90,7 @@ index 58cf1ff..b7effca 100644
buf_init(&buf, 0);
if (sf == NULL)
-@@ -3713,6 +3725,7 @@ static int ssh_connect(void)
+@@ -3689,6 +3701,7 @@ static int ssh_connect(void)
return 0;
}
@@ -98,7 +98,7 @@ index 58cf1ff..b7effca 100644
/* number of ':' separated fields in a passwd/group file that we care
* about */
#define IDMAP_FIELDS 3
-@@ -3887,6 +3900,7 @@ static inline void load_gid_map(void)
+@@ -3863,6 +3876,7 @@ static inline void load_gid_map(void)
{
read_id_map(sshfs.gid_file, &groupname_to_gid, "gid", &sshfs.gid_map, &sshfs.r_gid_map);
}
@@ -106,7 +106,7 @@ index 58cf1ff..b7effca 100644
#ifdef __APPLE__
int main(int argc, char *argv[], __unused char *envp[], char **exec_path)
-@@ -3977,6 +3991,7 @@ int main(int argc, char *argv[])
+@@ -3951,6 +3965,7 @@ int main(int argc, char *argv[])
if (sshfs.idmap == IDMAP_USER)
sshfs.detect_uid = 1;
@@ -114,7 +114,7 @@ index 58cf1ff..b7effca 100644
else if (sshfs.idmap == IDMAP_FILE) {
sshfs.uid_map = NULL;
sshfs.gid_map = NULL;
-@@ -3991,6 +4006,7 @@ int main(int argc, char *argv[])
+@@ -3965,6 +3980,7 @@ int main(int argc, char *argv[])
if (sshfs.gid_file)
load_gid_map();
}
diff --git a/pkg/sshfs/rev b/pkg/sshfs/rev
@@ -1 +1 @@
-5
+6
diff --git a/pkg/sshfs/sshfs.1 b/pkg/sshfs/sshfs.1
@@ -0,0 +1,314 @@
+.\" Man page generated from reStructuredText.
+.
+.TH SSHFS 1 "" "" "User Commands"
+.SH NAME
+SSHFS \- filesystem client based on SSH
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+To mount a filesystem:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+sshfs [user@]host:[dir] mountpoint [options]
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+If \fIhost\fP is a numeric IPv6 address, it needs to be enclosed in square
+brackets.
+.sp
+To unmount it:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+fusermount3 \-u mountpoint # Linux
+umount mountpoint # OS X, FreeBSD
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH DESCRIPTION
+.sp
+SSHFS allows you to mount a remote filesystem using SSH (more
+precisely, the SFTP subsystem). Most SSH servers support and enable
+this SFTP access by default, so SSHFS is very simple to use \- there\(aqs
+nothing to do on the server\-side.
+.sp
+SSHFS uses FUSE (Filesystem in Userspace) and should work on any
+operating system that provides a FUSE implementation. Currently,
+this includes Linux, FreeBSD and Mac OS X.
+.sp
+It is recommended to run SSHFS as regular user (not as root). For
+this to work the mountpoint must be owned by the user. If username is
+omitted SSHFS will use the local username. If the directory is
+omitted, SSHFS will mount the (remote) home directory. If you need to
+enter a password sshfs will ask for it (actually it just runs ssh
+which ask for the password if needed).
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-o opt,[opt...]
+mount options, see below for details. A a variety of SSH options can
+be given here as well, see the manual pages for \fIsftp(1)\fP and
+\fIssh_config(5)\fP\&.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-h\fP,\fB \-\-help
+print help and exit.
+.TP
+.B \-V\fP,\fB \-\-version
+print version information and exit.
+.TP
+.B \-d\fP,\fB \-\-debug
+print debugging information.
+.TP
+.BI \-p \ PORT
+equivalent to \(aq\-o port=PORT\(aq
+.TP
+.B \-f
+do not daemonize, stay in foreground.
+.TP
+.B \-s
+Single threaded operation.
+.TP
+.B \-C
+equivalent to \(aq\-o compression=yes\(aq
+.TP
+.BI \-F \ ssh_configfile
+specifies alternative ssh configuration file
+.TP
+.B \-1
+equivalent to \(aq\-o ssh_protocol=1\(aq
+.TP
+.BI \-o \ reconnect
+automatically reconnect to server if connection is
+interrupted. Attempts to access files that were opened before the
+reconnection will give errors and need to be re\-opened.
+.TP
+.BI \-o \ delay_connect
+Don\(aqt immediately connect to server, wait until mountpoint is first
+accessed.
+.TP
+.BI \-o \ sshfs_sync
+synchronous writes. This will slow things down, but may be useful
+in some situations.
+.TP
+.BI \-o \ no_readahead
+Only read exactly the data that was requested, instead of
+speculatively reading more to anticipate the next read request.
+.TP
+.BI \-o \ sync_readdir
+synchronous readdir. This will slow things down, but may be useful
+in some situations.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-o workaround=LIST
+Enable the specified workaround. See the \fICaveats\fP section below
+for some additional information. Possible values are:
+.INDENT 7.0
+.TP
+.B rename
+Emulate overwriting an existing file by deleting and
+renaming.
+.TP
+.B truncate
+Work around servers that don\(aqt support truncate by
+coping the whole file, truncating it locally, and sending it
+back.
+.TP
+.B fstat
+Work around broken servers that don\(aqt support \fIfstat()\fP by
+using \fIstat\fP instead.
+.TP
+.B buflimit
+Work around OpenSSH "buffer fillup" bug.
+.UNINDENT
+.TP
+.B \-o idmap=TYPE
+How to map remote UID/GIDs to local values. Possible values are:
+.INDENT 7.0
+.TP
+.B none
+no translation of the ID space (default).
+.TP
+.B user
+map the UID/GID of the remote user to UID/GID of the
+mounting user.
+.TP
+.B file
+translate UIDs/GIDs based upon the contents of \fI\-\-uidfile\fP
+and \fI\-\-gidfile\fP\&.
+.UNINDENT
+.TP
+.B \-o uidfile=FILE
+file containing \fBusername:uid\fP mappings for \fI\-o idmap=file\fP
+.TP
+.B \-o gidfile=FILE
+file containing \fBgroupname:gid\fP mappings for \fI\-o idmap=file\fP
+.TP
+.B \-o nomap=TYPE
+with idmap=file, how to handle missing mappings:
+.INDENT 7.0
+.TP
+.B ignore
+don\(aqt do any re\-mapping
+.TP
+.B error
+return an error (default)
+.UNINDENT
+.TP
+.B \-o ssh_command=CMD
+execute CMD instead of \(aqssh\(aq
+.TP
+.B \-o ssh_protocol=N
+ssh protocol to use (default: 2)
+.TP
+.B \-o sftp_server=SERV
+path to sftp server or subsystem (default: sftp)
+.TP
+.B \-o directport=PORT
+directly connect to PORT bypassing ssh
+.UNINDENT
+.INDENT 0.0
+.TP
+.BI \-o \ slave
+communicate over stdin and stdout bypassing network
+.TP
+.BI \-o \ disable_hardlink
+With this option set, attempts to call \fIlink(2)\fP will fail with
+error code ENOSYS.
+.TP
+.BI \-o \ transform_symlinks
+transform absolute symlinks on remote side to relative
+symlinks. This means that if e.g. on the server side
+\fB/foo/bar/com\fP is a symlink to \fB/foo/blub\fP, SSHFS will
+transform the link target to \fB\&../blub\fP on the client side.
+.TP
+.BI \-o \ follow_symlinks
+follow symlinks on the server, i.e. present them as regular
+files on the client. If a symlink is dangling (i.e, the target does
+not exist) the behavior depends on the remote server \- the entry
+may appear as a symlink on the client, or it may appear as a
+regular file that cannot be accessed.
+.TP
+.BI \-o \ no_check_root
+don\(aqt check for existence of \(aqdir\(aq on server
+.TP
+.BI \-o \ password_stdin
+read password from stdin (only for pam_mount!)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-o dir_cache=BOOL
+Enables (\fIyes\fP) or disables (\fIno\fP) the SSHFS directory cache. The
+directory cache holds the names of directory entries. Enabling it
+allows \fIreaddir(3)\fP system calls to be processed without network
+access.
+.TP
+.B \-o dcache_max_size=N
+sets the maximum size of the directory cache.
+.TP
+.B \-o dcache_timeout=N
+sets timeout for directory cache in seconds.
+.TP
+.B \-o dcache_{stat,link,dir}_timeout=N
+sets separate timeout for {attributes, symlinks, names} in the
+directory cache.
+.TP
+.B \-o dcache_clean_interval=N
+sets the interval for automatic cleaning of the directory cache.
+.TP
+.B \-o dcache_min_clean_interval=N
+sets the interval for forced cleaning of the directory cache
+when full.
+.UNINDENT
+.sp
+In addition, SSHFS accepts several options common to all FUSE file
+systems. These are described in the \fImount.fuse\fP manpage (look
+for "general", "libfuse specific", and "high\-level API" options).
+.SH CAVEATS / WORKAROUNDS
+.SS Hardlinks
+.sp
+If the SSH server supports the \fIhardlinks\fP extension, SSHFS will allow
+you to create hardlinks. However, hardlinks will always appear as
+individual files when seen through an SSHFS mount, i.e. they will
+appear to have different inodes and an \fIst_nlink\fP value of 1.
+.SS Rename
+.sp
+Some SSH servers do not support atomically overwriting the destination
+when renaming a file. In this case you will get an error when you
+attempt to rename a file and the destination already exists. A
+workaround is to first remove the destination file, and then do the
+rename. SSHFS can do this automatically if you call it with \fI\-o
+workaround=rename\fP\&. However, in this case it is still possible that
+someone (or something) recreates the destination file after SSHFS has
+removed it, but before SSHFS had the time to rename the old file. In
+this case, the rename will still fail.
+.SS SSHFS hangs
+.sp
+In some cases, attempts to access the SSHFS mountpoint may freeze if
+no filesystem activity has occured for some time. This is typically
+caused by the SSH connection being dropped because of inactivity
+without SSHFS being informed about that. As a workaround, you can try
+to mount with \fB\-o ServerAliveInterval=15\fP\&. This will force the SSH
+connection to stay alive even if you have no activity.
+.SH MOUNTING FROM /ETC/FSTAB
+.sp
+To mount an SSHFS filesystem from \fB/etc/fstab\fP, simply use \fBsshfs\(ga
+as the file system type. (For backwards compatibility, you may also
+use \(ga\(gafuse.sshfs\fP).
+.SH SEE ALSO
+.sp
+The \fImount.fuse(8)\fP manpage.
+.SH GETTING HELP
+.sp
+If you need help, please ask on the <\fI\%fuse\-sshfs@lists.sourceforge.net\fP>
+mailing list (subscribe at
+\fI\%https://lists.sourceforge.net/lists/listinfo/fuse\-sshfs\fP).
+.sp
+Please report any bugs on the GitHub issue tracker at
+\fI\%https://github.com/libfuse/libfuse/issues\fP\&.
+.SH AUTHORS
+.sp
+SSHFS is currently maintained by Nikolaus Rath <\fI\%Nikolaus@rath.org\fP>,
+and was created by Miklos Szeredi <\fI\%miklos@szeredi.hu\fP>.
+.sp
+This man page was originally written by Bartosz Fenski
+<\fI\%fenio@debian.org\fP> for the Debian GNU/Linux distribution (but it may
+be used by others).
+.\" Generated by docutils manpage writer.
+.