aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-10-19 11:30:11 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-10-19 11:30:11 +0000
commit6d0e39592d5cd7782b2ae0d52bf3a20743d4ce36 (patch)
treed06ca2005af37be59d7c3056b5ffa10325901321
parent0bcb97098a7a369fcfdfc9864ba11b6c1d5f7749 (diff)
downloadsshfs-6d0e39592d5cd7782b2ae0d52bf3a20743d4ce36.tar
sshfs-6d0e39592d5cd7782b2ae0d52bf3a20743d4ce36.tar.gz
sshfs-6d0e39592d5cd7782b2ae0d52bf3a20743d4ce36.tar.bz2
sshfs-6d0e39592d5cd7782b2ae0d52bf3a20743d4ce36.zip
fix
-rw-r--r--README4
-rw-r--r--sshfs.c27
2 files changed, 23 insertions, 8 deletions
diff --git a/README b/README
index 491b9c7..fa618c2 100644
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ The idea of sshfs was taken from the SSHFS filesystem distributed with
LUFS, which I found very useful. There were some limitations of that
codebase, so I rewrote it. Features of this implementation are:
- - Based on FUSE (the best userspace filesystem framework for linux ;)
+ - Based on FUSE (the best userspace filesystem framework for Linux ;)
- Multithreading: more than one request can be on it's way to the
server
@@ -67,7 +67,7 @@ And you are ready to go.
Bugs and feature requests
=========================
-Send bug reports to <miklos@szeredi.hu>.
+Send bug reports to <miklos@szeredi.hu>.
Good luck!
Miklos Szeredi
diff --git a/sshfs.c b/sshfs.c
index 7c4477b..525fc9f 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -215,7 +215,7 @@ enum {
SOPT_DEBUG,
SOPT_RECONNECT,
SOPT_RENAME_FIX,
- SOPT_DETECT_UID,
+ SOPT_IDMAP,
SOPT_LAST /* Last entry in this list! */
};
@@ -228,7 +228,7 @@ static struct opt sshfs_opts[] = {
[SOPT_DEBUG] = { .optname = "sshfs_debug" },
[SOPT_RECONNECT] = { .optname = "reconnect" },
[SOPT_RENAME_FIX] = { .optname = "rename_workaround" },
- [SOPT_DETECT_UID] = { .optname = "detect_uid" },
+ [SOPT_IDMAP] = { .optname = "idmap" },
[SOPT_LAST] = { .optname = NULL }
};
@@ -1804,8 +1804,10 @@ static void usage(const char *progname)
" -o cache=YESNO enable caching {yes,no} (default: yes)\n"
" -o cache_timeout=N sets timeout for caches in seconds (default: 20)\n"
" -o cache_X_timeout=N sets timeout for {stat,dir,link} cache\n"
-" -o rename_workaround work around problem renaming to existing file"
-" -o detect_uid detect remote user ID and translate to local"
+" -o rename_workaround work around problem renaming to existing file\n"
+" -o idmap=TYPE user/group ID mapping, possible types are:\n"
+" none no translation of the ID space (default)\n"
+" user detect remote user ID and translate to local\n"
" -o ssh_command=CMD execute CMD instead of 'ssh'\n"
" -o directport=PORT directly connect to PORT bypassing ssh\n"
" -o SSHOPT=VAL ssh options (see man ssh_config)\n"
@@ -1893,8 +1895,21 @@ int main(int argc, char *argv[])
debug = 1;
if (sshfs_opts[SOPT_RENAME_FIX].present)
rename_workaround = 1;
- if (sshfs_opts[SOPT_DETECT_UID].present)
- detect_uid = 1;
+ if (sshfs_opts[SOPT_IDMAP].present) {
+ struct opt *o = &sshfs_opts[SOPT_IDMAP];
+ if (!o->value) {
+ fprintf(stderr, "Missing value for '%s' option\n", o->optname);
+ exit(1);
+ }
+ if (strcmp(o->value, "none") == 0)
+ detect_uid = 0;
+ else if (strcmp(o->value, "user") == 0)
+ detect_uid = 1;
+ else {
+ fprintf(stderr, "Invalid value for '%s' option\n", o->optname);
+ exit(1);
+ }
+ }
if (sshfs_opts[SOPT_RECONNECT].present)
reconnect = 1;
if (sshfs_opts[SOPT_MAX_READ].present) {