Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/printcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ static const struct cap_info capabilities[] = {
{FUSE_CAP_DIRECT_IO_ALLOW_MMAP, "FUSE_CAP_DIRECT_IO_ALLOW_MMAP"},
{FUSE_CAP_NO_EXPORT_SUPPORT, "FUSE_CAP_NO_EXPORT_SUPPORT"},
{FUSE_CAP_PASSTHROUGH, "FUSE_CAP_PASSTHROUGH"},
{ FUSE_CAP_ALLOW_IDMAP, "FUSE_CAP_ALLOW_IDMAP"},
// Add any new capabilities here
{0, NULL} // Sentinel to mark the end of the array
};
Expand Down
5 changes: 5 additions & 0 deletions include/fuse_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,11 @@ struct fuse_loop_config_v1 {
*/
#define FUSE_CAP_OVER_IO_URING (1UL << 31)

/**
* Indicates that creation of idmapped mounts is allowed
*/
#define FUSE_CAP_ALLOW_IDMAP (1ULL << 32)

/**
* Ioctl flags
*
Expand Down
4 changes: 4 additions & 0 deletions lib/fuse_lowlevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2766,6 +2766,8 @@ _do_init(fuse_req_t req, const fuse_ino_t nodeid, const void *op_in,
se->conn.capable_ext |= FUSE_CAP_NO_EXPORT_SUPPORT;
if (inargflags & FUSE_OVER_IO_URING)
se->conn.capable_ext |= FUSE_CAP_OVER_IO_URING;
if (inargflags & FUSE_ALLOW_IDMAP)
se->conn.capable_ext |= FUSE_CAP_ALLOW_IDMAP;

} else {
se->conn.max_readahead = 0;
Expand Down Expand Up @@ -2924,6 +2926,8 @@ _do_init(fuse_req_t req, const fuse_ino_t nodeid, const void *op_in,
outargflags |= FUSE_OVER_IO_URING;
enable_io_uring = true;
}
if (se->conn.want_ext & FUSE_CAP_ALLOW_IDMAP)
outargflags |= FUSE_ALLOW_IDMAP;

if ((inargflags & FUSE_REQUEST_TIMEOUT) && se->conn.request_timeout) {
outargflags |= FUSE_REQUEST_TIMEOUT;
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('libfused', ['c'],
version: '1.2.0', # synced with fuse-3.18.3
version: '1.2.1', # fuse-3.18.3 + FUSE_CAP_ALLOW_IDMAP
meson_version: '>= 0.60.0',
default_options: [
'buildtype=debugoptimized',
Expand Down
Loading