summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhelg <helg@cvs.openbsd.org>2018-08-03 23:32:05 +0000
committerhelg <helg@cvs.openbsd.org>2018-08-03 23:32:05 +0000
commita6812b4a590a35219787a8d8b78d56971578f1ef (patch)
treea516d06e459c11111ad4361523b2732adf8ade49 /lib
parentb1c9d3487c70b66055a5c67371680c97890c57a1 (diff)
Add man page for fuse_get_context(3).
Diffstat (limited to 'lib')
-rw-r--r--lib/libfuse/Makefile10
-rw-r--r--lib/libfuse/fuse_get_context.359
2 files changed, 64 insertions, 5 deletions
diff --git a/lib/libfuse/Makefile b/lib/libfuse/Makefile
index be4bd099050..8edfae9adcb 100644
--- a/lib/libfuse/Makefile
+++ b/lib/libfuse/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.15 2018/07/08 02:28:42 helg Exp $
+# $OpenBSD: Makefile,v 1.16 2018/08/03 23:32:04 helg Exp $
LIB= fuse
-MAN= fuse_chan_fd.3 fuse_daemonize.3 fuse_destroy.3 fuse_loop.3 \
- fuse_main.3 fuse_mount.3 fuse_new.3 fuse_opt.3 fuse_parse_cmd_line.3 \
- fuse_set_signal_handlers.3 fuse_setup.3 fuse_teardown.3 \
- fuse_version.3
+MAN= fuse_chan_fd.3 fuse_daemonize.3 fuse_destroy.3 fuse_get_context.3 \
+ fuse_get_session.3 fuse_loop.3 fuse_main.3 fuse_mount.3 fuse_new.3 \
+ fuse_opt.3 fuse_parse_cmd_line.3 fuse_set_signal_handlers.3 \
+ fuse_setup.3 fuse_teardown.3 fuse_version.3
CFLAGS+= -Wall -Wshadow -Wmissing-prototypes
CFLAGS+= -Wstrict-prototypes -Wsign-compare
diff --git a/lib/libfuse/fuse_get_context.3 b/lib/libfuse/fuse_get_context.3
new file mode 100644
index 00000000000..37a065e6def
--- /dev/null
+++ b/lib/libfuse/fuse_get_context.3
@@ -0,0 +1,59 @@
+.\" $OpenBSD: fuse_get_context.3,v 1.1 2018/08/03 23:32:04 helg Exp $
+.\"
+.\" Copyright (c) 2018 Helg Bredow <helg@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: August 3 2018 $
+.Dt FUSE_GET_CONTEXT 3
+.Os
+.Sh NAME
+.Nm fuse_get_context
+.Nd FUSE utility routine
+.Sh SYNOPSIS
+.In fuse.h
+.Ft struct fuse_context *
+.Fn fuse_get_context "void"
+.Sh DESCRIPTION
+.Fn fuse_get_context
+returns a pointer to the structure
+.Fa fuse_context .
+This can be used by file systems to obtain information about the
+thread that is accessing the file system.
+The returned fuse_context is only valid during the lifetime of a FUSE
+operation.
+.Pp
+.Bd -literal
+struct fuse_context {
+ struct fuse * fuse;
+ uid_t uid; /* effective user id */
+ gid_t gid; /* effective group id */
+ pid_t pid; /* thread id */
+ void *private_data; /* set by file system on mount */
+ mode_t umask; /* umask of the thread */
+};
+.Ed
+.Sh SEE ALSO
+.Xr fuse_new 3
+.Sh STANDARDS
+The
+.Fn fuse_get_context
+function conforms to FUSE 2.6.
+.Sh HISTORY
+The
+.Fn fuse_get_context
+function
+first appeared in
+.Ox 5.4 .
+.Sh AUTHORS
+.An Sylvestre Gallon Aq Mt ccna.syl@gmail.com