xref: /OK3568_Linux_fs/kernel/include/uapi/linux/nfsd/export.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * include/linux/nfsd/export.h
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Public declarations for NFS exports. The definitions for the
6*4882a593Smuzhiyun  * syscall interface are in nfsctl.h
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #ifndef _UAPINFSD_EXPORT_H
12*4882a593Smuzhiyun #define _UAPINFSD_EXPORT_H
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun # include <linux/types.h>
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun /*
17*4882a593Smuzhiyun  * Important limits for the exports stuff.
18*4882a593Smuzhiyun  */
19*4882a593Smuzhiyun #define NFSCLNT_IDMAX		1024
20*4882a593Smuzhiyun #define NFSCLNT_ADDRMAX		16
21*4882a593Smuzhiyun #define NFSCLNT_KEYMAX		32
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun /*
24*4882a593Smuzhiyun  * Export flags.
25*4882a593Smuzhiyun  *
26*4882a593Smuzhiyun  * Please update the expflags[] array in fs/nfsd/export.c when adding
27*4882a593Smuzhiyun  * a new flag.
28*4882a593Smuzhiyun  */
29*4882a593Smuzhiyun #define NFSEXP_READONLY		0x0001
30*4882a593Smuzhiyun #define NFSEXP_INSECURE_PORT	0x0002
31*4882a593Smuzhiyun #define NFSEXP_ROOTSQUASH	0x0004
32*4882a593Smuzhiyun #define NFSEXP_ALLSQUASH	0x0008
33*4882a593Smuzhiyun #define NFSEXP_ASYNC		0x0010
34*4882a593Smuzhiyun #define NFSEXP_GATHERED_WRITES	0x0020
35*4882a593Smuzhiyun #define NFSEXP_NOREADDIRPLUS    0x0040
36*4882a593Smuzhiyun #define NFSEXP_SECURITY_LABEL	0x0080
37*4882a593Smuzhiyun /* 0x100 currently unused */
38*4882a593Smuzhiyun #define NFSEXP_NOHIDE		0x0200
39*4882a593Smuzhiyun #define NFSEXP_NOSUBTREECHECK	0x0400
40*4882a593Smuzhiyun #define	NFSEXP_NOAUTHNLM	0x0800		/* Don't authenticate NLM requests - just trust */
41*4882a593Smuzhiyun #define NFSEXP_MSNFS		0x1000	/* do silly things that MS clients expect; no longer supported */
42*4882a593Smuzhiyun #define NFSEXP_FSID		0x2000
43*4882a593Smuzhiyun #define	NFSEXP_CROSSMOUNT	0x4000
44*4882a593Smuzhiyun #define	NFSEXP_NOACL		0x8000	/* reserved for possible ACL related use */
45*4882a593Smuzhiyun /*
46*4882a593Smuzhiyun  * The NFSEXP_V4ROOT flag causes the kernel to give access only to NFSv4
47*4882a593Smuzhiyun  * clients, and only to the single directory that is the root of the
48*4882a593Smuzhiyun  * export; further lookup and readdir operations are treated as if every
49*4882a593Smuzhiyun  * subdirectory was a mountpoint, and ignored if they are not themselves
50*4882a593Smuzhiyun  * exported.  This is used by nfsd and mountd to construct the NFSv4
51*4882a593Smuzhiyun  * pseudofilesystem, which provides access only to paths leading to each
52*4882a593Smuzhiyun  * exported filesystem.
53*4882a593Smuzhiyun  */
54*4882a593Smuzhiyun #define	NFSEXP_V4ROOT		0x10000
55*4882a593Smuzhiyun #define NFSEXP_PNFS		0x20000
56*4882a593Smuzhiyun 
57*4882a593Smuzhiyun /* All flags that we claim to support.  (Note we don't support NOACL.) */
58*4882a593Smuzhiyun #define NFSEXP_ALLFLAGS		0x3FEFF
59*4882a593Smuzhiyun 
60*4882a593Smuzhiyun /* The flags that may vary depending on security flavor: */
61*4882a593Smuzhiyun #define NFSEXP_SECINFO_FLAGS	(NFSEXP_READONLY | NFSEXP_ROOTSQUASH \
62*4882a593Smuzhiyun 					| NFSEXP_ALLSQUASH \
63*4882a593Smuzhiyun 					| NFSEXP_INSECURE_PORT)
64*4882a593Smuzhiyun 
65*4882a593Smuzhiyun 
66*4882a593Smuzhiyun #endif /* _UAPINFSD_EXPORT_H */
67