summaryrefslogtreecommitdiffstats
path: root/lib/libfuse (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-4/+4
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Fix a typo and remove broken example.mpi2018-11-301-45/+3
| | | | From Edgar Pettijohn.
* fuse_parse_cmd_line(3) is called fuse_parse_cmdline(3).mpi2018-11-285-25/+25
| | | | Based on a diff from Edgar Pettijohn III.
* Handle signals that get sent to any threadtedu2018-11-162-41/+46
| | | | from Rian Hunter
* tweak previous;jmc2018-08-041-5/+4
|
* Uncomment no-longer-dead Xr.helg2018-08-041-3/+3
|
* Add man page for fuse_get_context(3).helg2018-08-032-5/+64
|
* comment out a dead Xr;jmc2018-07-211-3/+3
|
* Implement FBT_FSYNC, which is called on fsync(2) and fdatasync(2).helg2018-07-162-14/+70
| | | | | | | Currently ignores the a_waitfor argument and always invokes the file system's fsync implementation synchronously. ok mpi@
* mop up;jmc2018-07-0813-367/+403
|
* Add man page for fuse_destroy(3).helg2018-07-081-0/+53
|
* Create separate man pages for each library function.helg2018-07-0813-142/+1209
|
* tweak previous;jmc2018-07-051-8/+9
|
* fuse_set_signal_handlers(3) and fuse_remove_signal_handlers(3) shouldhelg2018-07-051-9/+40
| | | | | | | | not replace any existing signal handlers. This makes it possible for FUSE file systems to install their own signal handlers. Bug reported by Bill Zissimopoulos. ok mpi@
* Create new man page for fuse_set_signal_handlers(3) andhelg2018-07-053-16/+65
| | | | | | fuse_remove_signal_handlers(3). ok mpi@
* Remove residual debug statements.helg2018-07-031-3/+1
|
* Changes the default mount behaviour so only the user that mounts thehelg2018-06-192-4/+8
| | | | | | | | file system can access it unless the allow_other mount options is specified. The allow_other mount option makes the file system available to other users just like any other mounted file system. ok mpi@
* Send the calling thread id, effective uid and gid, and umask to thehelg2018-06-191-5/+5
| | | | | | | FUSE file system. fuse_get_context(3) will now return the correct values. ok mpi@
* Minor cleanup in ifuse_ops_setattr.helg2018-06-081-10/+10
| | | | ok mpi@
* Prevent ggc3 error: redefinition of `fuse_dirh_t'helg2018-06-071-3/+3
| | | | OK millert@
* Implement support for libfuse use_ino option. This returns the filehelg2018-05-223-19/+26
| | | | | | | system's ino for VOP_GETATTR(9) and VOP_READDIR(9) rather than the internally generated fuse ino. ok mpi@
* Reformat debug output to one line per opcode to make it easier tohelg2018-05-212-33/+45
| | | | | | interpret. ok mpi@
* Implement FBT_FLUSH. This is sent whenever a file descriptor is closed withhelg2018-05-201-1/+35
| | | | | | | | | VOP_CLOSE(9). The associated FUSE file handle is however not closed at this time and is instead closed on VOP_RELEASE(9) because that's the only time it's guaranteed to be no longer used. Directory handles are now only closed on VOP_RELEASE(9) for the same reason. ok mpi@
* libfuse should not maintain state for FBT_READDIR. If a directory ishelg2018-05-163-72/+48
| | | | | | | | opened multiple times (either from the same process or different processes) then FUSE will not reliably return the directory entries to both file descriptors. ok mpi@
* Use memset(3) instead of bzero(3) for consistency and as per POSIXhelg2018-05-153-16/+16
| | | | recommendation.
* Cast -1 to (unsigned long) to appease clang 6 -Wc++11-narrowingjca2018-04-081-2/+2
| | | | Fixes at least ports/archivers/fuse-zip. ok millert@
* Add call to fuse_remove_signal_handlers(3) in fuse_teardown(3) to do thehelg2017-12-181-1/+2
| | | | | | opposite of fuse_setup(3). ok mpi@
* Refactor libfuse option processing to better support options in thehelg2017-12-182-73/+169
| | | | | | | | future. Immediate benefits are that gid, uid and umask are now supported and max_read is now honoured for all file systems. Mounting read_only is now possible but requires more thorough testing. ok mpi@
* Export only symbols to what's declared in fuse.h/fuse_opt.hjca2017-12-156-6/+75
| | | | | | | While here, use guenther's magic recipe to avoid the PLT when calling exported symbols from within the library. ok kettenis@ for v1, ok guenther@ helg@
* Fix formatting of libfuse version info.helg2017-12-151-2/+3
| | | | ok mpi@
* Add a missing call to fuse_set_signal_handlers(3) in fuse_setup(3) so thathelg2017-12-141-1/+7
| | | | | | | any file systems that call fuse_setup(3) or fuse_main(3) trap signals gracefully. ok mpi@
* Drop -g from CFLAGS, bsd.lib.mk adds it by defaultjca2017-12-141-2/+2
| | | | ok mpi@ helg@
* fuse_opt_add_opt_escaped needs to allocate space for the terminating NULjca2017-12-141-1/+2
| | | | Spotted by malloc.conf -> S, ok helg@
* Free FUSE channel if fuse_new(3) fails in fuse_setup(3).helg2017-12-141-1/+9
| | | | ok mpi@
* Add support for the -d (-o debug) option to libfuse. Currently works for FUSEhelg2017-12-134-19/+13
| | | | | | | file systems that call fuse_parse_cmdline(3), fuse_main(3) or fuse_setup(3). ok mpi@, jca@
* If the list of templates 'o' passed to fuse_opt_parse(3) is NULL thenhelg2017-12-131-5/+2
| | | | | | | the processing function should be called in the same way as if no match was found. ok mpi@
* sscanf(3) is now used to parse templates that contain format specifiershelg2017-12-111-9/+7
| | | | | | | | (e.g. %u, %o) other than %s. This aligns libfuse with the Linux reference implementation. ok mpi@
* Update to fuse_opt_parse(3) so that all option templates are now matched forhelg2017-12-111-46/+54
| | | | | | | | | | | | | | | | | | | | | the supplied option. This allows the following templates to be supplied to set multiple members of a struct at the same time. e.g. #define FUSE_LIB_OPT(t, p, v) { t, offsetof(struct fuse_config, p), v } static const struct fuse_opt fuse_lib_opts[] = { FUSE_LIB_OPT("gid=", set_gid, 1), FUSE_LIB_OPT("gid=%u", gid, 0), FUSE_OPT_END }; If "-ogid=1000" is passed to fuse_opt_parse(3) it will set both: fuse_config.set_gid=1 fuse_config.gid=1000 ok mpi@
* The fuse_opt_match(3) library function does not match options correctly.helg2017-12-111-57/+19
| | | | | | | | | | | | | | | | | | libfuse supports option templates of the following form that can be used to automatically parse arguments supplied on the command line. "-p " argument that takes an option e.g -p 22 or -p22 "-p %x" argument that takes an option parsed like sscanf(3) "cache=yes" matches -ocache=yes or -o cache=yes "cache=%s" matches -ocache=<string> or -o cache=<string> "cache=" matches same as above but value is passed to option proc "noatime" matches -onoatime or -o atime For example, it does not match options of the form "-p 22" or "cache=yes" to the corresponding templates "-p " and "cache=yes". This patch fixes that and updates the regression tests accordingly. ok mpi@
* vn_open(9) does not pass the open(2) flags to VOP_CREATE(9) so we can'thelg2017-11-301-51/+1
| | | | | | | support FBT_CREATE. Fall back to FBT_MKNOD + FBT_OPEN so that a valid sequence of FUSE messages is sent to the file system when creating files. input from mpi@, otto@
* Add support for -f option to libfuse. This keeps the FUSE file systemhelg2017-11-262-11/+19
| | | | | | running in the foreground. ok mpi@
* Implement safe signal handling and handle unmount failure gracefully.helg2017-11-171-42/+74
| | | | ok mpi@
* Fixes the following bugs when getcwd(3) is used on a fuse file systemhelg2017-11-172-10/+24
| | | | | | | | | | | Endless loop if directory nested more than one level from root of file system Current directory not found if the parent directory contains more children than will fit in the buffer passed to VOP_READDIR(9) Open and close directory in fusefs_readdir if dir is not already open. Now behaves as if readdir_ino option was passed to fuse so that directories in path have a valid ino. ok mpi@
* Add support for:helg2017-11-161-45/+101
| | | | | | | | multiple options after -o. arguments that require options e.g. -p 22 %s, %lu, %u option templates ok mpi@
* fuse_loop_mt() isn't implemented so return an error value.mpi2017-11-041-2/+2
| | | | From Helg Bredow.
* Use the correct version macro.mpi2017-11-041-2/+2
| | | | From Helg Bredow, ok pirofti@
* Check if the arguments are NULL instead of dereferencing them blindly.mpi2017-11-021-10/+29
| | | | | | | Delete incorrect "unused" keyword and remove redundant variables due to missing NULL checks. From Helg Bredow.
* Check for NULL before dereferencing untrusted pointers.mpi2017-10-251-5/+9
| | | | from Helg Bredow.
* Add more sanity checks to prevent a segfault and a NULL-dereferencempi2017-10-241-4/+9
| | | | | | when manipulating callers probided pointers. From Helg Bredow.
* Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),deraadt2017-08-211-3/+6
| | | | | | | | in case the parent process was started with a dangling child. This style ensures any potential parent:child interlock isn't disrupted due to the "wrong" child being waited on first. Then the other other childs can safely zombie. ok millert jca brynet