aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
2021-08-25fix spellinga1346054-1/+1
2021-08-25remove executable file mode bit from source filesa1346054-0/+0
2021-08-04meson.build: fix wrong .symver detectionGiulio Benetti-9/+7
As pointed here [1] __has_attribute() is broken for many attributes and if it doesn't support the specific attribute it returns true, so we can't really rely on that for this check. This lead to Buildroot libfuse3 build failure [2] where that shows up with: ``` error: symver is only supported on ELF platforms ``` Indeed Microblaze doesn't support ELF since it doesn't include elfos.h, but __has_attribute(symver) returns true. So let's substitute the #ifdef __has_attribute() with a stronger test on a function foo() with __attribute__((symver ("test@TEST"))). [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 [2]: http://autobuild.buildroot.net/results/d6c/d6cfaf2aafaeda3c12d127f6a2d2e175b25e654f/build-end.log Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2021-06-24Travis-CI: Make sure lsan supppressions file can be read by root.Nikolaus Rath-5/+8
2021-06-23Do not run unlinked files test on passthrough_hp with old kernelsAmir Goldstein-3/+19
test_syscalls unlinked testfiles check fails on passthourhg_hp without the kernel commit "fuse: fix illegal access to inode with reused nodeid" queued for kernel 5.14 [1]. Make this check opt-in and do not run it with kernel version before 5.14. [1] https://lore.kernel.org/linux-fsdevel/CAJfpegtGKjeK8E5QsHKF0=re1J9wVHuGRVgg9NDJ_OOwQdCUNg@mail.gmail.com/ Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-06-16Fix: a potential crash on failure to setlocalelixiaokeng-4/+2
setlocale() can fail, returning NULL, which will lead to a crash in iconv_new(). Fix it like in iconv_help(). Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
2021-06-14passthrough_hp: excercise reusing inode numbersAmir Goldstein-7/+50
Before last unlink() release the reference on inode.fd to allow reuse of underlying fs inode number, mark the server inode "deleted" and bump it's generation counter. When same inode number is found on lookup(), the server inode object will be reused as well. Skip this when inode has an open file and when writeback cache is enabled. This will be used to verify inode reuse bug fix in the kernel. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-06-14test/test_syscalls.c: check unlinked testfiles at the end of the testAmir Goldstein-16/+129
On some tests on regular files, open an O_PATH fd of the testfile and record it along side the size and mode and inode. At the end of all tests, use recorded testfiles info to re-check the size mode and inode of the unlinked testfiles. With O_PATH fd, the server does not have to keep the inode alive so FUSE inode may be stale or bad. Therefore, ESTALE and EIO are valid results for fstat() on the old testfile fd's, but returning the wrong size or mode is an invalid result. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-06-14test/test_syscalls.c: refactor fcheck_* helpersAmir Goldstein-68/+45
Avoid multiple fstat() calls and consolidate all fcheck_* helpers into fcheck_stat(). Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-06-14test/test_syscalls.c: use unique filename per testAmir Goldstein-13/+37
Generate unique filename per test (only for regular file for now). Make sure to unlink the unique filename after each test. realpath variable was renamed to basepath_r to fix build warning on conflicting symbols with realpath() function. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-06-09Released 3.10.4Nikolaus Rath-4/+14
2021-06-09Add an option to disable building tests (#533)asafkahlon-1/+8
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
2021-06-09Cuse example: Fix memory leak (#607)Christian Menges-8/+12
* cuse example: fix memory leak * Travis CI: re-enable leak checking
2021-06-09fix typo in man (#609)Sergey Fedoseev-1/+1
2021-06-02test/test_syscalls.c: fix test failure on xfs src dir (#611)Amir Goldstein-1/+1
rename dir loop test fails when test tmp dir is xfs with an error test_rename_dir_loop() - rename : File exists That is because xfs returns EEXIST for the case of renaming over a non-empty directory. According to rename(2) man page, EEXIST and ENOTEMPTY are both valid error code in this case. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-05-19Define FUSE_USE_VERSION in Doxygen. (#608)Junichi Uekawa-6/+6
We currently do not pass anything in PREDEFINED and that means FUSE_USE_VERSION is undefined. Add that definition so that Doxygen built-in C pre-processor can use FUSE_USE_VERSION value to find the correct comment to parse.
2021-05-09Fix memory leaks in examples (#604)Christian Menges-1/+17
2021-05-09Bump cxxopts from 2.2.0 to 2.2.1 (#602)Christian Menges-41/+78
2021-05-08doc: Add "fuse (4)" to SEE ALSO sections in man pages (#601)rfjakob-0/+2
fuse (4) is an excellent introduction to the FUSE protocol, and it lists fusermount (1) and mount.fuse (8) in its SEE ALSO section. I (the author of gocryptfs) was not aware of this man page till March 2021, which suggest that it should be made more discoverable. So link back to fuse (4) in our SEE ALSO sections.
2021-05-07Fix doxygen warnings. (#600)Junichi Uekawa-17/+20
Some parameters were undocumented, and @file does not mean to expand current file name.
2021-05-05fusermount3.1: refer to mount.fuse3 (#599)Junichi Uekawa-1/+1
mount.fuse was renamed to mount.fuse3.
2021-04-23Add missing exceptions to fuse_reply_err() documentation. (#597)Manuel Jacob-1/+1
Co-authored-by: Manuel Jacob <test>
2021-04-13Fix a few meson warnings (#596)Heiko Becker-5/+8
* Use meson's warning_level instead of passing -Wflags "-Wall" is included by default and level 2 adds "-Wextra". Avoids a warning from meson. Signed-off-by: Heiko Becker <heirecka@exherbo.org> * Set the C++ language standard through a meson option Avoids a warning from meson. Signed-off-by: Heiko Becker <heirecka@exherbo.org>
2021-04-12Added ChangeLog template for next release.Nikolaus Rath-0/+5
2021-04-12Released 3.10.3Nikolaus Rath-2/+7
2021-04-12Remove unused fuse_worker bufsize (#590)Hookey-1/+0
Not used since https://github.com/libfuse/libfuse/commit/561d7054d856eea6c2d634093546d6af773dada9
2021-03-30Fix typo in fuse_lowlevel.h (#593)Tobias Nießen-1/+1
2021-03-25Fix typos (#592)Andrew Gaul-5/+5
2021-03-18Fix returning d_ino and d_type by readdir(3) in non-plus modeJean-Pierre André-9/+48
When not using the readdir_plus mode, the d_type was not returned, and the use_ino flag was not used for returning d_ino. This patch fixes the returned values for d_ino and d_type by readdir(3) The test for the returned value of d_ino has been adjusted to also take the d_type into consideration and to check the returned values in both basic readdir and readdir_plus modes. This is done by executing the passthrough test twice. Co-authored-by: Jean-Pierre André <jpandre@users.sourceforge.net>
2021-02-05Released 3.10.2Nikolaus Rath-6/+16
2021-02-03Fix returning inode numbers from readdir() in offset==0 mode. (#584)Martin Pärtel-3/+69
- Test added for all passthrough examples. - passthrough.c uses offset==0 mode. The others don't. - passthrough.c changed to set FUSE_FILL_DIR_PLUS to make the test pass. - This fixes #583.
2021-01-28Ignore "-o nonempty" (#582)Stephen Kitt-1/+9
Commit 0bef21e8543d removed "-o nonempty" since mounting over non-empty directories is always allowed. But this broke tools which specify "-o nonempty". Since the expected behaviour is the same anyway, ignoring the "nonempty" option seems safe, and allows programs specifying "-o nonempty" to continue working with fusermount3. This would fix https://bugs.debian.org/939767 Signed-off-by: Stephen Kitt <steve@sk2.org>
2021-01-17Fix FTBFS on kfreebsd (#581)Laurent Bigonville-1/+1
kfreebsd is a FreeBSD kernel and a GNU libc The only macro defined in that case is __FreeBSD_kernel__ Fix #580
2021-01-12Fix a few typos in README.md. (#579)John Baber-Lucero-4/+4
* Fix a few typos in README.md. * Change recommendation to mandate for meson and ninja Co-authored-by: John Baber-Lucero <git@frundle.com>
2021-01-10Fix typo (#578)Feverfew-1/+1
2021-01-08fusermount: Check for argv[0] being present (#577)richardweinberger-1/+1
It is perfectly legal to execute a program with argc == 0 and therefore no argv. fusermount needs to check for this case, otherwise it will pass a NULL poiunter to strdup() and cause undefined behavior. Especially since fusermount is setuid root, we need to extra be careful. Signed-off-by: Richard Weinberger <richard@nod.at>
2021-01-01Fix FUSE_COPY_FILE_RANGE in the passthrough example (#575)Alan Somers-2/+4
Only close the file descriptors if they were just opened. Otherwise, the second FUSE_COPY_FILE_RANGE operation on any given file will fail with EBADF.
2020-12-27util/fusermount.c: Assume the kernel supports UMOUNT_NOFOLLOW (#574)Sargun Dhillon-23/+1
UMOUNT_NOFOLLOW was added in Kernel 2.6.34. It's been 10 years since it's been added Kernel 5.9, and 5.10 break this check mechanism[1]. Let's deprecate it. [1]: https://lore.kernel.org/linux-fsdevel/20201223102604.2078-1-sargun@sargun.me/ Signed-off-by: Sargun Dhillon <sargun@sargun.me>
2020-12-19Add exfat to whitelist (#573)Kangjing "Chaser" Huang-0/+1
2020-12-07Released 3.10.1Nikolaus Rath-1/+10
2020-11-24examples/cuse_client: add include file to eliminate compiler warning (#568)Rethan-0/+2
Compiler warning about close(fd), add include file to fix. Signed-off-by: haoyixing <haoyixing@kuaishou.com> Co-authored-by: haoyixing <haoyixing@kuaishou.com>
2020-11-17fix errno comparisonhuman-1/+1
this affected `-o remember` in single-thread mode, it could prematurely exit if a signal was received # start an example filesystem from example/ ./passthrough -f -s -o remember=5 ./mnt # make the poll() call return with EINTR pkill -PIPE passthrough
2020-11-11buffer.c: correct return value when buf is NULLZhiqiang Liu-1/+1
In commit d614415a ("buffer.c: check whether buf is NULL in fuse_bufvec_advance func"), if fuse_bufvec_current func returns NULL, it returns 1 directly. Actually, we should return 0 when buf is NULL. Fixes: d614415a ("buffer.c: check whether buf is NULL in fuse_bufvec_advance func") Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06test/test_syscalls.c: fix potential fd leakage problemsZhiqiang Liu-2/+7
In test_syscalls.c, several funcs have potential fd leakage problems. This patch will fix them. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06example/cuse_client.c: fix fd leakage problemZhiqiang Liu-4/+10
In cuse_client.c, fd should be closed before return. Otherwise, it will cause fd leakage problem. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06ioctl_client.c: fix potential fd leakage problemZhiqiang Liu-3/+8
In ioctl_client.c, fd is not closed before return, thus it will cause fd leakage problem. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06mount.fuse.c: fix potential memory leak in main funcZhiqiang Liu-2/+11
In mount.fuse.c, there are several memory leak problems in main func. For example, setuid_name is allocated by calling xstrdup func, however it is not freed before calling execl func. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06mount.fuse.c: fix potential accessing NULL pointerZhiqiang Liu-1/+1
In mount.fuse.c, pwd is set by calling getpwnam func. If the matching entry is not found or an error occurs in getpwnam func, pwd will be NULL. So we need to check whether pwd is NULL before accessing it. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06buffer.c: check whether buf is NULL in fuse_bufvec_advance funcZhiqiang Liu-0/+3
In fuse_bufvec_advance func, calling fuse_bufvec_current func may return NULL, so we should check whether buf is NULL before using it. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Liu <lihaotian9@huawei.com>
2020-11-04Fix incorrect date in ChangelogLilo Huang-1/+1
It should be 2020 rather than 2010. Thanks.