Skip to content

Commit 608e7ab

Browse files
committed
Ignore fstab-specific mount options
Fixes: #96.
1 parent a73dda4 commit 608e7ab

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

ChangeLog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ Unreleased Changes
22
------------------
33

44
* Manpage is now installed in correct directory.
5+
* SSHFS now supports (or rather: ignores) some options that it may
6+
receive as result of being mounted from ``/etc/mtab``. This includes
7+
things like ``user``, ``netdev``, or ``auto``.
58

69
SSHFS 3.3.0 (2017-09-20)
710
------------------------

sshfs.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,15 @@ static struct fuse_opt sshfs_opts[] = {
428428
FUSE_OPT_KEY("writeback_cache=no", FUSE_OPT_KEY_DISCARD),
429429
FUSE_OPT_KEY("unreliable_append", FUSE_OPT_KEY_DISCARD),
430430

431-
432-
FUSE_OPT_END
431+
/* These may come in from /etc/fstab - we just ignore them */
432+
FUSE_OPT_KEY("auto", FUSE_OPT_KEY_DISCARD),
433+
FUSE_OPT_KEY("noauto", FUSE_OPT_KEY_DISCARD),
434+
FUSE_OPT_KEY("user", FUSE_OPT_KEY_DISCARD),
435+
FUSE_OPT_KEY("nouser", FUSE_OPT_KEY_DISCARD),
436+
FUSE_OPT_KEY("users", FUSE_OPT_KEY_DISCARD),
437+
FUSE_OPT_KEY("_netdev", FUSE_OPT_KEY_DISCARD),
433438

439+
FUSE_OPT_END
434440
};
435441

436442
static struct fuse_opt workaround_opts[] = {

0 commit comments

Comments
 (0)