-
Notifications
You must be signed in to change notification settings - Fork 34
/
nfs41_build_features.h
176 lines (156 loc) · 5.93 KB
/
nfs41_build_features.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/* NFSv4.1 client for Windows
* Copyright © 2012 The Regents of the University of Michigan
*
* Olga Kornievskaia <[email protected]>
* Casey Bodley <[email protected]>
* Roland Mainz <[email protected]>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* without any warranty; without even the implied warranty of merchantability
* or fitness for a particular purpose. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA
*/
#ifndef _NFS41_DRIVER_BUILDFEATURES_
#define _NFS41_DRIVER_BUILDFEATURES_ 1
/*
* NFS41_DRIVER_FEATURE_* - features for this build, we use this
* for development to add new features which are "off" by default
* until they are ready
*/
/*
* NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES - return local uid/gid values
*/
#define NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES 1
/*
* NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID - give NFS
* files which do not map to a local account a SID in the
* Unix_User+x/Unix_Group+x range
*/
#define NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID 1
/*
* NFS41_DRIVER_FEATURE_IDMAPPER_CYGWIN - use Cygwin shell script
* as to do the idmapping between NFS client and NFS server
*/
#define NFS41_DRIVER_FEATURE_IDMAPPER_CYGWIN 1
/*
* Enable cache for username/groupname to SID
*/
#define NFS41_DRIVER_SID_CACHE 1
/*
* NFS41_DRIVER_MOUNT_DOES_NFS4_PREFIX - nfs_mount.exe and
* not nfs41_np does the \nfs4 prefix between servername and path
* in UNC paths. As side-effect both normal and Windows UNC paths
* always have \nfs4 in them (e.g. \\derfwnb4966_ipv4@2049\nfs4\bigdisk
* (Windows UNC) and //derfwnb4966_ipv4@2049/nfs4/bigdisk (Cygwin UNC)
* instead of just the the Cygwin UNC paths, which constantly confuses
* users madly.
*/
#define NFS41_DRIVER_MOUNT_DOES_NFS4_PREFIX 1
/*
* NFS41_DRIVER_STABILITY_HACKS - use horrible
* hacks to improve stabilty
*/
#define NFS41_DRIVER_STABILITY_HACKS 1
/*
* NFS41_DRIVER_WORKAROUND_FOR_GETATTR_AFTER_CLOSE_HACKS - use
* horrible hacks to improve stabilty because sometimes we use
* |nfs41_open_state| afer a file close in highly parallel
* workloads (e.g. building the gcc compiler in parallel).
*
* #define NFS41_DRIVER_WORKAROUND_FOR_GETATTR_AFTER_CLOSE_HACKS 1
*/
/*
* NFS41_DRIVER_USE_LARGE_SOCKET_RCVSND_BUFFERS - use
* static, large buffer size for socket receive and send buffers
*
* Using a large static buffer avoids the erratic behaviour
* caused by automatic scaling, and avoids that the code
* spends lots of time waiting for the data to be split into
* smaller chunks - this results in much reduced latency.
*
* Another benefit is that this gives a larger TCP window
* (as Windows has no public API to set the TCP window size
* per socket), resulting in better performance over WLAN
* connections.
*/
#define NFS41_DRIVER_USE_LARGE_SOCKET_RCVSND_BUFFERS 1
/*
* Support /usr/bin/newgrp&co, which have a non-default
* |TOKEN_PRIMARY_GROUP|
*/
#define NFS41_DRIVER_SETGID_NEWGRP_SUPPORT 1
/*
* Disable 8DOT3 ShortName filename generation.
* The current code is broken anyway,so we disable it until we
* can implement it better..
*/
#define NFS41_DRIVER_DISABLE_8DOT3_SHORTNAME_GENERATION 1
/*
* NFS41_DRIVER_USE_AUTHENTICATIONID_FOR_MOUNT_NAMESPACE - use
* |TOKEN_GROUPS_AND_PRIVILEGES.AuthenticationId| for
* mount namespace separation between users.
* This avoid that mounts from different users can interfere
* with each other, e.g. if they are mounted with different
* mount (e.g. "rw" vs. "ro") options.
*/
#define NFS41_DRIVER_USE_AUTHENTICATIONID_FOR_MOUNT_NAMESPACE 1
/*
* NFS41_DRIVER_SYSTEM_LUID_MOUNTS_ARE_GLOBAL - mounts created
* with user "SYSTEM" should be available for ALL users on
* a machine.
*/
#define NFS41_DRIVER_SYSTEM_LUID_MOUNTS_ARE_GLOBAL 1
/*
* Default POSIX permission mode bits for new files
* and directories.
* Can be ovrriden with a "NfsV3Attributes" EA
*/
#define NFS41_DRIVER_DEFAULT_DIR_CREATE_MODE (0755)
#define NFS41_DRIVER_DEFAULT_FILE_CREATE_MODE (0644)
/*
* NFS41_DRIVER_DEBUG_FS_NAME - define which filesystem name should
* be returned by |FileFsAttributeInfo|
* 1 == "NFS" (like Microsoft, Exceed and OpenText NFS drivers)
* 2 == "DEBUG-NFS41" (custom value, used for disabling
* hardcoded codepaths for "nfs" drivers, and just treat
* this like a normal non-NFS MiniRDR driver
*/
#define NFS41_DRIVER_DEBUG_FS_NAME 1
/*
* NFS41_DRIVER_ACLS_SETACL_SKIP_WINNULLSID_ACES - Skip ACEs
* with SID==|WinNullSid|
*
* Cygwin generates artificial ACEs with SID user |WinNullSid| to
* encode permission information (follow |CYG_ACE_ISBITS_TO_POSIX()|
* in Cygwin newlib-cygwin/winsup/cygwin/sec/acl.cc
*
* This assumes that the filesystem which storesthe ACL data leaves
* them 1:1 intact - which is not the case for the Linux NFSv4.1
* server (tested with Linux 6.6.32), which transforms the NFSv4.1
* ACLs into POSIX ACLs at setacl time, and the POSIX ACLs back to
* NFSv4 ACLs at getacl time.
* And this lossy transformation screws-up Cygwin completly.
* The best we can do for now is to skip such ACEs, as we have no
* way to detect whether the NFS server supports full NFSv4 ACLs,
* or only POSIX ACLs disguised as NFSv4 ACLs.
*/
#define NFS41_DRIVER_ACLS_SETACL_SKIP_WINNULLSID_ACES 1
/*
* NFS41_DRIVER_WSL_SUPPORT - Enable WSL support
*/
#define NFS41_DRIVER_WSL_SUPPORT 1
/*
* NFS41_DRIVER_WS2022_HACKS - Enable hacks for Windows Server 2022
* compatibility
*/
#define NFS41_DRIVER_WS2022_HACKS 1
#endif /* !_NFS41_DRIVER_BUILDFEATURES_ */