xref: /openbsd/lib/libfuse/fuse_get_context.3 (revision 76d0caae)
1.\" $OpenBSD: fuse_get_context.3,v 1.2 2018/08/04 06:10:05 jmc Exp $
2.\"
3.\" Copyright (c) 2018 Helg Bredow <helg@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: August 4 2018 $
18.Dt FUSE_GET_CONTEXT 3
19.Os
20.Sh NAME
21.Nm fuse_get_context
22.Nd FUSE utility routine
23.Sh SYNOPSIS
24.In fuse.h
25.Ft struct fuse_context *
26.Fn fuse_get_context "void"
27.Sh DESCRIPTION
28.Fn fuse_get_context
29returns a pointer to the structure
30.Fa fuse_context .
31This can be used by file systems to obtain information about the
32thread that is accessing the file system.
33The returned fuse_context is only valid during the lifetime of a FUSE
34operation.
35.Bd -literal
36struct fuse_context {
37    struct fuse *   fuse;
38    uid_t     uid;		/* effective user id */
39    gid_t     gid;		/* effective group id */
40    pid_t     pid;		/* thread id */
41    void      *private_data;	/* set by file system on mount */
42    mode_t    umask;		/* umask of the thread */
43};
44.Ed
45.Sh SEE ALSO
46.Xr fuse_new 3
47.Sh STANDARDS
48The
49.Fn fuse_get_context
50function conforms to FUSE 2.6.
51.Sh HISTORY
52The
53.Fn fuse_get_context
54function
55first appeared in
56.Ox 5.4 .
57.Sh AUTHORS
58.An Sylvestre Gallon Aq Mt ccna.syl@gmail.com
59