1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2020, Microsoft Corporation.
5 * Author(s): Steve French <stfrench@microsoft.com>
6 * David Howells <dhowells@redhat.com>
12 #include <linux/parser.h>
27 int cifs_parse_smb_version(char *value, struct smb3_fs_context *ctx, bool is_smb3);
38 int cifs_parse_cache_flavor(char *value, struct smb3_fs_context *ctx);
56 struct smb3_fs_context {
69 char *iocharset; /* local code page for mapping to and from Unicode */
70 char source_rfc1001_name[RFC1001_NAME_LEN_WITH_NULL]; /* clnt nb name */
71 char target_rfc1001_name[RFC1001_NAME_LEN_WITH_NULL]; /* srvr nb name */
79 enum securityEnum sectype; /* sectype requested via mnt opts */
80 bool sign; /* was signing requested via mnt opts? */
81 bool ignore_signature:1;
92 bool no_psx_acl:1; /* set if posix acl support should be disabled */
94 bool backupuid_specified; /* mount option backupuid is specified */
95 bool backupgid_specified; /* mount option backupgid is specified */
96 bool no_xattr:1; /* set if xattr (EA) support should be disabled*/
97 bool server_ino:1; /* use inode numbers from server ie UniqueId */
99 bool strict_io:1; /* strict cache behavior */
102 bool remap:1; /* set to remap seven reserved chars in filenames */
103 bool sfu_remap:1; /* remap seven reserved chars ala SFU */
104 bool posix_paths:1; /* unset to not ask for posix pathnames. */
108 bool nullauth:1; /* attempt to authenticate with null user */
109 bool nocase:1; /* request case insensitive filenames */
110 bool nobrl:1; /* disable sending byte range locks to srv */
111 bool nohandlecache:1; /* disable caching dir handles if srvr probs */
112 bool mand_lock:1; /* send mandatory not posix byte range lock reqs */
113 bool seal:1; /* request transport encryption on share */
114 bool nodfs:1; /* Do not request DFS, even if available */
115 bool local_lease:1; /* check leases only on local system, not remote */
118 bool nostrictsync:1; /* do not force expensive SMBflush on every sync */
119 bool no_lease:1; /* disable requesting leases */
120 bool fsc:1; /* enable fscache */
121 bool mfsymlinks:1; /* use Minshall+French Symlinks */
123 bool rwpidforward:1; /* pid forward for read/write operations */
127 bool resilient:1; /* noresilient not required since not fored for CA */
131 bool use_client_guid:1;
132 /* reuse existing guid for multichannel */
133 u8 client_guid[SMB2_CLIENT_GUID_SIZE];
137 unsigned int min_offload;
138 bool sockopt_tcp_nodelay:1;
139 unsigned long actimeo; /* attribute cache timeout (jiffies) */
140 struct smb_version_operations *ops;
141 struct smb_version_values *vals;
143 struct sockaddr_storage dstaddr; /* destination address */
144 struct sockaddr_storage srcaddr; /* allow binding to a local IP */
145 struct nls_table *local_nls;
146 unsigned int echo_interval; /* echo interval in secs */
147 __u64 snapshot_time; /* needed for timewarp tokens */
148 __u32 handle_timeout; /* persistent and durable handle timeout in ms */
149 unsigned int max_credits; /* smb3 max_credits 10 < credits < 60000 */
150 unsigned int max_channels;
151 __u16 compression; /* compression algorithm 0xFFFF default 0=disabled */
152 bool rootfs:1; /* if it's a SMB root file system */
155 extern int cifs_parse_security_flavors(char *value, struct smb3_fs_context *ctx);
156 extern int smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx);