From dae347ae287e351c3c052994e3becc2e4df2d2b3 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Thu, 16 Sep 2021 17:30:37 +0000 Subject: [PATCH 1/3] Consistently use uppercase SSHFS --- sshfs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sshfs.rst b/sshfs.rst index f0bf7e16..a95ce40e 100644 --- a/sshfs.rst +++ b/sshfs.rst @@ -43,7 +43,7 @@ want to use ``-o default_permissions``. 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 +you need to enter a password SSHFS will ask for it (actually it just runs ssh which ask for the password if needed). @@ -263,7 +263,7 @@ Permission denied when moving files across remote filesystems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most SFTP servers return only a generic "failure" when failing to rename -across filesystem boundaries (EXDEV). sshfs normally converts this generic +across filesystem boundaries (EXDEV). SSHFS normally converts this generic failure to a permission denied error (EPERM). If the option ``-o workaround=renamexdev`` is given, generic failures will be considered EXDEV errors which will make programs like `mv(1)` attempt to actually move the From 4ae53ba6963619754b8c4a5bdda021c446e1edb1 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Tue, 24 Aug 2021 12:02:52 +0000 Subject: [PATCH 2/3] Trim excess whitespace --- ChangeLog.rst | 4 ---- cache.c | 1 - sshfs.rst | 17 ++++++++--------- test/util.py | 1 - 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/ChangeLog.rst b/ChangeLog.rst index 0c241876..0ebc1c44 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -20,13 +20,11 @@ Release 3.7.2 (2021-06-08) tried - returning EEXIST if the access was successful. Fixes: https://github.com/libfuse/sshfs/issues/243 - Release 3.7.1 (2020-11-09) -------------------------- * Minor bugfixes. - Release 3.7.0 (2020-01-03) -------------------------- @@ -40,7 +38,6 @@ Release 3.7.0 (2020-01-03) needed anymore. If you depend on this workaround, please let the SSHFS maintainers know, otherwise support for the workaround will be removed completely in a future version. - Release 3.6.0 (2019-11-03) -------------------------- @@ -53,7 +50,6 @@ Release 3.6.0 (2019-11-03) * Fixed a number of compiler warnings. * Improved performance under OS X. - Release 3.5.2 (2019-04-13) -------------------------- diff --git a/cache.c b/cache.c index 9436c5a7..6f3c0910 100644 --- a/cache.c +++ b/cache.c @@ -300,7 +300,6 @@ static int cache_readlink(const char *path, char *buf, size_t size) return err; } - static int cache_opendir(const char *path, struct fuse_file_info *fi) { (void) path; diff --git a/sshfs.rst b/sshfs.rst index a95ce40e..3faa2578 100644 --- a/sshfs.rst +++ b/sshfs.rst @@ -40,9 +40,9 @@ By default, only the mounting user will be able to access the filesystem. Access users can be enabled by passing ``-o allow_other``. In this case you most likely also want to use ``-o default_permissions``. -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 +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). @@ -50,7 +50,6 @@ for the password if needed). Options ======= - -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 *sftp(1)* and @@ -158,7 +157,7 @@ Options -o passive communicate over stdin and stdout bypassing network. Useful for - mounting local filesystem on the remote side. An example using + mounting local filesystem on the remote side. An example using dpipe command would be ``dpipe /usr/lib/openssh/sftp-server = ssh RemoteHostname sshfs :/directory/to/be/shared ~/mnt/src -o passive`` @@ -186,7 +185,7 @@ Options read password from stdin (only for pam_mount!) -o dir_cache=BOOL - Enables (*yes*) or disables (*no*) the SSHFS directory cache. The + Enables (*yes*) or disables (*no*) the SSHFS directory cache. The directory cache holds the names of directory entries. Enabling it allows `readdir(3)` system calls to be processed without network access. @@ -198,7 +197,7 @@ Options sets timeout for directory cache in seconds. -o dcache_{stat,link,dir}_timeout=N - sets separate timeout for {attributes, symlinks, names} in the + sets separate timeout for {attributes, symlinks, names} in the directory cache. -o dcache_clean_interval=N @@ -263,8 +262,8 @@ Permission denied when moving files across remote filesystems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most SFTP servers return only a generic "failure" when failing to rename -across filesystem boundaries (EXDEV). SSHFS normally converts this generic -failure to a permission denied error (EPERM). If the option ``-o +across filesystem boundaries (EXDEV). SSHFS normally converts this generic +failure to a permission denied error (EPERM). If the option ``-o workaround=renamexdev`` is given, generic failures will be considered EXDEV errors which will make programs like `mv(1)` attempt to actually move the file after the failed rename. diff --git a/test/util.py b/test/util.py index 261a1c68..4ebf7b15 100644 --- a/test/util.py +++ b/test/util.py @@ -30,7 +30,6 @@ def cleanup(mount_process, mnt_dir): except subprocess.TimeoutExpired: mount_process.kill() - def umount(mount_process, mnt_dir): subprocess.check_call(['fusermount3', '-z', '-u', mnt_dir ]) assert not os.path.ismount(mnt_dir) From 756cec6e89a9b8f442201c817b40d93303a9a9f5 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Tue, 24 Aug 2021 12:12:02 +0000 Subject: [PATCH 3/3] Add .editorconfig file for style consistency * Trim trailing whitespace always * Use linux-style newlines (LF, not CRLF) --- .editorconfig | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..c374b6e8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +# https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true