Commit Graph

1997 Commits

Author SHA1 Message Date
Nikolaus Rath
5fd503935c Added missing file, update release process docs. 2023-08-08 11:23:37 +01:00
Nikolaus Rath
1f0dfae408 Released fuse-3.16.1 2023-08-08 11:15:03 +01:00
Nikolaus Rath
0d830af6b8 Don't attempt to put signify signature into gz header
This is currently buggy, cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042837
2023-08-08 11:11:55 +01:00
ikbenlike
7b9e7eeec6
Make errnum-verification more flexible (#824)
Instead of hardcoding the value to check against, use a more dynamic method to verify the error number before passing it to the kernel.
2023-08-05 21:39:09 +01:00
Aleksandr Mikhailov
98eb808904
Pass cache_readdir and keep_cache from high level API (#822)
* Pass cache_readdir and keep_cache from high level API

* Update ChangeLog.rst
2023-08-03 18:01:46 +01:00
Pedro Kaj Kjellerup Nacht
7c109e2ecf Add dependabot for GHA
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-07-26 17:42:24 +01:00
Pedro Kaj Kjellerup Nacht
0d7f43f110 Hash-pin workflow Actions
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-07-26 17:42:24 +01:00
Bernd Schubert
624783d73b
Allow linking with mold / fix the version script (#814)
This fixes issue https://github.com/libfuse/libfuse/issues/810
and should avoid mold linking errors.
Commit d4e294b removed made fuse_register_module() a static
function, but forgot to remove it from the version script.

Commit fe4f942 introduced copy_file_range to libfuse and
added the non-exiting (neither declared nor defined) function
fuse_reply_copy_file_range() to the version script. Kernel
side just exects an integer reply how much was copied, using
fuse_reply_write() as in fuse_lib_copy_file_range() is sufficient
and no extra function is needed.

Co-authored-by: Bernd Schubert <bschubert@ddn.com>
2023-07-07 16:18:38 +01:00
Nikolaus Rath
d888c30597 Use signify to sign releases. 2023-07-05 11:25:27 +01:00
Nikolaus Rath
a98add6e49 Tagged release.
-----BEGIN PGP SIGNATURE-----
 
 iQLKBAABCgC0FiEE7TF5GyxcFhOvOIuK0RP8rDxOWZ8FAmSlQsNfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVE
 MzE3OTFCMkM1QzE2MTNBRjM4OEI4QUQxMTNGQ0FDM0M0RTU5OUYjGmh0dHA6Ly93
 d3cucmF0aC5vcmcvZ3BncG9saWN5Lmh0bWwSHG5pa29sYXVzQHJhdGgub3JnAAoJ
 ENET/Kw8TlmfBd4P/1bM/lGriJIrikiL027XKGRWj4ZCWDhJcSfXGaQgdfxIV48q
 7teqJBs1GD5WerDifXs3Z0RUqZupE9xtbWmAipk/8vAld72T/cU/NCxNJoioOKzX
 aBkFBAS6Wuh1eRcbwkGhSHy0xrys1U08j8a+sgpsK+BVhgKg1ZQUYaD+kiK4AWId
 D75bjrBZhNtwPMnfDNwkKFZHzPRyOqNO/BvLdmLxG+c60urxE/z7vIEMGr4w9a/C
 FEEwIM2L7xnTMD/ODBEHuJxpX50uXOTsAigb92u4JB2lMLmVleYr2XQ4BezUYwij
 1wDRhUlT5pAHCbLLWsGaJR1flsnvKiga0POKPOsql+q2xX3OPxBneM2OXIB1FWEq
 OXy2amF6BPk04hYzaTbmzyuWtXBxljM521ypH/yxeyDZX6dMFIfNt9c6oPawv7It
 skjA1Ih3q/l8Hi4h39i60mXD1YYIB+BmMQNQLvLb79dGrhPQ/1UI6Em048CsrBn6
 ePegnFKQNjvwBiaVc4Lacpryny9ymnKWG/O0xHv9Ns4TBYb+Vd/RW/mJ5o15Nvtf
 s6cXI2rM/UM3OYok/RvCaz2qzwuq/JoH9oOmapIC8FzcUNI7Rj/DHrMQtBt+prpf
 dpm2p/MrANIJ6gRRKcLOAXsoYlPBBNf3WqQ0vB5Ey4mzMGLqIIABC1uT9sLD
 =jpAp
 -----END PGP SIGNATURE-----

Merge tag 'fuse-3.15.1'
2023-07-05 11:25:13 +01:00
Nikolaus Rath
0b50e26c51 Released fuse-3.15.1 2023-07-05 11:14:33 +01:00
Nikolaus Rath
1cb6e17e0c Reduce default write size by half
Hopefully this will reduce test flakiness on CI.
2023-07-01 14:12:44 +01:00
Nikolaus Rath
b51f69f620 Add missing include. 2023-07-01 14:10:47 +01:00
HereThereBeDragons
51bc827df8
Make expire only function fail if no kernel support (#789) 2023-06-30 13:57:06 +01:00
Nikolaus Rath
7567268006 Clarify behavior of fuse_session_exit(). 2023-06-29 13:11:11 +01:00
Waldir Pimenta
010d820131
Improve wording of user_allow_other usage instructions (#806)
* Improve wording of user_allow_other usage instructions

* Remove dated comment from mount_max usage instructions
2023-06-19 21:00:12 +01:00
Rudi Heitbaum
b58a0014bf
Wrapper around test applications for cross compiler environment in meson.build (#804)
This enhances commit 7be56c57f9 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-13 11:02:01 +01:00
Nikolaus Rath
6d08472ea4 Released 3.15.0 2023-06-09 10:36:28 +01:00
Matthias Görgens
e0041ada71
Error handling for fusermount's commfd (#786) 2023-06-08 11:47:45 +01:00
wdlkmpx
690b12f000
util/meson.build: don't install udev.rules if udevdir cannot be determined (#801)
make the udev dependency optional

just show a big warning if `udevrulesdir` is empty
2023-06-08 11:24:43 +01:00
wdlkmpx
113ce78baa
meson.build: pass -D_FILE_OFFSET_BITS=64 to C/C++ compiler (#799)
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-08 11:24:28 +01:00
wdlkmpx
0433b40d17
util/mount.fuse.c: compile with linux headers < 3.5 (#798)
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-08 11:23:55 +01:00
Matthias Görgens
eb9eb1d8f1
Fix memory leak (#785)
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-08 11:20:56 +01:00
Matthias Görgens
30a300a848
Remove unnecessary _GNU_SOURCE in fuse.c (#787)
We stopped using pthread_rwlock_t in 3fecccca98, so we don't need `_GNU_SOURCE` anymore in `fuse.c`
2023-06-08 08:26:54 +01:00
Pedro Nacht
841cd09006
Add security policy (#797)
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-06-06 10:00:35 +01:00
Pedro Kaj Kjellerup Nacht
6fc5ffd4bd Add minimal token permissions
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-05-19 18:37:46 +01:00
Nikolaus Rath
4c177c9047 Add support for running xfstests. 2023-05-12 23:29:03 +01:00
Nikolaus Rath
ad1abf3f2e Do not daemonize to early
fuse_session_mount() may print errors to stderr, if we daemonize before
that than these are lost.
2023-05-12 23:29:03 +01:00
Nikolaus Rath
dba6b3983a Do not pass unsupported mount options to the kernel.
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-12 23:27:43 +01:00
Peri
bb1890afd7
Fix issue #746. (#782)
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-05-11 02:38:46 +01:00
Matthias Görgens
fcd293f675
Fix memory leak in high level API (#781)
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-14 12:19:03 +01:00
Matthias Görgens
36c2250d10
Fix doxygen deprecation warning (#774)
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-12 09:10:12 +01:00
Matthias Görgens
34d9d2abf1
Disable leak suppression (#773) 2023-04-12 08:40:18 +01:00
Matthias Görgens
7297044ada
Fuse mount: make auto_unmount compatible with suid/dev mount options (#762)
* 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-12 08:39:32 +01:00
Bernd Schubert
681a0c1178 Update fuse_kernel.h to state of linux-6.3
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-11 19:54:59 +01:00
Matthias Goergens
eb88309882 Migrate away from deprecated distutils
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-11 13:32:00 +01:00
Matthias Goergens
04215e9a90 Fix doxygen warning about parameter name
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-11 12:21:37 +01:00
Matthias Goergens
c261271aa9 Fix typo 2023-04-11 11:58:33 +01:00
Matthias Goergens
6ce27f48bc Fix PytestReturnNotNoneWarning
```
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-07 15:31:58 +01:00
Matthias Goergens
b9b4307e4d Fix deprecated @pytest.mark.hookwrapper
```
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-07 15:31:58 +01:00
Matthias Goergens
7555d032a2 Fix meson deprecation warning
Also for rest of CI
2023-04-07 14:01:16 +01:00
Matthias Goergens
10f29159bd Fix meson deprecation warning also in FreeBSD
See ed9be12837
2023-04-07 14:01:16 +01:00
Matthias Goergens
49b14f3256 Fix deprecated udev.get_pkgconfig_variable in meson
And slightly bump minimum meson version.
2023-04-07 13:32:35 +01:00
Matthias Goergens
b37f6dfe70 Upgrade meson version in CI 2023-04-07 13:32:35 +01:00
Matthias Görgens
1edfed0e18
Add long --options to fusermount (#764)
Mostly for consistency with mount(8).

Co-authored-by: Nikolaus Rath <Nikolaus@rath.org>
2023-04-06 13:26:22 +01:00
Giulio Benetti
c60a90b739
Fix MS_LAZYTIME not defined on uclibc and move all MS_* and UMOUNT_* (#753)
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-06 12:37:57 +01:00
Nikolaus Rath
4cf25c27f8
Document risks of auto_unmount (#763) 2023-04-04 22:20:19 +01:00
Matthias Görgens
7be56c57f9
Workaround musl bug when mountdir has whitespace (#761)
Fixes https://github.com/libfuse/libfuse/issues/634 and https://github.com/mpartel/bindfs/issues/106
2023-04-02 10:45:27 +01:00
Nikolaus Rath
2113871279
Fix compiler warning in hello_ll.c (#760) 2023-04-01 22:42:18 +01:00
Nikolaus Rath
d65686ac2c Add unit tests for setxattr() et al
Hopefully, this will catch issues as in commit 024eccbf3
2023-04-01 16:49:01 +01:00