2 Unix SMB/CIFS implementation.
4 Copyright (C) Stefan (metze) Metzmacher 2003
5 Copyright (C) Volker Lendecke 2009
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 /*******************************************************************
25 Don't access conn->vfs.ops.* directly!!!
27 (Fixes should go also into the vfs_opaque_* and vfs_next_* macros!)
28 ********************************************************************/
31 #define SMB_VFS_CONNECT(conn, service, user) \
32 smb_vfs_call_connect((conn)->vfs_handles, (service), (user))
33 #define SMB_VFS_NEXT_CONNECT(handle, service, user) \
34 smb_vfs_call_connect((handle)->next, (service), (user))
36 #define SMB_VFS_DISCONNECT(conn) \
37 smb_vfs_call_disconnect((conn)->vfs_handles)
38 #define SMB_VFS_NEXT_DISCONNECT(handle) \
39 smb_vfs_call_disconnect((handle)->next)
41 #define SMB_VFS_DISK_FREE(conn, path, small_query, bsize, dfree ,dsize) \
42 smb_vfs_call_disk_free((conn)->vfs_handles, (path), (small_query), (bsize), (dfree), (dsize))
43 #define SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize, dfree ,dsize)\
44 smb_vfs_call_disk_free((handle)->next, (path), (small_query), (bsize), (dfree), (dsize))
46 #define SMB_VFS_GET_QUOTA(conn, qtype, id, qt) \
47 smb_vfs_call_get_quota((conn)->vfs_handles, (qtype), (id), (qt))
48 #define SMB_VFS_NEXT_GET_QUOTA(handle, qtype, id, qt) \
49 smb_vfs_call_get_quota((handle)->next, (qtype), (id), (qt))
51 #define SMB_VFS_SET_QUOTA(conn, qtype, id, qt) \
52 smb_vfs_call_set_quota((conn)->vfs_handles, (qtype), (id), (qt))
53 #define SMB_VFS_NEXT_SET_QUOTA(handle, qtype, id, qt) \
54 smb_vfs_call_set_quota((handle)->next, (qtype), (id), (qt))
56 #define SMB_VFS_GET_SHADOW_COPY_DATA(fsp,shadow_copy_data,labels) \
57 smb_vfs_call_get_shadow_copy_data((fsp)->conn->vfs_handles, (fsp), (shadow_copy_data), (labels))
58 #define SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data ,labels) \
59 smb_vfs_call_get_shadow_copy_data((handle)->next, (fsp), (shadow_copy_data), (labels))
61 #define SMB_VFS_STATVFS(conn, path, statbuf) \
62 smb_vfs_call_statvfs((conn)->vfs_handles, (path), (statbuf))
63 #define SMB_VFS_NEXT_STATVFS(handle, path, statbuf) \
64 smb_vfs_call_statvfs((handle)->next, (path), (statbuf))
66 #define SMB_VFS_FS_CAPABILITIES(conn, p_ts_res) \
67 smb_vfs_call_fs_capabilities((conn)->vfs_handles, (p_ts_res))
68 #define SMB_VFS_NEXT_FS_CAPABILITIES(handle, p_ts_res) \
69 smb_vfs_call_fs_capabilities((handle)->next, (p_ts_res))
72 * Note: that "struct dfs_GetDFSReferral *r"
73 * needs to be a valid TALLOC_CTX
75 #define SMB_VFS_GET_DFS_REFERRALS(conn, r) \
76 smb_vfs_call_get_dfs_referrals((conn)->vfs_handles, (r))
77 #define SMB_VFS_NEXT_GET_DFS_REFERRALS(handle, r) \
78 smb_vfs_call_get_dfs_referrals((handle)->next, (r))
80 /* Directory operations */
81 #define SMB_VFS_OPENDIR(conn, fname, mask, attr) \
82 smb_vfs_call_opendir((conn)->vfs_handles, (fname), (mask), (attr))
83 #define SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr) \
84 smb_vfs_call_opendir((handle)->next, (fname), (mask), (attr))
86 #define SMB_VFS_FDOPENDIR(fsp, mask, attr) \
87 smb_vfs_call_fdopendir((fsp)->conn->vfs_handles, (fsp), (mask), (attr))
88 #define SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr) \
89 smb_vfs_call_fdopendir((handle)->next, (fsp), (mask), (attr))
91 #define SMB_VFS_READDIR(conn, dirp, sbuf) \
92 smb_vfs_call_readdir((conn)->vfs_handles, (dirp), (sbuf))
93 #define SMB_VFS_NEXT_READDIR(handle, dirp, sbuf) \
94 smb_vfs_call_readdir((handle)->next, (dirp), (sbuf))
96 #define SMB_VFS_SEEKDIR(conn, dirp, offset) \
97 smb_vfs_call_seekdir((conn)->vfs_handles, (dirp), (offset))
98 #define SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset) \
99 smb_vfs_call_seekdir((handle)->next, (dirp), (offset))
101 #define SMB_VFS_TELLDIR(conn, dirp) \
102 smb_vfs_call_telldir((conn)->vfs_handles, (dirp))
103 #define SMB_VFS_NEXT_TELLDIR(handle, dirp) \
104 smb_vfs_call_telldir((handle)->next, (dirp))
106 #define SMB_VFS_REWINDDIR(conn, dirp) \
107 smb_vfs_call_rewind_dir((conn)->vfs_handles, (dirp))
108 #define SMB_VFS_NEXT_REWINDDIR(handle, dirp) \
109 smb_vfs_call_rewind_dir((handle)->next, (dirp))
111 #define SMB_VFS_MKDIR(conn, path, mode) \
112 smb_vfs_call_mkdir((conn)->vfs_handles,(path), (mode))
113 #define SMB_VFS_NEXT_MKDIR(handle, path, mode) \
114 smb_vfs_call_mkdir((handle)->next,(path), (mode))
116 #define SMB_VFS_RMDIR(conn, path) \
117 smb_vfs_call_rmdir((conn)->vfs_handles, (path))
118 #define SMB_VFS_NEXT_RMDIR(handle, path) \
119 smb_vfs_call_rmdir((handle)->next, (path))
121 #define SMB_VFS_CLOSEDIR(conn, dir) \
122 smb_vfs_call_closedir((conn)->vfs_handles, dir)
123 #define SMB_VFS_NEXT_CLOSEDIR(handle, dir) \
124 smb_vfs_call_closedir((handle)->next, (dir))
126 #define SMB_VFS_INIT_SEARCH_OP(conn, dirp) \
127 smb_vfs_call_init_search_op((conn)->vfs_handles, (dirp))
128 #define SMB_VFS_NEXT_INIT_SEARCH_OP(handle, dirp) \
129 smb_vfs_call_init_search_op((handle)->next, (dirp))
131 /* File operations */
132 #define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) \
133 smb_vfs_call_open((conn)->vfs_handles, (fname), (fsp), (flags), (mode))
134 #define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) \
135 smb_vfs_call_open((handle)->next, (fname), (fsp), (flags), (mode))
137 #define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, \
138 create_options, file_attributes, oplock_request, allocation_size, private_flags, sd, ea_list, result, pinfo) \
139 smb_vfs_call_create_file((conn)->vfs_handles, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), \
140 (create_options), (file_attributes), (oplock_request), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo))
141 #define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, \
142 create_options, file_attributes, oplock_request, allocation_size, private_flags, sd, ea_list, result, pinfo) \
143 smb_vfs_call_create_file((handle)->next, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), \
144 (create_options), (file_attributes), (oplock_request), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo))
146 #define SMB_VFS_CLOSE(fsp) \
147 smb_vfs_call_close((fsp)->conn->vfs_handles, (fsp))
148 #define SMB_VFS_NEXT_CLOSE(handle, fsp) \
149 smb_vfs_call_close((handle)->next, (fsp))
151 #define SMB_VFS_READ(fsp, data, n) \
152 smb_vfs_call_read((fsp)->conn->vfs_handles, (fsp), (data), (n))
153 #define SMB_VFS_NEXT_READ(handle, fsp, data, n) \
154 smb_vfs_call_read((handle)->next, (fsp), (data), (n))
156 #define SMB_VFS_PREAD(fsp, data, n, off) \
157 smb_vfs_call_pread((fsp)->conn->vfs_handles, (fsp), (data), (n), (off))
158 #define SMB_VFS_NEXT_PREAD(handle, fsp, data, n, off) \
159 smb_vfs_call_pread((handle)->next, (fsp), (data), (n), (off))
161 #define SMB_VFS_PREAD_SEND(mem_ctx, ev, fsp, data, n, off) \
162 smb_vfs_call_pread_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \
163 (fsp), (data), (n), (off))
164 #define SMB_VFS_NEXT_PREAD_SEND(mem_ctx, ev, handle, fsp, data, n, off) \
165 smb_vfs_call_pread_send((handle)->next, (mem_ctx), (ev), (fsp), \
168 #define SMB_VFS_WRITE(fsp, data, n) \
169 smb_vfs_call_write((fsp)->conn->vfs_handles, (fsp), (data), (n))
170 #define SMB_VFS_NEXT_WRITE(handle, fsp, data, n) \
171 smb_vfs_call_write((handle)->next, (fsp), (data), (n))
173 #define SMB_VFS_PWRITE(fsp, data, n, off) \
174 smb_vfs_call_pwrite((fsp)->conn->vfs_handles, (fsp), (data), (n), (off))
175 #define SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, off) \
176 smb_vfs_call_pwrite((handle)->next, (fsp), (data), (n), (off))
178 #define SMB_VFS_PWRITE_SEND(mem_ctx, ev, fsp, data, n, off) \
179 smb_vfs_call_pwrite_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \
180 (fsp), (data), (n), (off))
181 #define SMB_VFS_NEXT_PWRITE_SEND(mem_ctx, ev, handle, fsp, data, n, off) \
182 smb_vfs_call_pwrite_send((handle)->next, (mem_ctx), (ev), (fsp), \
185 #define SMB_VFS_LSEEK(fsp, offset, whence) \
186 smb_vfs_call_lseek((fsp)->conn->vfs_handles, (fsp), (offset), (whence))
187 #define SMB_VFS_NEXT_LSEEK(handle, fsp, offset, whence) \
188 smb_vfs_call_lseek((handle)->next, (fsp), (offset), (whence))
190 #define SMB_VFS_SENDFILE(tofd, fromfsp, header, offset, count) \
191 smb_vfs_call_sendfile((fromfsp)->conn->vfs_handles, (tofd), (fromfsp), (header), (offset), (count))
192 #define SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp, header, offset, count) \
193 smb_vfs_call_sendfile((handle)->next, (tofd), (fromfsp), (header), (offset), (count))
195 #define SMB_VFS_RECVFILE(fromfd, tofsp, offset, count) \
196 smb_vfs_call_recvfile((tofsp)->conn->vfs_handles, (fromfd), (tofsp), (offset), (count))
197 #define SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, count) \
198 smb_vfs_call_recvfile((handle)->next, (fromfd), (tofsp), (offset), (count))
200 #define SMB_VFS_RENAME(conn, old, new) \
201 smb_vfs_call_rename((conn)->vfs_handles, (old), (new))
202 #define SMB_VFS_NEXT_RENAME(handle, old, new) \
203 smb_vfs_call_rename((handle)->next, (old), (new))
205 #define SMB_VFS_FSYNC(fsp) \
206 smb_vfs_call_fsync((fsp)->conn->vfs_handles, (fsp))
207 #define SMB_VFS_NEXT_FSYNC(handle, fsp) \
208 smb_vfs_call_fsync((handle)->next, (fsp))
210 #define SMB_VFS_FSYNC_SEND(mem_ctx, ev, fsp) \
211 smb_vfs_call_fsync_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \
213 #define SMB_VFS_NEXT_FSYNC_SEND(mem_ctx, ev, handle, fsp) \
214 smb_vfs_call_fsync_send((handle)->next, (mem_ctx), (ev), (fsp))
216 #define SMB_VFS_STAT(conn, smb_fname) \
217 smb_vfs_call_stat((conn)->vfs_handles, (smb_fname))
218 #define SMB_VFS_NEXT_STAT(handle, smb_fname) \
219 smb_vfs_call_stat((handle)->next, (smb_fname))
221 #define SMB_VFS_FSTAT(fsp, sbuf) \
222 smb_vfs_call_fstat((fsp)->conn->vfs_handles, (fsp), (sbuf))
223 #define SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf) \
224 smb_vfs_call_fstat((handle)->next, (fsp), (sbuf))
226 #define SMB_VFS_LSTAT(conn, smb_fname) \
227 smb_vfs_call_lstat((conn)->vfs_handles, (smb_fname))
228 #define SMB_VFS_NEXT_LSTAT(handle, smb_fname) \
229 smb_vfs_call_lstat((handle)->next, (smb_fname))
231 #define SMB_VFS_GET_ALLOC_SIZE(conn, fsp, sbuf) \
232 smb_vfs_call_get_alloc_size((conn)->vfs_handles, (fsp), (sbuf))
233 #define SMB_VFS_NEXT_GET_ALLOC_SIZE(conn, fsp, sbuf) \
234 smb_vfs_call_get_alloc_size((conn)->next, (fsp), (sbuf))
236 #define SMB_VFS_UNLINK(conn, path) \
237 smb_vfs_call_unlink((conn)->vfs_handles, (path))
238 #define SMB_VFS_NEXT_UNLINK(handle, path) \
239 smb_vfs_call_unlink((handle)->next, (path))
241 #define SMB_VFS_CHMOD(conn, path, mode) \
242 smb_vfs_call_chmod((conn)->vfs_handles, (path), (mode))
243 #define SMB_VFS_NEXT_CHMOD(handle, path, mode) \
244 smb_vfs_call_chmod((handle)->next, (path), (mode))
246 #define SMB_VFS_FCHMOD(fsp, mode) \
247 smb_vfs_call_fchmod((fsp)->conn->vfs_handles, (fsp), (mode))
248 #define SMB_VFS_NEXT_FCHMOD(handle, fsp, mode) \
249 smb_vfs_call_fchmod((handle)->next, (fsp), (mode))
251 #define SMB_VFS_CHOWN(conn, path, uid, gid) \
252 smb_vfs_call_chown((conn)->vfs_handles, (path), (uid), (gid))
253 #define SMB_VFS_NEXT_CHOWN(handle, path, uid, gid) \
254 smb_vfs_call_chown((handle)->next, (path), (uid), (gid))
256 #define SMB_VFS_FCHOWN(fsp, uid, gid) \
257 smb_vfs_call_fchown((fsp)->conn->vfs_handles, (fsp), (uid), (gid))
258 #define SMB_VFS_NEXT_FCHOWN(handle, fsp, uid, gid) \
259 smb_vfs_call_fchown((handle)->next, (fsp), (uid), (gid))
261 #define SMB_VFS_LCHOWN(conn, path, uid, gid) \
262 smb_vfs_call_lchown((conn)->vfs_handles, (path), (uid), (gid))
263 #define SMB_VFS_NEXT_LCHOWN(handle, path, uid, gid) \
264 smb_vfs_call_lchown((handle)->next, (path), (uid), (gid))
266 #define SMB_VFS_CHDIR(conn, path) \
267 smb_vfs_call_chdir((conn)->vfs_handles, (path))
268 #define SMB_VFS_NEXT_CHDIR(handle, path) \
269 smb_vfs_call_chdir((handle)->next, (path))
271 #define SMB_VFS_GETWD(conn) \
272 smb_vfs_call_getwd((conn)->vfs_handles)
273 #define SMB_VFS_NEXT_GETWD(handle) \
274 smb_vfs_call_getwd((handle)->next)
276 #define SMB_VFS_NTIMES(conn, path, ts) \
277 smb_vfs_call_ntimes((conn)->vfs_handles, (path), (ts))
278 #define SMB_VFS_NEXT_NTIMES(handle, path, ts) \
279 smb_vfs_call_ntimes((handle)->next, (path), (ts))
281 #define SMB_VFS_FTRUNCATE(fsp, offset) \
282 smb_vfs_call_ftruncate((fsp)->conn->vfs_handles, (fsp), (offset))
283 #define SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset) \
284 smb_vfs_call_ftruncate((handle)->next, (fsp), (offset))
286 #define SMB_VFS_FALLOCATE(fsp, mode, offset, len) \
287 smb_vfs_call_fallocate((fsp)->conn->vfs_handles, (fsp), (mode), (offset), (len))
288 #define SMB_VFS_NEXT_FALLOCATE(handle, fsp, mode, offset, len) \
289 smb_vfs_call_fallocate((handle)->next, (fsp), (mode), (offset), (len))
291 #define SMB_VFS_LOCK(fsp, op, offset, count, type) \
292 smb_vfs_call_lock((fsp)->conn->vfs_handles, (fsp), (op), (offset), (count), (type))
293 #define SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type) \
294 smb_vfs_call_lock((handle)->next, (fsp), (op), (offset), (count), (type))
296 #define SMB_VFS_KERNEL_FLOCK(fsp, share_mode, access_mask) \
297 smb_vfs_call_kernel_flock((fsp)->conn->vfs_handles, (fsp), (share_mode), (access_mask))
298 #define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode, access_mask) \
299 smb_vfs_call_kernel_flock((handle)->next, (fsp), (share_mode), (access_mask))
301 #define SMB_VFS_LINUX_SETLEASE(fsp, leasetype) \
302 smb_vfs_call_linux_setlease((fsp)->conn->vfs_handles, (fsp), (leasetype))
303 #define SMB_VFS_NEXT_LINUX_SETLEASE(handle, fsp, leasetype) \
304 smb_vfs_call_linux_setlease((handle)->next, (fsp), (leasetype))
306 #define SMB_VFS_GETLOCK(fsp, poffset, pcount, ptype, ppid) \
307 smb_vfs_call_getlock((fsp)->conn->vfs_handles, (fsp), (poffset), (pcount), (ptype), (ppid))
308 #define SMB_VFS_NEXT_GETLOCK(handle, fsp, poffset, pcount, ptype, ppid) \
309 smb_vfs_call_getlock((handle)->next, (fsp), (poffset), (pcount), (ptype), (ppid))
311 #define SMB_VFS_SYMLINK(conn, oldpath, newpath) \
312 smb_vfs_call_symlink((conn)->vfs_handles, (oldpath), (newpath))
313 #define SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath) \
314 smb_vfs_call_symlink((handle)->next, (oldpath), (newpath))
316 #define SMB_VFS_READLINK(conn, path, buf, bufsiz) \
317 smb_vfs_call_readlink((conn)->vfs_handles, (path), (buf), (bufsiz))
318 #define SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz) \
319 smb_vfs_call_readlink((handle)->next, (path), (buf), (bufsiz))
321 #define SMB_VFS_LINK(conn, oldpath, newpath) \
322 smb_vfs_call_link((conn)->vfs_handles, (oldpath), (newpath))
323 #define SMB_VFS_NEXT_LINK(handle, oldpath, newpath) \
324 smb_vfs_call_link((handle)->next, (oldpath), (newpath))
326 #define SMB_VFS_MKNOD(conn, path, mode, dev) \
327 smb_vfs_call_mknod((conn)->vfs_handles, (path), (mode), (dev))
328 #define SMB_VFS_NEXT_MKNOD(handle, path, mode, dev) \
329 smb_vfs_call_mknod((handle)->next, (path), (mode), (dev))
331 #define SMB_VFS_REALPATH(conn, path) \
332 smb_vfs_call_realpath((conn)->vfs_handles, (path))
333 #define SMB_VFS_NEXT_REALPATH(handle, path) \
334 smb_vfs_call_realpath((handle)->next, (path))
336 #define SMB_VFS_NOTIFY_WATCH(conn, ctx, path, filter, subdir_filter, callback, private_data, handle_p) \
337 smb_vfs_call_notify_watch((conn)->vfs_handles, (ctx), (path), (filter), (subdir_filter), (callback), (private_data), (handle_p))
338 #define SMB_VFS_NEXT_NOTIFY_WATCH(conn, ctx, path, filter, subdir_filter, callback, private_data, handle_p) \
339 smb_vfs_call_notify_watch((conn)->next, (ctx), (path), (filter), (subdir_filter), (callback), (private_data), (handle_p))
341 #define SMB_VFS_CHFLAGS(conn, path, flags) \
342 smb_vfs_call_chflags((conn)->vfs_handles, (path), (flags))
343 #define SMB_VFS_NEXT_CHFLAGS(handle, path, flags) \
344 smb_vfs_call_chflags((handle)->next, (path), (flags))
346 #define SMB_VFS_FILE_ID_CREATE(conn, sbuf) \
347 smb_vfs_call_file_id_create((conn)->vfs_handles, (sbuf))
348 #define SMB_VFS_NEXT_FILE_ID_CREATE(handle, sbuf) \
349 smb_vfs_call_file_id_create((handle)->next, (sbuf))
351 #define SMB_VFS_STREAMINFO(conn, fsp, fname, mem_ctx, num_streams, streams) \
352 smb_vfs_call_streaminfo((conn)->vfs_handles, (fsp), (fname), (mem_ctx), (num_streams), (streams))
353 #define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) \
354 smb_vfs_call_streaminfo((handle)->next, (fsp), (fname), (mem_ctx), (num_streams), (streams))
356 #define SMB_VFS_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name) \
357 smb_vfs_call_get_real_filename((conn)->vfs_handles, (path), (name), (mem_ctx), (found_name))
358 #define SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name, mem_ctx, found_name) \
359 smb_vfs_call_get_real_filename((handle)->next, (path), (name), (mem_ctx), (found_name))
361 #define SMB_VFS_CONNECTPATH(conn, fname) \
362 smb_vfs_call_connectpath((conn)->vfs_handles, (fname))
363 #define SMB_VFS_NEXT_CONNECTPATH(conn, fname) \
364 smb_vfs_call_connectpath((conn)->next, (fname))
366 #define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) \
367 smb_vfs_call_brl_lock_windows((conn)->vfs_handles, (br_lck), (plock), (blocking_lock), (blr))
368 #define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock, blr) \
369 smb_vfs_call_brl_lock_windows((handle)->next, (br_lck), (plock), (blocking_lock), (blr))
371 #define SMB_VFS_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) \
372 smb_vfs_call_brl_unlock_windows((conn)->vfs_handles, (msg_ctx), (br_lck), (plock))
373 #define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock) \
374 smb_vfs_call_brl_unlock_windows((handle)->next, (msg_ctx), (br_lck), (plock))
376 #define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock, blr) \
377 smb_vfs_call_brl_cancel_windows((conn)->vfs_handles, (br_lck), (plock), (blr))
378 #define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr) \
379 smb_vfs_call_brl_cancel_windows((handle)->next, (br_lck), (plock), (blr))
381 #define SMB_VFS_STRICT_LOCK(conn, fsp, plock) \
382 smb_vfs_call_strict_lock((conn)->vfs_handles, (fsp), (plock))
383 #define SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock) \
384 smb_vfs_call_strict_lock((handle)->next, (fsp), (plock))
386 #define SMB_VFS_STRICT_UNLOCK(conn, fsp, plock) \
387 smb_vfs_call_strict_unlock((conn)->vfs_handles, (fsp), (plock))
388 #define SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock) \
389 smb_vfs_call_strict_unlock((handle)->next, (fsp), (plock))
391 #define SMB_VFS_TRANSLATE_NAME(conn, name, direction, mem_ctx, mapped_name) \
392 smb_vfs_call_translate_name((conn)->vfs_handles, (name), (direction), (mem_ctx), (mapped_name))
393 #define SMB_VFS_NEXT_TRANSLATE_NAME(handle, name, direction, mem_ctx, mapped_name) \
394 smb_vfs_call_translate_name((handle)->next, (name), (direction), (mem_ctx), (mapped_name))
396 #define SMB_VFS_FSCTL(fsp, ctx, function, req_flags, in_data, in_len, out_data, max_out_len, out_len) \
397 smb_vfs_call_fsctl((fsp)->conn->vfs_handles, (fsp), (ctx), (function), (req_flags), (in_data), (in_len), (out_data), (max_out_len), (out_len))
399 #define SMB_VFS_NEXT_FSCTL(handle, fsp, ctx, function, req_flags, in_data, in_len, out_data, max_out_len, out_len) \
400 smb_vfs_call_fsctl((handle)->next, (fsp), (ctx), (function), (req_flags), (in_data), (in_len), (out_data), (max_out_len), (out_len))
402 #define SMB_VFS_FGET_NT_ACL(fsp, security_info, mem_ctx, ppdesc) \
403 smb_vfs_call_fget_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info), (mem_ctx), (ppdesc))
404 #define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, mem_ctx, ppdesc) \
405 smb_vfs_call_fget_nt_acl((handle)->next, (fsp), (security_info), (mem_ctx), (ppdesc))
407 #define SMB_VFS_GET_NT_ACL(conn, name, security_info, mem_ctx, ppdesc) \
408 smb_vfs_call_get_nt_acl((conn)->vfs_handles, (name), (security_info), (mem_ctx), (ppdesc))
409 #define SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, mem_ctx, ppdesc) \
410 smb_vfs_call_get_nt_acl((handle)->next, (name), (security_info), (mem_ctx), (ppdesc))
412 #define SMB_VFS_AUDIT_FILE(conn, name, sacl, access_requested, access_denied) \
413 smb_vfs_call_audit_file((conn)->vfs_handles, (name), (sacl), (access_requested), (access_denied))
414 #define SMB_VFS_NEXT_AUDIT_FILE(handle, name, sacl, access_requested, access_denied) \
415 smb_vfs_call_audit_file((handle)->next, (name), (sacl), (access_requested), (access_denied))
417 #define SMB_VFS_FSET_NT_ACL(fsp, security_info_sent, psd) \
418 smb_vfs_call_fset_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info_sent), (psd))
419 #define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd) \
420 smb_vfs_call_fset_nt_acl((handle)->next, (fsp), (security_info_sent), (psd))
422 #define SMB_VFS_CHMOD_ACL(conn, name, mode) \
423 smb_vfs_call_chmod_acl((conn)->vfs_handles, (name), (mode))
424 #define SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode) \
425 smb_vfs_call_chmod_acl((handle)->next, (name), (mode))
427 #define SMB_VFS_FCHMOD_ACL(fsp, mode) \
428 smb_vfs_call_fchmod_acl((fsp)->conn->vfs_handles, (fsp), (mode))
429 #define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) \
430 smb_vfs_call_fchmod_acl((handle)->next, (fsp), (mode))
432 #define SMB_VFS_SYS_ACL_GET_FILE(conn, path_p, type, mem_ctx) \
433 smb_vfs_call_sys_acl_get_file((conn)->vfs_handles, (path_p), (type), (mem_ctx))
434 #define SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, path_p, type, mem_ctx) \
435 smb_vfs_call_sys_acl_get_file((handle)->next, (path_p), (type), (mem_ctx))
437 #define SMB_VFS_SYS_ACL_GET_FD(fsp, mem_ctx) \
438 smb_vfs_call_sys_acl_get_fd((fsp)->conn->vfs_handles, (fsp), (mem_ctx))
439 #define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, mem_ctx) \
440 smb_vfs_call_sys_acl_get_fd((handle)->next, (fsp), (mem_ctx))
442 #define SMB_VFS_SYS_ACL_BLOB_GET_FILE(conn, path_p, mem_ctx, blob_description, blob) \
443 smb_vfs_call_sys_acl_blob_get_file((conn)->vfs_handles, (path_p), (mem_ctx), (blob_description), (blob))
444 #define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx, blob_description, blob) \
445 smb_vfs_call_sys_acl_blob_get_file((handle)->next, (path_p), (mem_ctx), (blob_description), (blob))
447 #define SMB_VFS_SYS_ACL_BLOB_GET_FD(fsp, mem_ctx, blob_description, blob) \
448 smb_vfs_call_sys_acl_blob_get_fd((fsp)->conn->vfs_handles, (fsp), (mem_ctx), (blob_description), (blob))
449 #define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FD(handle, fsp, mem_ctx, blob_description, blob) \
450 smb_vfs_call_sys_acl_blob_get_fd((handle)->next, (fsp), mem_ctx, (blob_description), (blob))
452 #define SMB_VFS_SYS_ACL_SET_FILE(conn, name, acltype, theacl) \
453 smb_vfs_call_sys_acl_set_file((conn)->vfs_handles, (name), (acltype), (theacl))
454 #define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, name, acltype, theacl) \
455 smb_vfs_call_sys_acl_set_file((handle)->next, (name), (acltype), (theacl))
457 #define SMB_VFS_SYS_ACL_SET_FD(fsp, theacl) \
458 smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (theacl))
459 #define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl) \
460 smb_vfs_call_sys_acl_set_fd((handle)->next, (fsp), (theacl))
462 #define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, path) \
463 smb_vfs_call_sys_acl_delete_def_file((conn)->vfs_handles, (path))
464 #define SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, path) \
465 smb_vfs_call_sys_acl_delete_def_file((handle)->next, (path))
467 #define SMB_VFS_GETXATTR(conn,path,name,value,size) \
468 smb_vfs_call_getxattr((conn)->vfs_handles,(path),(name),(value),(size))
469 #define SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size) \
470 smb_vfs_call_getxattr((handle)->next,(path),(name),(value),(size))
472 #define SMB_VFS_FGETXATTR(fsp,name,value,size) \
473 smb_vfs_call_fgetxattr((fsp)->conn->vfs_handles, (fsp), (name),(value),(size))
474 #define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) \
475 smb_vfs_call_fgetxattr((handle)->next,(fsp),(name),(value),(size))
477 #define SMB_VFS_LISTXATTR(conn,path,list,size) \
478 smb_vfs_call_listxattr((conn)->vfs_handles,(path),(list),(size))
479 #define SMB_VFS_NEXT_LISTXATTR(handle,path,list,size) \
480 smb_vfs_call_listxattr((handle)->next,(path),(list),(size))
482 #define SMB_VFS_FLISTXATTR(fsp,list,size) \
483 smb_vfs_call_flistxattr((fsp)->conn->vfs_handles, (fsp), (list),(size))
484 #define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \
485 smb_vfs_call_flistxattr((handle)->next,(fsp),(list),(size))
487 #define SMB_VFS_REMOVEXATTR(conn,path,name) \
488 smb_vfs_call_removexattr((conn)->vfs_handles,(path),(name))
489 #define SMB_VFS_NEXT_REMOVEXATTR(handle,path,name) \
490 smb_vfs_call_removexattr((handle)->next,(path),(name))
492 #define SMB_VFS_FREMOVEXATTR(fsp,name) \
493 smb_vfs_call_fremovexattr((fsp)->conn->vfs_handles, (fsp), (name))
494 #define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) \
495 smb_vfs_call_fremovexattr((handle)->next,(fsp),(name))
497 #define SMB_VFS_SETXATTR(conn,path,name,value,size,flags) \
498 smb_vfs_call_setxattr((conn)->vfs_handles,(path),(name),(value),(size),(flags))
499 #define SMB_VFS_NEXT_SETXATTR(handle,path,name,value,size,flags) \
500 smb_vfs_call_setxattr((handle)->next,(path),(name),(value),(size),(flags))
502 #define SMB_VFS_FSETXATTR(fsp,name,value,size,flags) \
503 smb_vfs_call_fsetxattr((fsp)->conn->vfs_handles, (fsp), (name),(value),(size),(flags))
504 #define SMB_VFS_NEXT_FSETXATTR(handle,fsp,name,value,size,flags) \
505 smb_vfs_call_fsetxattr((handle)->next,(fsp),(name),(value),(size),(flags))
507 #define SMB_VFS_AIO_FORCE(fsp) \
508 smb_vfs_call_aio_force((fsp)->conn->vfs_handles, (fsp))
509 #define SMB_VFS_NEXT_AIO_FORCE(handle,fsp) \
510 smb_vfs_call_aio_force((handle)->next,(fsp))
512 #define SMB_VFS_IS_OFFLINE(conn,fname,sbuf) \
513 smb_vfs_call_is_offline((conn)->vfs_handles,(fname),(sbuf))
514 #define SMB_VFS_NEXT_IS_OFFLINE(handle,fname,sbuf) \
515 smb_vfs_call_is_offline((handle)->next,(fname),(sbuf))
517 #define SMB_VFS_SET_OFFLINE(conn,fname) \
518 smb_vfs_call_set_offline((conn)->vfs_handles,(fname))
519 #define SMB_VFS_NEXT_SET_OFFLINE(handle,fname) \
520 smb_vfs_call_set_offline((handle)->next, (fname))
522 /* durable handle operations */
524 #define SMB_VFS_DURABLE_COOKIE(fsp, mem_ctx, cookie) \
525 smb_vfs_call_durable_cookie((fsp)->conn->vfs_handles, \
526 (fsp), (mem_ctx), (cookie))
527 #define SMB_VFS_NEXT_DURABLE_COOKIE(handle, fsp, mem_ctx, cookie) \
528 smb_vfs_call_durable_cookie(((handle)->next, \
529 (fsp), (mem_ctx), (cookie))
531 #define SMB_VFS_DURABLE_DISCONNECT(fsp, old_cookie, mem_ctx, new_cookie) \
532 smb_vfs_call_durable_disconnect((fsp)->conn->vfs_handles, \
533 (fsp), (old_cookie), (mem_ctx), (new_cookie))
534 #define SMB_VFS_NEXT_DURABLE_DISCONNECT(handle, fsp, old_cookie, mem_ctx, new_cookie) \
535 smb_vfs_call_durable_disconnect((handle)->next, \
536 (fsp), (old_cookie), (mem_ctx), (new_cookie))
538 #define SMB_VFS_DURABLE_RECONNECT(conn, smb1req, op, old_cookie, mem_ctx, fsp, new_cookie) \
539 smb_vfs_call_durable_reconnect((conn)->vfs_handles, \
540 (smb1req), (op), (old_cookie), \
541 (mem_ctx), (fsp), (new_cookie))
542 #define SMB_VFS_NEXT_DURABLE_RECONNECT(handle, smb1req, op, old_cookie, mem_ctx, fsp, new_cookie) \
543 smb_vfs_call_durable_reconnect((handle)->next, \
544 (smb1req), (op), (old_cookie), \
545 (mem_ctx), (fsp), (new_cookie))
547 #endif /* _VFS_MACROS_H */