aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse.h
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2001-12-20 12:17:25 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2001-12-20 12:17:25 +0000
commit2e50d4376f3124a87d5723ae66c09fa71c7ecf88 (patch)
tree9994175ffb91284c2d906c89dfcfc903ba6fb704 /include/fuse.h
parent20dd496d09b6f698eba37c64c7f8ad9745db1c02 (diff)
downloadlibfuse-2e50d4376f3124a87d5723ae66c09fa71c7ecf88.tar.gz
preparations for cred checking in fs
Diffstat (limited to 'include/fuse.h')
-rw-r--r--include/fuse.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 700569c..bafa182 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -83,6 +83,12 @@ struct fuse_operations {
int (*write) (const char *, const char *, size_t, off_t);
};
+/** Extra context that may be needed by some filesystems */
+struct fuse_context {
+ uid_t uid;
+ gid_t gid;
+};
+
/* FUSE flags: */
/** Enable debuging output */
@@ -97,20 +103,10 @@ extern "C" {
*
* @param fd the control file descriptor
* @param flags any combination of the FUSE flags defined above, or 0
- * @return the created FUSE handle
- */
-struct fuse *fuse_new(int fd, int flags);
-
-/**
- * Set the filesystem operations.
- *
- * Operations which are initialised to NULL will return ENOSYS to the
- * calling process.
- *
- * @param f the FUSE handle
* @param op the operations
+ * @return the created FUSE handle
*/
-void fuse_set_operations(struct fuse *f, const struct fuse_operations *op);
+struct fuse *fuse_new(int fd, int flags, const struct fuse_operations *op);
/**
* FUSE event loop.
@@ -146,6 +142,17 @@ void fuse_loop_mt(struct fuse *f);
*/
void fuse_destroy(struct fuse *f);
+/**
+ * Get the current context
+ *
+ * The context is only valid for the duration of a filesystem
+ * operation, and thus must not be stored and used later.
+ *
+ * @param f the FUSE handle
+ * @return the context
+ */
+struct fuse_context *fuse_get_context(struct fuse *f);
+
/* ----------------------------------------------------------- *
* Miscellaneous helper fuctions *
* ----------------------------------------------------------- */