From e2df577a7ca0c4b06d9eb36eb79138e34cc03088 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Tue, 2 Apr 2024 23:52:18 +0200 Subject: Add more documentation for FUSE_CAP_EXPORT_SUPPORT (#917) Add more documentation for FUSE_CAP_EXPORT_SUPPORT Also remove the flag from passthrough_ll.c and passthrough_hp.cc as these implementations do _not_ handle that flag. They just cast fuse_ino_t to an inode and cause a heap buffer overflow for unknown objects (simplest reproducer are the examples in "man 2 open_by_handle_at", but to unmount/mount the file system after name_to_handle_at and before open_by_handle_at). Fixes https://github.com/libfuse/libfuse/issues/838 --------- Co-authored-by: Nikolaus Rath --- example/passthrough_hp.cc | 3 --- example/passthrough_ll.c | 3 --- 2 files changed, 6 deletions(-) (limited to 'example') diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc index 7f83a7b..7c1dadf 100644 --- a/example/passthrough_hp.cc +++ b/example/passthrough_hp.cc @@ -190,9 +190,6 @@ static int get_fs_fd(fuse_ino_t ino) { static void sfs_init(void *userdata, fuse_conn_info *conn) { (void)userdata; - if (conn->capable & FUSE_CAP_EXPORT_SUPPORT) - conn->want |= FUSE_CAP_EXPORT_SUPPORT; - if (fs.timeout && conn->capable & FUSE_CAP_WRITEBACK_CACHE) conn->want |= FUSE_CAP_WRITEBACK_CACHE; diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c index 46cc8e0..4a597f2 100644 --- a/example/passthrough_ll.c +++ b/example/passthrough_ll.c @@ -170,9 +170,6 @@ static void lo_init(void *userdata, { struct lo_data *lo = (struct lo_data*) userdata; - if(conn->capable & FUSE_CAP_EXPORT_SUPPORT) - conn->want |= FUSE_CAP_EXPORT_SUPPORT; - if (lo->writeback && conn->capable & FUSE_CAP_WRITEBACK_CACHE) { if (lo->debug) -- cgit v1.2.3