aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorLines
2018-05-18rename: perform user mode dir loop check when not done in kernelBill Zissimooulos-10/+12
Fix conditionals as per maintainer's request.
2018-05-18rename: perform user mode dir loop check when not done in kernelBill Zissimooulos-3/+59
Linux performs the dir loop check (rename(a, a/b/c) or rename(a/b/c, a), etc.) in kernel. Unfortunately other systems do not perform this check (e.g. FreeBSD). This results in a deadlock in get_path2, because libfuse did not expect to handle such cases. We add a check_dir_loop function that performs the dir loop check in user mode and enable it on systems that need it.
2018-04-13Drop unneeded void cast for actually used local variableTomohiro Kusumi-1/+0
`int sig` is acutually used, so `(void) sig;` is unneeded.
2018-02-09Fix uninitialised read in fuse_new_30() (#231) (#234)Ashley Pittman-0/+3
Ensure that conf is always zero before it's read from to prevent sporadic failure at startup if higher layers were build against version 3.0 Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
2017-11-27Spelling (#223)Josh Soref-2/+2
Fix spelling errors
2017-11-03Backed out d92bf83Nikolaus Rath-1/+1
This change is bogus. fuse_module_factory_t is already a pointer type. Additionally, if dlsym returns NULL, then you will be dereferencing it causing a segfault. In my testing, a segfault will happen even if dlsym returns successfully. Thanks to Michael Theall for spotting!
2017-09-27Adding pointer dereferencing after calling dlsym()Sangwoo Moon-1/+1
dlsym() resolves the location of the loaded symbol, therefore dlsym() returns the type (fuse_module_factory_t *), not (fuse_module_factory_t). Added pinter dereferencing to correctly refer the factory function.
2017-09-25fuse_lib_ioctl(): don't call memcpy with NULL argumentNikolaus Rath-1/+1
This was detected by using clang's undefined behavior sanitizer, but didn't seem to cause problems in practice.
2017-09-25Link with -lrt to support ancient libcNikolaus Rath-1/+4
Fixes: #207.
2017-09-19Correctly define fusermount3 path.Nikolaus Rath-1/+1
2017-09-19Make *_loop_mt() available in version 3.0 againNikolaus Rath-2/+2
The old versions of these symbols were defined with version tag FUSE_3.0, so this is what we have to use in the .symver directive.
2017-09-19Fix versioned symbols in version scriptNikolaus Rath-1/+4
According to "How to Write Shared Libraries" by Ulrich Drepper (https://www.akkadia.org/drepper/dsohowto.pdf), the version script should contain the exported name of the versioned symbol once in each tag for which it has been defined by .symver.
2017-09-19Don't use external symbol names in internal filesNikolaus Rath-7/+6
The fuse_session_loop_mt() and fuse_loop_mt() symbols are only visible when linking against the shared object. The code in lib/, however, is compiled *into* the shared object and should thus use the internal names of these functions. Surprisingly enough, the code still worked before - but only when link time optimization was disabled. Unfortunately, we still can't compile with LTO because it seems that enabling LTO somehow makes the tagged symbols vanish. Without lto, we have: $ nm lib/libfuse3.so | grep fuse_new 0000000000011070 T fuse_new_30 0000000000010a00 t fuse_new_31 0000000000011070 T fuse_new@FUSE_3.0 0000000000010a00 T fuse_new@@FUSE_3.1 and with LTO: $ nm lib/libfuse3.so | grep fuse_new 0000000000019a70 T fuse_new_30 0000000000019270 t fuse_new_31 See also issue #198.
2017-09-11fuse_kern_unmount(): close fd before calling umountNikolaus Rath-1/+1
This is what the Linux version does, and it fixes a timeout under FreeBSD when the kernel sends a FUSE_DESTROY request that is never answered.
2017-08-25do_init(): print missing capabilities if there are any.Nikolaus Rath-1/+2
2017-08-24Dropped support for building with autotoolsNikolaus Rath-43/+0
It's just too much pain to keep it working.
2017-08-24Add idle_threads mount option.Joseph Dodge-12/+58
2017-08-24Allow inode cache invalidation in high-level APISławek Rudnicki-0/+41
We re-introduce the functionality of invalidating the caches for an inode specified by path by adding a new routine fuse_invalidate_path. This is useful for network-based file systems which use the high-level API, enabling them to notify the kernel about external changes. This is a revival of Miklos Szeredi's original code for the fuse_invalidate routine.
2017-08-23fuse_loop_mt(): on error, return errno rather than -1.Nikolaus Rath-1/+1
2017-08-23fuse_loop(): don't return non-zero if there was no errorNikolaus Rath-0/+4
2017-08-22Document and unify error codes of fuse_lowlevel_notify_*Nikolaus Rath-3/+9
2017-08-22Fix two compiler warnings.Nikolaus Rath-1/+1
2017-08-22Allow building without iconv.Nikolaus Rath-1/+7
cfg.has('HAVE_ICONV') was always true.
2017-08-14directly call fuse_new_31() instead of fuse_new() internallyuserwithuid-3/+4
this fixes building with lto, which failed since commit 503e32d01e4db00e90d7acfd81ab05386559069f
2017-08-11fuse_lib_init(): don't set FUSE_CAP_EXPORT_SUPPORT unconditionallyNikolaus Rath-1/+2
FreeBSD kernel does not support this.
2017-08-11fuse_kern_unmount(): fix variable type.Nikolaus Rath-1/+2
2017-08-11Fix unused variable warnings under FreeBSD.Nikolaus Rath-2/+2
2017-08-07Fix support for FUSE_POSIX_ACLMarcin Sulikowski-0/+2
The kernel may set the FUSE_POSIX_ACL flag in the FUSE_INIT request to notify the userspace daemon that the OS does support POSIX ACLs for FUSE file systems. If the filesystem implementation wants to enable POSIX ACLs, it has to reply with the FUSE_POSIX_ACL flag set. However, the reply to the kernel never includes this flag, even if the implementation expresses the need by setting the FUSE_CAP_POSIX_ACL flag in the fuse_conn_info::want variable passed to its init callback. We modify the library to handle requests for FUSE_CAP_POSIX_ACL correctly, i.e., set the FUSE_POSIX_ACL flag in the FUSE_INIT reply to the kernel. Signed-off-by: Marcin Sulikowski <marcin.sulikowski@editshare.com>
2017-08-06Released 3.1.1Nikolaus Rath-1/+1
2017-08-03Simplify and fix FreeBSD fsname handlingNikolaus Rath-29/+10
This should simplify the code a lot. It also corrects a bug in that the (former) add_default_fsname() function actually set the -osubtype option.
2017-08-03Simply #ifdefsNikolaus Rath-53/+0
mount_bsd.c is only used when compiling for *BSD, and FreeBSD is the only BSD that supports FUSE. So there really is no need to check if this file is compiled under FreeBSD.
2017-08-03FreeBSD: supprt fsname= optionBaptiste Daroussin-0/+30
2017-08-03FreeBSD: use unmount(2) and add missing FreeBSD mount optionBaptiste Daroussin-0/+12
2017-08-01Fix compiler warnings of gcc-5.4.xBanglang-1/+1
Signed-off-by: Banglang <banglang.huang@foxmail.com>
2017-07-13Only declare fuse_new_30() when FUSE_USE_VERSION == 30Nikolaus Rath-24/+26
This function shouldn't be called when using a newer fuse version, so we should not define it in that case.
2017-07-13fuse_new_30(): call fuse_new_31(), not fuse_new()Nikolaus Rath-1/+1
I believe this function call is resolved by the compiler, not the linker, so this seems safer. Thanks to Chris Clayton for spotting this.
2017-07-08Fixup symbol versioning for GCC 4.xNikolaus Rath-4/+7
GCC 4.8 doesn't like to rename fuse_new_30 to fuse_new, if we also define an implementation for fuse_new.
2017-07-08Added public fuse_lib_help(), bumped minor versionNikolaus Rath-53/+111
2017-07-08Fixed description of struct fuse_conn_info->time_granNikolaus Rath-1/+2
At least on Linux kernel 4.9, a value of zero gives more than 1-sec accuracy.
2017-07-07Don't use emacs' python-mode for meson filesNikolaus Rath-3/+0
There is a proper meson-mode now.
2017-07-06Don't redefine FUSE_USE_VERSIONNikolaus Rath-4/+0
It's already set in meson.build as compiler flag.
2017-06-05getgroups(): clarify codeNikolaus Rath-1/+1
read() return value should always be positive or -1. However, since we cast to unsigned a little later, it's clearer to check for non-negativity.
2017-06-05Fix comparison of integers of different signsAngelo G. Del Regno-4/+4
Some variables of different size and sign were getting compared without any safe casting. The build system also throws warnings at this and, being this library used for filesystems, it's really important to ensure stability.
2017-05-25Remove fuse_fs_fgetattr and fuse_fs_ftruncate from linker scriptpablomh-2/+0
They were removed from source here: https://github.com/libfuse/libfuse/commit/73b6ff4b75cf1228ea61262c293fcb2fda5dfeea
2017-05-24lib/meson.build: don't crash if there's no libdlNikolaus Rath-1/+1
For example, FreeBSD doesn't have it. Fixes: #173.
2017-05-24fuse_signals.c: use new do_nothing function instead of SIG_IGNNikolaus Rath-2/+12
Fixes: #160.
2017-05-24Released libfuse 3.0.2Nikolaus Rath-1/+1
2017-04-20make buffer size match kernel max transfer sizeCarlos Maiolino-3/+5
Currently libfuse has a hardcoded buffer limit to 128kib, while fuse kernel module has a limit up to 32 pages. This patch changes buffer limit to match the current page size, instead of assuming 4096 bytes pages, enabling architectures with bigger pages to use larger buffers, improving performance. Also, add a new macro (HEADER_SIZE) to specify the space needed to accommodate the header, making it easier to understand why those extra 4096 bytes are needed Signed-off-by: Carlos Maiolino <cmaiolino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-04-14Set default options before parsingTej Chajed-5/+5
2017-04-10Released 3.0.1Nikolaus Rath-1/+1