export.h 2.1 KB

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