Commit Graph

1510 Commits

Author SHA1 Message Date
Bill Zissimooulos d105fafabb rename: perform user mode dir loop check when not done in kernel
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-05-18 12:52:10 +01:00
Nikolaus Rath 88da32d665 Released 3.2.3 2018-05-11 15:01:09 +01:00
Nikolaus Rath 44deb68ce1 add_arg(): check for overflow
Fixes: #222.
2018-05-11 15:01:04 +01:00
Tomohiro Kusumi 27a112e86d Fix compile-time warnings on IGNORE_MTAB
Silence below warnings which appear if IGNORE_MTAB is defined.

[59/64] Compiling C object 'util/fusermount3@exe/fusermount.c.o'.
../util/fusermount.c:493:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 static int count_fuse_fs()
            ^~~~~~~~~~~~~
../util/fusermount.c: In function 'unmount_fuse':
../util/fusermount.c:508:46: warning: unused parameter 'quiet' [-Wunused-parameter]
 static int unmount_fuse(const char *mnt, int quiet, int lazy)
                                              ^~~~~
2018-05-08 19:36:52 +01:00
Nikolaus Rath da29b950bc Fix path to pytest cache directory. 2018-04-13 10:28:27 -07:00
Tomohiro Kusumi 1a4afa8029 Invert calloc(3) argument order (nmemb comes first)
No functional difference expected, but should still follow the standard.
http://pubs.opengroup.org/onlinepubs/009695399/functions/calloc.html
2018-04-13 10:14:46 -07:00
Tomohiro Kusumi e6549557f7 Drop unneeded void cast for actually used local variable
`int sig` is acutually used, so `(void) sig;` is unneeded.
2018-04-13 10:14:46 -07:00
Tomohiro Kusumi 7638bbba7b Drop redundant ; from FUSE_REGISTER_MODULE()
Callers do (and should) use ;.
2018-04-13 10:14:46 -07:00
Nikolaus Rath 53c31a099f Travis: remove root-owned cache files. 2018-03-31 13:52:14 +01:00
Nikolaus Rath 41f528677d Fix Travis build environment
Newest Meson requires Python 3.5 which isn't available in Trusty.
Pip version pin no longer necessary.
2018-03-31 13:21:08 +01:00
Nikolaus Rath 100b55ff05 Fixed up duplicate ChangeLog entry. 2018-03-31 13:16:48 +01:00
Nikolaus Rath f83695864f Released 3.2.2 2018-03-31 13:08:08 +01:00
admorgan 14a20f9f1d Add example configuration file (#216)
Add a configuration file with all options disabled that includes
all valid options and their description.
2018-03-28 20:38:26 +01:00
Tomohiro Kusumi 72ab7172b8 Fix build error on DragonFlyBSD (sync with other *BSD) (#240)
DragonFlyBSD has no "bsd" in uname, so add 'dragonfly' to conditionals.

-- e.g. uname(1) in DragonFlyBSD
[root@ ~]# uname
DragonFly
[root@ ~]# python -c "import sys; print(sys.platform)"
dragonfly5
2018-03-28 20:32:59 +01:00
Ashley Pittman 03515bbb30 Fix uninitialised read in fuse_new_30() (#231) (#234)
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>
2018-02-09 13:42:12 +00:00
Mateusz Urbańczyk 917e72973d Fix typo in "passthrough" docstring (#229) 2018-01-15 20:45:54 +00:00
Josh Soref a83cd72f64 Handle mount ... -o nofail (#221)
Accept (and ignore) nofail mount option
2017-12-01 19:18:49 +00:00
divinity76 f7c8b31a36 fix "Rath Consulting" link (#225) 2017-11-27 19:53:09 +00:00
Josh Soref 8157b4d9b9 Spelling (#223)
Fix spelling errors
2017-11-27 10:23:20 +00:00
Nikolaus Rath ae2cb7bd98 Released 3.2.1 2017-11-14 20:48:15 +00:00
Nikolaus Rath f335221e8e Updated professional support information. 2017-11-13 20:10:13 +00:00
Nikolaus Rath 8ec7fd92eb Backed out d92bf83
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-11-03 10:51:06 +00:00
Nikolaus Rath 16422eb03c Don't install manpages under *BSD
Were not installing the corresponding binaries either, since those
are provided by the BSD base system.
2017-10-20 09:20:39 +01:00
Nikolaus Rath 945ce7a9d4 Don't use Python mode for meson.build
Emacs now has a proper meson mode :-).
2017-10-20 09:19:16 +01:00
Joerg Thalheim 2a3929bbe0 make udevrulesdir configurable
on nixos we install fuse in its own hierarchy independent from systemd.
2017-10-20 08:42:30 +01:00
Sangwoo Moon d92bf83c15 Adding pointer dereferencing after calling dlsym()
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-27 15:01:55 +01:00
Nikolaus Rath 77092d9581 fuse_lib_ioctl(): don't call memcpy with NULL argument
This was detected by using clang's undefined behavior sanitizer, but
didn't seem to cause problems in practice.
2017-09-25 10:34:07 +01:00
Nikolaus Rath b1a743c8eb Link with -lrt to support ancient libc
Fixes: #207.
2017-09-25 10:23:38 +01:00
Nikolaus Rath f750abb757 Removed unneccessary #include <config.h> from examples
Fixes: #208.
2017-09-25 10:17:11 +01:00
Nikolaus Rath 379ce42268 Automatically print list of contributors when generating tarball 2017-09-20 18:17:49 +01:00
Nikolaus Rath c3a881735f Travis CI: Don't use deprecated environment
Travis support recommends to install specific pip
version to work around problems in new environment.
2017-09-20 12:38:35 +01:00
Nikolaus Rath 3b6a2a5eef Correctly define fusermount3 path. 2017-09-19 20:37:46 +01:00
Nikolaus Rath 8929982478 Make *_loop_mt() available in version 3.0 again
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-19 20:33:26 +01:00
Nikolaus Rath 893e2d66c7 Fix versioned symbols in version script
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-19 20:26:51 +01:00
Nikolaus Rath f24673cc17 Don't use external symbol names in internal files
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-19 16:47:40 +01:00
Nikolaus Rath da363c514b Include source code in documentation. 2017-09-17 09:39:47 +01:00
Nikolaus Rath 072100c26a make_release_tarball.sh: be less verbose 2017-09-17 09:35:52 +01:00
Nikolaus Rath 109ab4fa53 Added some documentation of fuse internals. 2017-09-17 09:35:43 +01:00
Nikolaus Rath cfdca8c6a0 Released 3.2.0 2017-09-12 14:50:16 +01:00
Nikolaus Rath 1c5f6bd3d8 Add script to create release tarball. 2017-09-12 14:50:16 +01:00
Nikolaus Rath d41f62ccbc Use "mkdir" instead of "md" in instructions.
Fixes: #205.
2017-09-12 14:01:04 +01:00
Nikolaus Rath a6c7eab4cc fuse_kern_unmount(): close fd before calling umount
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-09-11 11:19:06 +01:00
Nikolaus Rath 21b55a05a1 example/ioctl: build on FreeBSD, but add protocol check instead. 2017-08-25 10:48:09 +02:00
Nikolaus Rath f66673663a do_init(): print missing capabilities if there are any. 2017-08-25 10:38:43 +02:00
Nikolaus Rath 48d0e99af3 Fix writeback capability check. 2017-08-25 09:49:23 +02:00
Nikolaus Rath 6b0d363b6a examples/{ioctl,null}: don't build under FreeBSD instead of skipping tests. 2017-08-25 09:46:50 +02:00
Nikolaus Rath b29faad9db printcap: use temporary directory, not file
Mounting a file doesn't seem to work under FreeBSD.
2017-08-24 21:56:00 +02:00
Nikolaus Rath 4e3a30b6f5 Skip testing null and ioctl examples under FreeBSD.
This seems to be unsupported. However, me may also be
doing it wrong. I've asked on the freebsd-fs list for help.
2017-08-24 21:56:00 +02:00
Nikolaus Rath 00e6794c81 Removed unused import. 2017-08-24 21:56:00 +02:00
Nikolaus Rath ad029c095c passthrough_ll: only active EXPORT_SUPPORT of supported by kernel. 2017-08-24 21:08:25 +02:00