aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
2023-07-05Use signify to sign releases.Nikolaus Rath-6/+78
2023-07-05Merge tag 'fuse-3.15.1'Nikolaus Rath-1/+17
2023-07-05Released fuse-3.15.1Nikolaus Rath-1/+17
2023-07-01Reduce default write size by halfNikolaus Rath-1/+1
Hopefully this will reduce test flakiness on CI.
2023-07-01Add missing include.Nikolaus Rath-0/+2
2023-06-30Make expire only function fail if no kernel support (#789)HereThereBeDragons-28/+86
2023-06-29Clarify behavior of fuse_session_exit().Nikolaus Rath-3/+6
2023-06-19Improve wording of user_allow_other usage instructions (#806)Waldir Pimenta-8/+8
* Improve wording of user_allow_other usage instructions * Remove dated comment from mount_max usage instructions
2023-06-13Wrapper around test applications for cross compiler environment in ↵Rudi Heitbaum-4/+6
meson.build (#804) This enhances commit 7be56c57f93e3436b1fbd9ecc320de5c03a3e4b8 to allow build fuse to be built using a cross compiler Fixes: ../meson.build:180:12: ERROR: Can not run test applications in this cross environment.
2023-06-09Released 3.15.0Nikolaus Rath-2/+19
2023-06-08Error handling for fusermount's commfd (#786)Matthias Görgens-1/+13
2023-06-08util/meson.build: don't install udev.rules if udevdir cannot be determined ↵wdlkmpx-3/+11
(#801) make the udev dependency optional just show a big warning if `udevrulesdir` is empty
2023-06-08meson.build: pass -D_FILE_OFFSET_BITS=64 to C/C++ compiler (#799)wdlkmpx-2/+2
libfuse requires a 64bit off_t, it's not optional ../include/fuse_common.h:938:1: error: Kstatic assertion failed: "fuse: off_t must be 64bit" so this only takes effect if compiling for a 32bit glibc system, it's ignored everywhere else meson by default adds -D_FILE_OFFSET_BITS=64 to C/C++ compilers, and removes duplicate declarations There are several opened issues in meson's git repo requesting to remove that behavior, so this makes sense even more now this fixes compilation with muon (a C99 (mostly) meson compatible build app) in a 32bit glibc system ...
2023-06-08util/mount.fuse.c: compile with linux headers < 3.5 (#798)wdlkmpx-0/+4
PR_SET_NO_NEW_PRIVS was added in linux 3.5 according to prtcl(2) man page https://elixir.bootlin.com/linux/v4.3/source/include/uapi/linux/prctl.h#L174
2023-06-08Fix memory leak (#785)Matthias Görgens-0/+3
This is just to [keep address sanitizer happy](https://github.com/libfuse/libfuse/actions/runs/4730520764/jobs/8394347666?pr=784). The OS would normally clean this up anyway. Co-authored-by: Nikolaus Rath <Nikolaus@rath.org>
2023-06-08Remove unnecessary `_GNU_SOURCE` in `fuse.c` (#787)Matthias Görgens-4/+0
We stopped using pthread_rwlock_t in 3fecccca989328ed2c0ac68860ee1ceec0673972, so we don't need `_GNU_SOURCE` anymore in `fuse.c`
2023-06-06Add security policy (#797)Pedro Nacht-0/+20
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-05-19Add minimal token permissionsPedro Kaj Kjellerup Nacht-0/+7
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-05-12Add support for running xfstests.Nikolaus Rath-2/+103
2023-05-12Do not daemonize to earlyNikolaus Rath-2/+3
fuse_session_mount() may print errors to stderr, if we daemonize before that than these are lost.
2023-05-12Do not pass unsupported mount options to the kernel.Nikolaus Rath-13/+6
The filesystem daemon is responsible for implementing eg. st_atime updates, so passing options like relatime to the kernel results in them being silently ignored. Instead, such options need to be interpreted (and filtered out) by the filesystem daemon.
2023-05-11Fix issue #746. (#782)Peri-0/+187
Added a secondary check in fuse_lib_unlink() after hide_node() to check again under a lock if the (now hidden) file is still open. If not then delete it. This should synchronise fuse_lib_unlink() with fuse_lib_release(), when nullpath_ok is set.
2023-04-14Fix memory leak in high level API (#781)Matthias Görgens-2/+1
Previously, in the high level API if we received a signal between setting up signal handlers and processing INIT, we would leak ``` $ ./example/hello -s -d -f mountpoint/ [9/9] Linking target example/hello_ll FUSE library version: 3.14.1 nullpath_ok: 0 ================================================================= ==178330==ERROR: LeakSanitizer: detected memory leaks Direct leak of 352 byte(s) in 1 object(s) allocated from: #0 0x7fbb19abf411 in __interceptor_calloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77 #1 0x7fbb1a0efd3b in fuse_fs_new ../lib/fuse.c:4814 #2 0x7fbb1a0f02b5 in fuse_new_31 ../lib/fuse.c:4913 #3 0x7fbb1a10ec5e in fuse_main_real ../lib/helper.c:345 #4 0x5625db8ab418 in main ../example/hello.c:176 #5 0x7fbb1983c78f (/usr/lib/libc.so.6+0x2378f) SUMMARY: AddressSanitizer: 352 byte(s) leaked in 1 allocation(s). ``` That's because `fuse_lowlevel.c`s `fuse_session_destroy` would only call the user supplied `op.destroy`, if INIT had been processed, but the high level API relied on `op.destroy` to free `f->fs`. This patch moves the freeing into `fuse_destroy` that will always be called by our high-level API.
2023-04-12Fix doxygen deprecation warning (#774)Matthias Görgens-638/+2098
Before: ``` $ doxygen doc/Doxyfile warning: Tag 'COLS_IN_ALPHA_INDEX' at line 707 of file 'doc/Doxyfile' has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" warning: Tag 'PERL_PATH' at line 1048 of file 'doc/Doxyfile' has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" warning: Tag 'CLASS_DIAGRAMS' at line 1061 of file 'doc/Doxyfile' has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" warning: Tag 'MSCGEN_PATH' at line 1070 of file 'doc/Doxyfile' has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" warning: Tag 'DOT_TRANSPARENT' at line 1207 of file 'doc/Doxyfile' has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" warning: Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO. /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: argument 'private_data' of command @param is not found in the argument list of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: The following parameter of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) is not documented: parameter 'user_data' ``` So let's try `doxygen -u doc/Doxyfile`. After: ``` $ doxygen doc/Doxyfile /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: argument 'private_data' of command @param is not found in the argument list of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: The following parameter of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) is not documented: parameter 'user_data' ``` The generated documentation `doc/html` does not differ. For ease of review, here's a diff with all blank lines and comments removed via `grep -vE '^#|^$' doc/Doxyfile` ``` diff --git a/doc/Doxyfile.old b/doc/Doxyfile.new index dbf469b..3f56d32 100644 --- a/doc/Doxyfile.old +++ b/doc/Doxyfile.new @@ -3,0 +4,2 @@ PROJECT_NUMBER = +PROJECT_BRIEF = +PROJECT_LOGO = @@ -5,0 +8,2 @@ CREATE_SUBDIRS = NO +CREATE_SUBDIRS_LEVEL = 8 +ALLOW_UNICODE_NAMES = NO @@ -26,0 +31 @@ JAVADOC_AUTOBRIEF = NO +JAVADOC_BANNER = NO @@ -28,0 +34 @@ MULTILINE_CPP_IS_BRIEF = NO +PYTHON_DOCSTRING = YES @@ -36,0 +43,5 @@ OPTIMIZE_OUTPUT_VHDL = NO +OPTIMIZE_OUTPUT_SLICE = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 5 +AUTOLINK_SUPPORT = YES @@ -41,0 +53 @@ DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO @@ -42,0 +55,2 @@ SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO @@ -43,0 +58,2 @@ TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 +NUM_PROC_THREADS = 1 @@ -45,0 +62,2 @@ EXTRACT_PRIVATE = NO +EXTRACT_PRIV_VIRTUAL = NO +EXTRACT_PACKAGE = NO @@ -49,0 +68 @@ EXTRACT_ANON_NSPACES = NO +RESOLVE_UNNAMED_PARAMS = YES @@ -56,0 +76,2 @@ HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_HEADERFILE = YES @@ -57,0 +79,2 @@ SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO @@ -60,0 +84 @@ SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO @@ -62,0 +87 @@ SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO @@ -72,0 +98,2 @@ FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = @@ -76,0 +104 @@ WARN_IF_DOC_ERROR = YES +WARN_IF_INCOMPLETE_DOC = YES @@ -77,0 +106,2 @@ WARN_NO_PARAMDOC = NO +WARN_IF_UNDOC_ENUM_VAL = NO +WARN_AS_ERROR = NO @@ -78,0 +109 @@ WARN_FORMAT = "$file:$line: $text" +WARN_LINE_FORMAT = "at line $line of file $file" @@ -82 +113,5 @@ INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.h *.c *.h *.dox +INPUT_FILE_ENCODING = +FILE_PATTERNS = *.h \ + *.c \ + *.h \ + *.dox @@ -89 +124,2 @@ EXAMPLE_PATH = example -EXAMPLE_PATTERNS = *.c *.h +EXAMPLE_PATTERNS = *.c \ + *.h @@ -94,0 +131,3 @@ FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = +FORTRAN_COMMENT_AFTER = 72 @@ -100,0 +140 @@ REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES @@ -104 +143,0 @@ ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 @@ -112 +151,10 @@ HTML_STYLESHEET = -GENERATE_HTMLHELP = NO +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = doc/fast17-vangoor.pdf +HTML_COLORSTYLE = AUTO_LIGHT +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_MENUS = YES +HTML_DYNAMIC_SECTIONS = YES +HTML_INDEX_NUM_ENTRIES = 100 @@ -114,0 +163 @@ DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_FEEDURL = @@ -116,2 +165,3 @@ DOCSET_BUNDLE_ID = org.doxygen.Project -HTML_DYNAMIC_SECTIONS = YES -HTML_EXTRA_FILES = doc/fast17-vangoor.pdf +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO @@ -123,0 +174,10 @@ TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project @@ -125 +184,0 @@ DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 @@ -126,0 +186,2 @@ GENERATE_TREEVIEW = NO +FULL_SIDEBAR = NO +ENUM_VALUES_PER_LINE = 4 @@ -127,0 +189,3 @@ TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +OBFUSCATE_EMAILS = YES +HTML_FORMULA_FORMAT = png @@ -128,0 +193,14 @@ FORMULA_FONTSIZE = 10 +FORMULA_MACROFILE = +USE_MATHJAX = NO +MATHJAX_VERSION = MathJax_2 +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = NO +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = @@ -129,0 +208,18 @@ GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = +MAKEINDEX_CMD_NAME = makeindex +LATEX_MAKEINDEX_CMD = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO +LATEX_EMOJI_DIRECTORY = @@ -130,0 +227,5 @@ GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = @@ -131,0 +233,4 @@ GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = NO @@ -132,0 +238,5 @@ GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES +XML_NS_MEMB_FILE_SCOPE = NO +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook @@ -134,0 +245,3 @@ GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = @@ -148,3 +261,2 @@ EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -CLASS_DIAGRAMS = NO -MSCGEN_PATH = +EXTERNAL_PAGES = YES +DIA_PATH = @@ -152,0 +265,4 @@ HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" +DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" +DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" @@ -154 +270 @@ DOT_FONTPATH = -CLASS_GRAPH = YES +CLASS_GRAPH = TEXT @@ -157,0 +274,3 @@ UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 +DOT_UML_DETAILS = NO +DOT_WRAP_THRESHOLD = 17 @@ -164,0 +284 @@ DIRECTORY_GRAPH = YES +DIR_GRAPH_MAX_DEPTH = 1 @@ -165,0 +286 @@ DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO @@ -167,0 +289,5 @@ DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = @@ -170 +295,0 @@ MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO @@ -174 +298,0 @@ DOT_CLEANUP = YES -SEARCHENGINE = NO ```
2023-04-12Disable leak suppression (#773)Matthias Görgens-10/+0
2023-04-12Fuse mount: make auto_unmount compatible with suid/dev mount options (#762)Matthias Görgens-12/+120
* Fuse mount: make auto_unmount compatible with suid/dev mount options > When you run as root, fuse normally does not call fusermount but uses > the mount system call directly. When you specify auto_unmount, it goes > through fusermount instead. However, fusermount is a setuid binary that > is normally called by regular users, so it cannot in general accept suid > or dev options. In this patch, we split up how fuse mounts as root when `auto_unmount` is specified. First, we mount using system calls directly, then we reach out to fusermount to set up auto_unmount only (with no actual mounting done in fusermount). Fixes: #148
2023-04-11Update fuse_kernel.h to state of linux-6.3Bernd Schubert-14/+259
This syncs fuse_kernel.h to <linux-6.3>/include/uapi/linux/fuse.h Special handling is done for setxattr as in linux commit 52a4c95f4d24b struct fuse_setxattr_in was extended. Extended struct is only used when FUSE_SETXATTR_EXT is passed in FUSE_INIT reply.
2023-04-11Migrate away from deprecated distutilsMatthias Goergens-3/+3
Before: ``` =============================== warnings summary =============================== test/test_ctests.py:12 /tmp/libfuse-build-mB50ZC/build-gcc-9/test/test_ctests.py:12: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.version import LooseVersion -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ```
2023-04-11Fix doxygen warning about parameter nameMatthias Goergens-1/+1
Before: ``` $ doxygen doc/Doxyfile /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: argument 'private_data' of command @param is not found in the argument list of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: The following parameter of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) is not documented: parameter 'user_data' ```
2023-04-11Fix typoMatthias Goergens-1/+1
2023-04-07Fix PytestReturnNotNoneWarningMatthias Goergens-2/+4
``` test_examples.py::test_printcap /usr/local/lib/python3.9/dist-packages/_pytest/python.py:199: PytestReturnNotNoneWarning: Expected None, but test_examples.py::test_printcap returned ((7, 38), {'FUSE_CAP_READDIRPLUS_AUTO', 'FUSE_CAP_ASYNC_DIO', 'FUSE_CAP_SPLICE_READ', 'FUSE_CAP_CACHE_SYMLINKS', 'FUSE_CAP_IOCTL_DIR', 'FUSE_CAP_NO_OPENDIR_SUPPORT', 'FUSE_CAP_NO_OPEN_SUPPORT', 'FUSE_CAP_POSIX_LOCKS', 'FUSE_CAP_READDIRPLUS', 'FUSE_CAP_POSIX_ACL', 'FUSE_CAP_ATOMIC_O_TRUNC', 'FUSE_CAP_SPLICE_MOVE', 'FUSE_CAP_EXPORT_SUPPORT', 'FUSE_CAP_FLOCK_LOCKS', 'FUSE_CAP_EXPLICIT_INVAL_DATA', 'FUSE_CAP_EXPIRE_ONLY', 'FUSE_CAP_DONT_MASK', 'FUSE_CAP_WRITEBACK_CACHE', 'FUSE_CAP_AUTO_INVAL_DATA', 'FUSE_CAP_PARALLEL_DIROPS', 'FUSE_CAP_SPLICE_WRITE', 'FUSE_CAP_ASYNC_READ'}), which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? warnings.warn( ```
2023-04-07Fix deprecated @pytest.mark.hookwrapperMatthias Goergens-1/+1
``` PytestDeprecationWarning: The hookimpl pytest_pyfunc_call uses old-style configuration options (marks or attributes). Please use the pytest.hookimpl(hookwrapper=True) decorator instead to configure the hooks. See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers @pytest.mark.hookwrapper ```
2023-04-07Fix meson deprecation warningMatthias Goergens-2/+2
Also for rest of CI
2023-04-07Fix meson deprecation warning also in FreeBSDMatthias Goergens-1/+1
See ed9be128370c93b93895bb1bb61cc1e606277613
2023-04-07Fix deprecated udev.get_pkgconfig_variable in mesonMatthias Goergens-2/+2
And slightly bump minimum meson version.
2023-04-07Upgrade meson version in CIMatthias Goergens-2/+1
2023-04-06Add long `--options` to fusermount (#764)Matthias Görgens-0/+1
Mostly for consistency with mount(8). Co-authored-by: Nikolaus Rath <Nikolaus@rath.org>
2023-04-06Fix MS_LAZYTIME not defined on uclibc and move all MS_* and UMOUNT_* (#753)Giulio Benetti-24/+52
as well as <sys/mount.h> inclusion to new fuse_mount_compat.h file. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2023-04-04Document risks of auto_unmount (#763)Nikolaus Rath-0/+15
2023-04-02Workaround musl bug when mountdir has whitespace (#761)Matthias Görgens-5/+90
Fixes https://github.com/libfuse/libfuse/issues/634 and https://github.com/mpartel/bindfs/issues/106
2023-04-01Fix compiler warning in hello_ll.c (#760)Nikolaus Rath-2/+4
2023-04-01Add unit tests for setxattr() et alNikolaus Rath-8/+65
Hopefully, this will catch issues as in commit 024eccbf3
2023-03-29Fix typos and configure spellcheck for PRsYaroslav Halchenko-8/+38
2023-03-29Fix meson deprecation warningMatthias Goergens-1/+1
When running `meson ..` I get: ``` WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. ``` So let's fix this in the docs.
2023-03-28Fix use-after-free warningMatthias Goergens-1/+2
When building, I get the following warning: ```bash $ ninja [18/71] Compiling C object lib/libfuse3.so.3.14.1.p/modules_iconv.c.o ../lib/modules/iconv.c: In function ‘iconv_convpath’: ../lib/modules/iconv.c:85:38: warning: pointer ‘newpath’ may be used after ‘realloc’ [-Wuse-after-free] 85 | p = tmp + (p - newpath); | ~~~^~~~~~~~~~ ../lib/modules/iconv.c:80:31: note: call to ‘realloc’ here 80 | tmp = realloc(newpath, newpathlen + 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [71/71] Linking target example/passthrough_hp ``` It's a false positive, I thinks. But it's also easy to silence this warning with a small refactor.
2023-03-28Review feedback: rename and commentsMatthias Goergens-3/+9
2023-03-28Fix `auto_unmount` to work without `allow_other`Matthias Goergens-1/+46
In https://github.com/libfuse/libfuse/blob/77d662459a0fcdf358d515477d33795837e859d5/util/fusermount.c#L1219 `open` is executed as root which does not have access to the mount point if `allow_other` was not used and the real user id is not 0. Since `allow_other` usually cannot be specified by unprivileged users, `auto_unmount` has no effect for unprivileged users. In this commit, we work around this limitation: We first try to open the mountpoint as root, and if we get `EACCES`, we retry as the user who started fusermount, and see if we get `ENOTCONN`. In my testing, I found that `setfsuid` and `setfsgid` don't work to get around the lack of `allow_other`. (Sorry, I don't know enough about the Linux kernel to tell whether that's significant.) As a workaround, I decided to use `setresuid` and `setresgid` in a forked child process, and communicate via its exit status. Please give feedback on correctness, style and suggest tests. Fixes https://github.com/libfuse/libfuse/issues/586
2023-03-26Update script to drop references to Travis CI.Nikolaus Rath-3/+3
2023-03-26Released 3.14.1Nikolaus Rath-1/+15
2023-03-26Revert "upgrade of fuse_kernel.h based on Miklos expire_only kernel patch ↵Nikolaus Rath-190/+11
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=53e949edb7692dce02220eba926c9d75ecbb47f7" This reverts commit 7f430a39db5a30979d75a906af891a38ebce1a3c because it breaks setxattr(). Fixes: #730