xref: /openbsd-src/lib/libfuse/fuse_get_context.3 (revision ae99b22889f7973babd65a78198c615fbef67c9e)
1*ae99b228Sjmc.\" $OpenBSD: fuse_get_context.3,v 1.2 2018/08/04 06:10:05 jmc Exp $
2311a32cfShelg.\"
3311a32cfShelg.\" Copyright (c) 2018 Helg Bredow <helg@openbsd.org>
4311a32cfShelg.\"
5311a32cfShelg.\" Permission to use, copy, modify, and distribute this software for any
6311a32cfShelg.\" purpose with or without fee is hereby granted, provided that the above
7311a32cfShelg.\" copyright notice and this permission notice appear in all copies.
8311a32cfShelg.\"
9311a32cfShelg.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10311a32cfShelg.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11311a32cfShelg.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12311a32cfShelg.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13311a32cfShelg.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14311a32cfShelg.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15311a32cfShelg.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16311a32cfShelg.\"
17*ae99b228Sjmc.Dd $Mdocdate: August 4 2018 $
18311a32cfShelg.Dt FUSE_GET_CONTEXT 3
19311a32cfShelg.Os
20311a32cfShelg.Sh NAME
21311a32cfShelg.Nm fuse_get_context
22311a32cfShelg.Nd FUSE utility routine
23311a32cfShelg.Sh SYNOPSIS
24311a32cfShelg.In fuse.h
25311a32cfShelg.Ft struct fuse_context *
26311a32cfShelg.Fn fuse_get_context "void"
27311a32cfShelg.Sh DESCRIPTION
28311a32cfShelg.Fn fuse_get_context
29311a32cfShelgreturns a pointer to the structure
30311a32cfShelg.Fa fuse_context .
31311a32cfShelgThis can be used by file systems to obtain information about the
32311a32cfShelgthread that is accessing the file system.
33311a32cfShelgThe returned fuse_context is only valid during the lifetime of a FUSE
34311a32cfShelgoperation.
35311a32cfShelg.Bd -literal
36311a32cfShelgstruct fuse_context {
37311a32cfShelg    struct fuse *   fuse;
38311a32cfShelg    uid_t     uid;		/* effective user id */
39311a32cfShelg    gid_t     gid;		/* effective group id */
40311a32cfShelg    pid_t     pid;		/* thread id */
41311a32cfShelg    void      *private_data;	/* set by file system on mount */
42311a32cfShelg    mode_t    umask;		/* umask of the thread */
43311a32cfShelg};
44311a32cfShelg.Ed
45311a32cfShelg.Sh SEE ALSO
46311a32cfShelg.Xr fuse_new 3
47311a32cfShelg.Sh STANDARDS
48311a32cfShelgThe
49311a32cfShelg.Fn fuse_get_context
50311a32cfShelgfunction conforms to FUSE 2.6.
51311a32cfShelg.Sh HISTORY
52311a32cfShelgThe
53311a32cfShelg.Fn fuse_get_context
54311a32cfShelgfunction
55311a32cfShelgfirst appeared in
56311a32cfShelg.Ox 5.4 .
57311a32cfShelg.Sh AUTHORS
58311a32cfShelg.An Sylvestre Gallon Aq Mt ccna.syl@gmail.com
59