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