From f51d7b0c6a54df2bc4a61295a17b721ea0e9d00a Mon Sep 17 00:00:00 2001 From: Rian Hunter Date: Mon, 6 Jun 2016 00:06:21 -0700 Subject: Require paths for truncate/fstat workarounds Commit 74bfa3850a2568f96dd1d090a9386534c9bb4629 allowed sshfs to run without requiring a non-NULL path argument for certain operations. This was erroneous in the case of using certain workarounds. --- sshfs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sshfs.c b/sshfs.c index f41d987..ce38925 100644 --- a/sshfs.c +++ b/sshfs.c @@ -3996,6 +3996,14 @@ int main(int argc, char *argv[]) parse_workarounds() == -1) exit(1); +#if FUSE_VERSION >= 29 + // These workarounds require the "path" argument. + if (sshfs.truncate_workaround || sshfs.fstat_workaround) { + sshfs_oper.oper.flag_nullpath_ok = 0; + sshfs_oper.oper.flag_nopath = 0; + } +#endif + if (sshfs.idmap == IDMAP_USER) sshfs.detect_uid = 1; else if (sshfs.idmap == IDMAP_FILE) { -- cgit v1.2.3