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