Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * include/linux/nfsd/export.h
0004  * 
0005  * Public declarations for NFS exports. The definitions for the
0006  * syscall interface are in nfsctl.h
0007  *
0008  * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
0009  */
0010 
0011 #ifndef _UAPINFSD_EXPORT_H
0012 #define _UAPINFSD_EXPORT_H
0013 
0014 # include <linux/types.h>
0015 
0016 /*
0017  * Important limits for the exports stuff.
0018  */
0019 #define NFSCLNT_IDMAX       1024
0020 #define NFSCLNT_ADDRMAX     16
0021 #define NFSCLNT_KEYMAX      32
0022 
0023 /*
0024  * Export flags.
0025  *
0026  * Please update the expflags[] array in fs/nfsd/export.c when adding
0027  * a new flag.
0028  */
0029 #define NFSEXP_READONLY     0x0001
0030 #define NFSEXP_INSECURE_PORT    0x0002
0031 #define NFSEXP_ROOTSQUASH   0x0004
0032 #define NFSEXP_ALLSQUASH    0x0008
0033 #define NFSEXP_ASYNC        0x0010
0034 #define NFSEXP_GATHERED_WRITES  0x0020
0035 #define NFSEXP_NOREADDIRPLUS    0x0040
0036 #define NFSEXP_SECURITY_LABEL   0x0080
0037 /* 0x100 currently unused */
0038 #define NFSEXP_NOHIDE       0x0200
0039 #define NFSEXP_NOSUBTREECHECK   0x0400
0040 #define NFSEXP_NOAUTHNLM    0x0800      /* Don't authenticate NLM requests - just trust */
0041 #define NFSEXP_MSNFS        0x1000  /* do silly things that MS clients expect; no longer supported */
0042 #define NFSEXP_FSID     0x2000
0043 #define NFSEXP_CROSSMOUNT   0x4000
0044 #define NFSEXP_NOACL        0x8000  /* reserved for possible ACL related use */
0045 /*
0046  * The NFSEXP_V4ROOT flag causes the kernel to give access only to NFSv4
0047  * clients, and only to the single directory that is the root of the
0048  * export; further lookup and readdir operations are treated as if every
0049  * subdirectory was a mountpoint, and ignored if they are not themselves
0050  * exported.  This is used by nfsd and mountd to construct the NFSv4
0051  * pseudofilesystem, which provides access only to paths leading to each
0052  * exported filesystem.
0053  */
0054 #define NFSEXP_V4ROOT       0x10000
0055 #define NFSEXP_PNFS     0x20000
0056 
0057 /* All flags that we claim to support.  (Note we don't support NOACL.) */
0058 #define NFSEXP_ALLFLAGS     0x3FEFF
0059 
0060 /* The flags that may vary depending on security flavor: */
0061 #define NFSEXP_SECINFO_FLAGS    (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \
0062                     | NFSEXP_ALLSQUASH \
0063                     | NFSEXP_INSECURE_PORT)
0064 
0065 
0066 #endif /* _UAPINFSD_EXPORT_H */