summaryrefslogtreecommitdiffstats
path: root/lib/libfuse
AgeCommit message (Collapse)AuthorFilesLines
2021-03-12spellingjsg1-3/+3
2020-05-25from edgar pettijohn:jmc1-18/+25
fix example to compile without warnings and apply style changes; ok mpi
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt1-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.
2018-11-30Fix a typo and remove broken example.mpi1-45/+3
From Edgar Pettijohn.
2018-11-28fuse_parse_cmd_line(3) is called fuse_parse_cmdline(3).mpi5-25/+25
Based on a diff from Edgar Pettijohn III.
2018-11-16Handle signals that get sent to any threadtedu2-41/+46
from Rian Hunter
2018-08-04tweak previous;jmc1-5/+4
2018-08-04Uncomment no-longer-dead Xr.helg1-3/+3
2018-08-03Add man page for fuse_get_context(3).helg2-5/+64
2018-07-21comment out a dead Xr;jmc1-3/+3
2018-07-16Implement FBT_FSYNC, which is called on fsync(2) and fdatasync(2).helg2-14/+70
Currently ignores the a_waitfor argument and always invokes the file system's fsync implementation synchronously. ok mpi@
2018-07-08mop up;jmc13-367/+403
2018-07-08Add man page for fuse_destroy(3).helg1-0/+53
2018-07-08Create separate man pages for each library function.helg13-142/+1209
2018-07-05tweak previous;jmc1-8/+9
2018-07-05fuse_set_signal_handlers(3) and fuse_remove_signal_handlers(3) shouldhelg1-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@
2018-07-05Create new man page for fuse_set_signal_handlers(3) andhelg3-16/+65
fuse_remove_signal_handlers(3). ok mpi@
2018-07-03Remove residual debug statements.helg1-3/+1
2018-06-19Changes the default mount behaviour so only the user that mounts thehelg2-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@
2018-06-19Send the calling thread id, effective uid and gid, and umask to thehelg1-5/+5
FUSE file system. fuse_get_context(3) will now return the correct values. ok mpi@
2018-06-08Minor cleanup in ifuse_ops_setattr.helg1-10/+10
ok mpi@
2018-06-07Prevent ggc3 error: redefinition of `fuse_dirh_t'helg1-3/+3
OK millert@
2018-05-22Implement support for libfuse use_ino option. This returns the filehelg3-19/+26
system's ino for VOP_GETATTR(9) and VOP_READDIR(9) rather than the internally generated fuse ino. ok mpi@
2018-05-21Reformat debug output to one line per opcode to make it easier tohelg2-33/+45
interpret. ok mpi@
2018-05-20Implement FBT_FLUSH. This is sent whenever a file descriptor is closed withhelg1-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@
2018-05-16libfuse should not maintain state for FBT_READDIR. If a directory ishelg3-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@
2018-05-15Use memset(3) instead of bzero(3) for consistency and as per POSIXhelg3-16/+16
recommendation.
2018-04-08Cast -1 to (unsigned long) to appease clang 6 -Wc++11-narrowingjca1-2/+2
Fixes at least ports/archivers/fuse-zip. ok millert@
2017-12-18Add call to fuse_remove_signal_handlers(3) in fuse_teardown(3) to do thehelg1-1/+2
opposite of fuse_setup(3). ok mpi@
2017-12-18Refactor libfuse option processing to better support options in thehelg2-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@
2017-12-15Export only symbols to what's declared in fuse.h/fuse_opt.hjca6-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@
2017-12-15Fix formatting of libfuse version info.helg1-2/+3
ok mpi@
2017-12-14Add a missing call to fuse_set_signal_handlers(3) in fuse_setup(3) so thathelg1-1/+7
any file systems that call fuse_setup(3) or fuse_main(3) trap signals gracefully. ok mpi@
2017-12-14Drop -g from CFLAGS, bsd.lib.mk adds it by defaultjca1-2/+2
ok mpi@ helg@
2017-12-14fuse_opt_add_opt_escaped needs to allocate space for the terminating NULjca1-1/+2
Spotted by malloc.conf -> S, ok helg@
2017-12-14Free FUSE channel if fuse_new(3) fails in fuse_setup(3).helg1-1/+9
ok mpi@
2017-12-13Add support for the -d (-o debug) option to libfuse. Currently works for FUSEhelg4-19/+13
file systems that call fuse_parse_cmdline(3), fuse_main(3) or fuse_setup(3). ok mpi@, jca@
2017-12-13If the list of templates 'o' passed to fuse_opt_parse(3) is NULL thenhelg1-5/+2
the processing function should be called in the same way as if no match was found. ok mpi@
2017-12-11sscanf(3) is now used to parse templates that contain format specifiershelg1-9/+7
(e.g. %u, %o) other than %s. This aligns libfuse with the Linux reference implementation. ok mpi@
2017-12-11Update to fuse_opt_parse(3) so that all option templates are now matched forhelg1-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@
2017-12-11The fuse_opt_match(3) library function does not match options correctly.helg1-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@
2017-11-30vn_open(9) does not pass the open(2) flags to VOP_CREATE(9) so we can'thelg1-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@
2017-11-26Add support for -f option to libfuse. This keeps the FUSE file systemhelg2-11/+19
running in the foreground. ok mpi@
2017-11-17Implement safe signal handling and handle unmount failure gracefully.helg1-42/+74
ok mpi@
2017-11-17Fixes the following bugs when getcwd(3) is used on a fuse file systemhelg2-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@
2017-11-16Add support for:helg1-45/+101
multiple options after -o. arguments that require options e.g. -p 22 %s, %lu, %u option templates ok mpi@
2017-11-04fuse_loop_mt() isn't implemented so return an error value.mpi1-2/+2
From Helg Bredow.
2017-11-04Use the correct version macro.mpi1-2/+2
From Helg Bredow, ok pirofti@
2017-11-02Check if the arguments are NULL instead of dereferencing them blindly.mpi1-10/+29
Delete incorrect "unused" keyword and remove redundant variables due to missing NULL checks. From Helg Bredow.
2017-10-25Check for NULL before dereferencing untrusted pointers.mpi1-5/+9
from Helg Bredow.