Print this page
NEX-17779 Creating named streams on existing files is not quite right
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-17289 Minimal SMB 3.0.2 support
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-15069 smtorture smb2.create.blob is failed
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-15069 smtorture smb2.create.blob is failed
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-6276 SMB sparse file support
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-5844 want SMB2 ioctl FSCTL_SRV_COPYCHUNK
NEX-6124 smb_fsop_read/write should allow file != sr->fid_ofile
NEX-6125 smbtorture invalid response with smb2.ioctl
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
SMB-115 Support SMB path names with length > 1024
SMB-100 Internal error if filename is too long
Approved by: Gordon Ross <gwr@nexenta.com>
SMB-11 SMB2 message parse & dispatch
SMB-12 SMB2 Negotiate Protocol
SMB-13 SMB2 Session Setup
SMB-14 SMB2 Logoff
SMB-15 SMB2 Tree Connect
SMB-16 SMB2 Tree Disconnect
SMB-17 SMB2 Create
SMB-18 SMB2 Close
SMB-19 SMB2 Flush
SMB-20 SMB2 Read
SMB-21 SMB2 Write
SMB-22 SMB2 Lock/Unlock
SMB-23 SMB2 Ioctl
SMB-24 SMB2 Cancel
SMB-25 SMB2 Echo
SMB-26 SMB2 Query Dir
SMB-27 SMB2 Change Notify
SMB-28 SMB2 Query Info
SMB-29 SMB2 Set Info
SMB-30 SMB2 Oplocks
SMB-53 SMB2 Create Context options
(SMB2 code review cleanup 1, 2, 3)
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/smbsrv/smb_fsops.h
+++ new/usr/src/uts/common/smbsrv/smb_fsops.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 *
25 - * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
25 + * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
26 26 */
27 27
28 28 #ifndef _SMBSRV_SMB_FSOPS_H
29 29 #define _SMBSRV_SMB_FSOPS_H
30 30
31 31 /*
32 32 * This header file contains all the functions for the interface between
33 33 * the smb layer and the fs layer.
34 34 */
35 35 #include <smbsrv/string.h>
36 36 #include <smbsrv/smbinfo.h>
37 37 #include <smbsrv/smb_ktypes.h>
38 38 #include <smbsrv/smb_vops.h>
39 39 #include <sys/callb.h>
40 40 #include <sys/flock.h>
41 41
42 42 #ifdef __cplusplus
43 43 extern "C" {
44 44 #endif
45 45
46 46 int smb_fsop_amask_to_omode(uint32_t);
|
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
47 47
48 48 int smb_fsop_open(smb_node_t *, int, cred_t *);
49 49 void smb_fsop_close(smb_node_t *, int, cred_t *);
50 50
51 51 int smb_fsop_oplock_install(smb_node_t *, int);
52 52 void smb_fsop_oplock_uninstall(smb_node_t *);
53 53
54 54 int smb_fsop_create(smb_request_t *, cred_t *, smb_node_t *,
55 55 char *, smb_attr_t *, smb_node_t **);
56 56
57 +int
58 +smb_fsop_create_stream(smb_request_t *, cred_t *, smb_node_t *, smb_node_t *,
59 + char *, int, smb_attr_t *, smb_node_t **);
60 +
57 61 int smb_fsop_mkdir(smb_request_t *, cred_t *, smb_node_t *,
58 62 char *, smb_attr_t *, smb_node_t **);
59 63
60 64 int smb_fsop_remove(smb_request_t *sr, cred_t *cr, smb_node_t *,
61 65 char *, uint32_t);
62 66
63 67 int smb_fsop_rmdir(smb_request_t *, cred_t *, smb_node_t *, char *, uint32_t);
64 68
65 69 int smb_fsop_getattr(smb_request_t *, cred_t *, smb_node_t *, smb_attr_t *);
66 70
67 71 int smb_maybe_mangled_name(char *);
68 72
69 73 int smb_fsop_link(smb_request_t *, cred_t *, smb_node_t *, smb_node_t *,
70 74 char *);
71 75
72 76 int smb_fsop_rename(smb_request_t *, cred_t *,
73 77 smb_node_t *, char *, smb_node_t *, char *);
74 78
75 79 int smb_fsop_setattr(smb_request_t *, cred_t *, smb_node_t *, smb_attr_t *);
76 -int smb_fsop_set_data_length(smb_request_t *sr, cred_t *cr, smb_node_t *,
77 - offset_t);
78 80
79 -int smb_fsop_read(smb_request_t *, cred_t *, smb_node_t *, uio_t *);
81 +int smb_fsop_freesp(smb_request_t *sr, cred_t *cr, smb_ofile_t *,
82 + off64_t, off64_t);
80 83
81 -int smb_fsop_write(smb_request_t *, cred_t *, smb_node_t *, uio_t *,
82 - uint32_t *, int);
84 +int smb_fsop_read(smb_request_t *, cred_t *, smb_node_t *, smb_ofile_t *,
85 + uio_t *, int);
83 86
87 +int smb_fsop_write(smb_request_t *, cred_t *, smb_node_t *, smb_ofile_t *,
88 + uio_t *, uint32_t *, int);
89 +
90 +int smb_fsop_next_alloc_range(cred_t *, smb_node_t *, off64_t *, off64_t *);
91 +
84 92 int smb_fsop_statfs(cred_t *, smb_node_t *, struct statvfs64 *);
85 93
86 94 uint32_t smb_fsop_remove_streams(smb_request_t *, cred_t *, smb_node_t *);
87 95
88 96 int smb_fsop_access(smb_request_t *, cred_t *, smb_node_t *, uint32_t);
89 97
90 98 void smb_fsop_eaccess(smb_request_t *, cred_t *, smb_node_t *, uint32_t *);
91 99
100 +int smb_fsop_lookup_file(smb_request_t *, cred_t *, int,
101 + smb_node_t *, smb_node_t *, char *, char **, smb_node_t **);
102 +
92 103 int smb_fsop_lookup_name(smb_request_t *, cred_t *, int,
93 104 smb_node_t *, smb_node_t *, char *, smb_node_t **);
94 105
95 106 int smb_fsop_lookup(smb_request_t *, cred_t *, int,
96 107 smb_node_t *, smb_node_t *, char *, smb_node_t **);
97 108
109 +int smb_fsop_lookup_stream(smb_request_t *, cred_t *, int, smb_node_t *,
110 + smb_node_t *, char *, smb_node_t **);
111 +
98 112 int smb_fsop_commit(smb_request_t *, cred_t *, smb_node_t *);
99 113
100 114 int smb_fsop_aclread(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
101 115 int smb_fsop_aclwrite(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
102 116 acl_type_t smb_fsop_acltype(smb_node_t *);
103 117 int smb_fsop_sdread(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *);
104 118 int smb_fsop_sdwrite(smb_request_t *, cred_t *, smb_node_t *, smb_fssd_t *,
105 119 int);
106 120
107 121 uint32_t smb_fsop_shrlock(cred_t *, smb_node_t *, uint32_t, uint32_t, uint32_t);
108 122 void smb_fsop_unshrlock(cred_t *, smb_node_t *, uint32_t);
109 123 int smb_fsop_frlock(smb_node_t *, smb_lock_t *, boolean_t, cred_t *);
110 124
111 125 /*
112 126 * Lookup-related flags
113 127 *
114 128 * SMB_FOLLOW_LINKS Follow symbolic links.
115 129 * SMB_IGNORE_CASE Perform case-insensitive lookup.
|
↓ open down ↓ |
8 lines elided |
↑ open up ↑ |
116 130 * SMB_CATIA Perform CATIA character substitution.
117 131 * SMB_ABE Perform Access based enumeration/lookup.
118 132 * SMB_CASE_SENSITIVE Don't set SMB_IGNORE_CASE based on tree.
119 133 */
120 134
121 135 #define SMB_FOLLOW_LINKS 0x00000001
122 136 #define SMB_IGNORE_CASE 0x00000002
123 137 #define SMB_CATIA 0x00000004
124 138 #define SMB_ABE 0x00000008
125 139 #define SMB_CASE_SENSITIVE 0x00000010
140 +#define SMB_EDIRENT 0x00000020
126 141
127 142 /*
128 143 * Increased MAXPATHLEN for SMB. Essentially, we want to allow a
129 144 * share path up to MAXPATHLEN plus a relative path of MAXPATHLEN.
130 145 */
131 146 #define SMB_MAXPATHLEN (2 * MAXPATHLEN)
132 147
133 148 #ifdef __cplusplus
134 149 }
135 150 #endif
136 151
137 152 #endif /* _SMBSRV_SMB_FSOPS_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX