From da7c9b228aaf31f37684e106b75262055ca440de Mon Sep 17 00:00:00 2001 From: Mattias Nissler Date: Fri, 31 Aug 2018 09:44:04 +0200 Subject: Add unprivileged option in `mount.fuse3` The unprivileged option allows to run the FUSE file system process without privileges by dropping capabilities and preventing them from being re-acquired via setuid / fscaps etc. To accomplish this, mount.fuse sets up the `/dev/fuse` file descriptor and mount itself and passes the file descriptor via the `/dev/fd/%u` mountpoint syntax to the FUSE file system. --- include/fuse.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/fuse.h') diff --git a/include/fuse.h b/include/fuse.h index 7b63c42..24e04bc 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -1219,6 +1219,16 @@ typedef struct fuse_fs *(*fuse_module_factory_t)(struct fuse_args *args, /** Get session from fuse object */ struct fuse_session *fuse_get_session(struct fuse *f); +/** + * Open a FUSE file descriptor and set up the mount for the given + * mountpoint and flags. + * + * @param mountpoint reference to the mount in the file system + * @param options mount options + * @return the FUSE file descriptor or -1 upon error + */ +int fuse_open_channel(const char *mountpoint, const char *options); + #ifdef __cplusplus } #endif -- cgit v1.2.3