| 1 | /*
|
|---|
| 2 | * Skeleton VFS module. Implements passthrough operation of all VFS
|
|---|
| 3 | * calls to disk functions.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (C) Tim Potter, 1999-2000
|
|---|
| 6 | * Copyright (C) Alexander Bokovoy, 2002
|
|---|
| 7 | * Copyright (C) Stefan (metze) Metzmacher, 2003
|
|---|
| 8 | * Copyright (C) Jeremy Allison 2009
|
|---|
| 9 | *
|
|---|
| 10 | * This program is free software; you can redistribute it and/or modify
|
|---|
| 11 | * it under the terms of the GNU General Public License as published by
|
|---|
| 12 | * the Free Software Foundation; either version 3 of the License, or
|
|---|
| 13 | * (at your option) any later version.
|
|---|
| 14 | *
|
|---|
| 15 | * This program is distributed in the hope that it will be useful,
|
|---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 18 | * GNU General Public License for more details.
|
|---|
| 19 | *
|
|---|
| 20 | * You should have received a copy of the GNU General Public License
|
|---|
| 21 | * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|---|
| 22 | */
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | #include "includes.h"
|
|---|
| 26 | #include "smbd/proto.h"
|
|---|
| 27 |
|
|---|
| 28 | /* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE
|
|---|
| 29 | SAMBA DEVELOPERS GUIDE!!!!!!
|
|---|
| 30 | */
|
|---|
| 31 |
|
|---|
| 32 | /* If you take this file as template for your module
|
|---|
| 33 | * please make sure that you remove all skel_XXX() functions you don't
|
|---|
| 34 | * want to implement!! The passthrough operations are not
|
|---|
| 35 | * neccessary in a real module.
|
|---|
| 36 | *
|
|---|
| 37 | * --metze
|
|---|
| 38 | */
|
|---|
| 39 |
|
|---|
| 40 | static int skel_connect(vfs_handle_struct *handle, const char *service, const char *user)
|
|---|
| 41 | {
|
|---|
| 42 | return SMB_VFS_NEXT_CONNECT(handle, service, user);
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 | static void skel_disconnect(vfs_handle_struct *handle)
|
|---|
| 46 | {
|
|---|
| 47 | SMB_VFS_NEXT_DISCONNECT(handle);
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path,
|
|---|
| 51 | bool small_query, uint64_t *bsize,
|
|---|
| 52 | uint64_t *dfree, uint64_t *dsize)
|
|---|
| 53 | {
|
|---|
| 54 | return SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize,
|
|---|
| 55 | dfree, dsize);
|
|---|
| 56 | }
|
|---|
| 57 |
|
|---|
| 58 | static int skel_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
|
|---|
| 59 | {
|
|---|
| 60 | return SMB_VFS_NEXT_GET_QUOTA(handle, qtype, id, dq);
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
|
|---|
| 64 | {
|
|---|
| 65 | return SMB_VFS_NEXT_SET_QUOTA(handle, qtype, id, dq);
|
|---|
| 66 | }
|
|---|
| 67 |
|
|---|
| 68 | static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, struct shadow_copy_data *shadow_copy_data, bool labels)
|
|---|
| 69 | {
|
|---|
| 70 | return SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, labels);
|
|---|
| 71 | }
|
|---|
| 72 |
|
|---|
| 73 | static int skel_statvfs(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf)
|
|---|
| 74 | {
|
|---|
| 75 | return SMB_VFS_NEXT_STATVFS(handle, path, statbuf);
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | static uint32_t skel_fs_capabilities(struct vfs_handle_struct *handle, enum timestamp_set_resolution *p_ts_res)
|
|---|
| 79 | {
|
|---|
| 80 | return SMB_VFS_NEXT_FS_CAPABILITIES(handle, p_ts_res);
|
|---|
| 81 | }
|
|---|
| 82 |
|
|---|
| 83 | static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
|
|---|
| 84 | {
|
|---|
| 85 | return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
|
|---|
| 89 | {
|
|---|
| 90 | return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
|
|---|
| 91 | }
|
|---|
| 92 |
|
|---|
| 93 | static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
|
|---|
| 94 | SMB_STRUCT_DIR *dirp,
|
|---|
| 95 | SMB_STRUCT_STAT *sbuf)
|
|---|
| 96 | {
|
|---|
| 97 | return SMB_VFS_NEXT_READDIR(handle, dirp, sbuf);
|
|---|
| 98 | }
|
|---|
| 99 |
|
|---|
| 100 | static void skel_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
|
|---|
| 101 | {
|
|---|
| 102 | SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset);
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | static long skel_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
|
|---|
| 106 | {
|
|---|
| 107 | return SMB_VFS_NEXT_TELLDIR(handle, dirp);
|
|---|
| 108 | }
|
|---|
| 109 |
|
|---|
| 110 | static void skel_rewind_dir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
|
|---|
| 111 | {
|
|---|
| 112 | SMB_VFS_NEXT_REWINDDIR(handle, dirp);
|
|---|
| 113 | }
|
|---|
| 114 |
|
|---|
| 115 | static int skel_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode)
|
|---|
| 116 | {
|
|---|
| 117 | return SMB_VFS_NEXT_MKDIR(handle, path, mode);
|
|---|
| 118 | }
|
|---|
| 119 |
|
|---|
| 120 | static int skel_rmdir(vfs_handle_struct *handle, const char *path)
|
|---|
| 121 | {
|
|---|
| 122 | return SMB_VFS_NEXT_RMDIR(handle, path);
|
|---|
| 123 | }
|
|---|
| 124 |
|
|---|
| 125 | static int skel_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dir)
|
|---|
| 126 | {
|
|---|
| 127 | return SMB_VFS_NEXT_CLOSEDIR(handle, dir);
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|
| 130 | static void skel_init_search_op(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
|
|---|
| 131 | {
|
|---|
| 132 | SMB_VFS_NEXT_INIT_SEARCH_OP(handle, dirp);
|
|---|
| 133 | }
|
|---|
| 134 |
|
|---|
| 135 | static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
|
|---|
| 136 | files_struct *fsp, int flags, mode_t mode)
|
|---|
| 137 | {
|
|---|
| 138 | return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
|
|---|
| 139 | }
|
|---|
| 140 |
|
|---|
| 141 | static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
|
|---|
| 142 | struct smb_request *req,
|
|---|
| 143 | uint16_t root_dir_fid,
|
|---|
| 144 | struct smb_filename *smb_fname,
|
|---|
| 145 | uint32_t access_mask,
|
|---|
| 146 | uint32_t share_access,
|
|---|
| 147 | uint32_t create_disposition,
|
|---|
| 148 | uint32_t create_options,
|
|---|
| 149 | uint32_t file_attributes,
|
|---|
| 150 | uint32_t oplock_request,
|
|---|
| 151 | uint64_t allocation_size,
|
|---|
| 152 | uint32_t private_flags,
|
|---|
| 153 | struct security_descriptor *sd,
|
|---|
| 154 | struct ea_list *ea_list,
|
|---|
| 155 | files_struct **result,
|
|---|
| 156 | int *pinfo)
|
|---|
| 157 | {
|
|---|
| 158 | return SMB_VFS_NEXT_CREATE_FILE(handle,
|
|---|
| 159 | req,
|
|---|
| 160 | root_dir_fid,
|
|---|
| 161 | smb_fname,
|
|---|
| 162 | access_mask,
|
|---|
| 163 | share_access,
|
|---|
| 164 | create_disposition,
|
|---|
| 165 | create_options,
|
|---|
| 166 | file_attributes,
|
|---|
| 167 | oplock_request,
|
|---|
| 168 | allocation_size,
|
|---|
| 169 | private_flags,
|
|---|
| 170 | sd,
|
|---|
| 171 | ea_list,
|
|---|
| 172 | result,
|
|---|
| 173 | pinfo);
|
|---|
| 174 | }
|
|---|
| 175 |
|
|---|
| 176 | static int skel_close_fn(vfs_handle_struct *handle, files_struct *fsp)
|
|---|
| 177 | {
|
|---|
| 178 | return SMB_VFS_NEXT_CLOSE(handle, fsp);
|
|---|
| 179 | }
|
|---|
| 180 |
|
|---|
| 181 | static ssize_t skel_vfs_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)
|
|---|
| 182 | {
|
|---|
| 183 | return SMB_VFS_NEXT_READ(handle, fsp, data, n);
|
|---|
| 184 | }
|
|---|
| 185 |
|
|---|
| 186 | static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n, SMB_OFF_T offset)
|
|---|
| 187 | {
|
|---|
| 188 | return SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
|
|---|
| 189 | }
|
|---|
| 190 |
|
|---|
| 191 | static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n)
|
|---|
| 192 | {
|
|---|
| 193 | return SMB_VFS_NEXT_WRITE(handle, fsp, data, n);
|
|---|
| 194 | }
|
|---|
| 195 |
|
|---|
| 196 | static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n, SMB_OFF_T offset)
|
|---|
| 197 | {
|
|---|
| 198 | return SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, offset);
|
|---|
| 199 | }
|
|---|
| 200 |
|
|---|
| 201 | static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset, int whence)
|
|---|
| 202 | {
|
|---|
| 203 | return SMB_VFS_NEXT_LSEEK(handle, fsp, offset, whence);
|
|---|
| 204 | }
|
|---|
| 205 |
|
|---|
| 206 | static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *hdr, SMB_OFF_T offset, size_t n)
|
|---|
| 207 | {
|
|---|
| 208 | return SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp, hdr, offset, n);
|
|---|
| 209 | }
|
|---|
| 210 |
|
|---|
| 211 | static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct *tofsp, SMB_OFF_T offset, size_t n)
|
|---|
| 212 | {
|
|---|
| 213 | return SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, n);
|
|---|
| 214 | }
|
|---|
| 215 |
|
|---|
| 216 | static int skel_rename(vfs_handle_struct *handle,
|
|---|
| 217 | const struct smb_filename *smb_fname_src,
|
|---|
| 218 | const struct smb_filename *smb_fname_dst)
|
|---|
| 219 | {
|
|---|
| 220 | return SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
|
|---|
| 221 | }
|
|---|
| 222 |
|
|---|
| 223 | static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
|
|---|
| 224 | {
|
|---|
| 225 | return SMB_VFS_NEXT_FSYNC(handle, fsp);
|
|---|
| 226 | }
|
|---|
| 227 |
|
|---|
| 228 | static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
|
|---|
| 229 | {
|
|---|
| 230 | return SMB_VFS_NEXT_STAT(handle, smb_fname);
|
|---|
| 231 | }
|
|---|
| 232 |
|
|---|
| 233 | static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf)
|
|---|
| 234 | {
|
|---|
| 235 | return SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf);
|
|---|
| 236 | }
|
|---|
| 237 |
|
|---|
| 238 | static int skel_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
|
|---|
| 239 | {
|
|---|
| 240 | return SMB_VFS_NEXT_LSTAT(handle, smb_fname);
|
|---|
| 241 | }
|
|---|
| 242 |
|
|---|
| 243 | static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_STAT *sbuf)
|
|---|
| 244 | {
|
|---|
| 245 | return SMB_VFS_NEXT_GET_ALLOC_SIZE(handle, fsp, sbuf);
|
|---|
| 246 | }
|
|---|
| 247 |
|
|---|
| 248 | static int skel_unlink(vfs_handle_struct *handle,
|
|---|
| 249 | const struct smb_filename *smb_fname)
|
|---|
| 250 | {
|
|---|
| 251 | return SMB_VFS_NEXT_UNLINK(handle, smb_fname);
|
|---|
| 252 | }
|
|---|
| 253 |
|
|---|
| 254 | static int skel_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
|
|---|
| 255 | {
|
|---|
| 256 | return SMB_VFS_NEXT_CHMOD(handle, path, mode);
|
|---|
| 257 | }
|
|---|
| 258 |
|
|---|
| 259 | static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
|
|---|
| 260 | {
|
|---|
| 261 | return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
|
|---|
| 262 | }
|
|---|
| 263 |
|
|---|
| 264 | static int skel_chown(vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid)
|
|---|
| 265 | {
|
|---|
| 266 | return SMB_VFS_NEXT_CHOWN(handle, path, uid, gid);
|
|---|
| 267 | }
|
|---|
| 268 |
|
|---|
| 269 | static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid)
|
|---|
| 270 | {
|
|---|
| 271 | return SMB_VFS_NEXT_FCHOWN(handle, fsp, uid, gid);
|
|---|
| 272 | }
|
|---|
| 273 |
|
|---|
| 274 | static int skel_lchown(vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid)
|
|---|
| 275 | {
|
|---|
| 276 | return SMB_VFS_NEXT_LCHOWN(handle, path, uid, gid);
|
|---|
| 277 | }
|
|---|
| 278 |
|
|---|
| 279 | static int skel_chdir(vfs_handle_struct *handle, const char *path)
|
|---|
| 280 | {
|
|---|
| 281 | return SMB_VFS_NEXT_CHDIR(handle, path);
|
|---|
| 282 | }
|
|---|
| 283 |
|
|---|
| 284 | static char *skel_getwd(vfs_handle_struct *handle, char *buf)
|
|---|
| 285 | {
|
|---|
| 286 | return SMB_VFS_NEXT_GETWD(handle, buf);
|
|---|
| 287 | }
|
|---|
| 288 |
|
|---|
| 289 | static int skel_ntimes(vfs_handle_struct *handle,
|
|---|
| 290 | const struct smb_filename *smb_fname,
|
|---|
| 291 | struct smb_file_time *ft)
|
|---|
| 292 | {
|
|---|
| 293 | return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
|
|---|
| 294 | }
|
|---|
| 295 |
|
|---|
| 296 | static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset)
|
|---|
| 297 | {
|
|---|
| 298 | return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
|
|---|
| 299 | }
|
|---|
| 300 |
|
|---|
| 301 | static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
|
|---|
| 302 | enum vfs_fallocate_mode mode,
|
|---|
| 303 | SMB_OFF_T offset,
|
|---|
| 304 | SMB_OFF_T len)
|
|---|
| 305 | {
|
|---|
| 306 | return SMB_VFS_NEXT_FALLOCATE(handle, fsp, mode, offset, len);
|
|---|
| 307 | }
|
|---|
| 308 |
|
|---|
| 309 | static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
|
|---|
| 310 | {
|
|---|
| 311 | return SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type);
|
|---|
| 312 | }
|
|---|
| 313 |
|
|---|
| 314 | static int skel_kernel_flock(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 share_mode, uint32 access_mask)
|
|---|
| 315 | {
|
|---|
| 316 | return SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode, access_mask);
|
|---|
| 317 | }
|
|---|
| 318 |
|
|---|
| 319 | static int skel_linux_setlease(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype)
|
|---|
| 320 | {
|
|---|
| 321 | return SMB_VFS_NEXT_LINUX_SETLEASE(handle, fsp, leasetype);
|
|---|
| 322 | }
|
|---|
| 323 |
|
|---|
| 324 | static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
|
|---|
| 325 | {
|
|---|
| 326 | return SMB_VFS_NEXT_GETLOCK(handle, fsp, poffset, pcount, ptype, ppid);
|
|---|
| 327 | }
|
|---|
| 328 |
|
|---|
| 329 | static int skel_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath)
|
|---|
| 330 | {
|
|---|
| 331 | return SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath);
|
|---|
| 332 | }
|
|---|
| 333 |
|
|---|
| 334 | static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz)
|
|---|
| 335 | {
|
|---|
| 336 | return SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz);
|
|---|
| 337 | }
|
|---|
| 338 |
|
|---|
| 339 | static int skel_link(vfs_handle_struct *handle, const char *oldpath, const char *newpath)
|
|---|
| 340 | {
|
|---|
| 341 | return SMB_VFS_NEXT_LINK(handle, oldpath, newpath);
|
|---|
| 342 | }
|
|---|
| 343 |
|
|---|
| 344 | static int skel_mknod(vfs_handle_struct *handle, const char *path, mode_t mode, SMB_DEV_T dev)
|
|---|
| 345 | {
|
|---|
| 346 | return SMB_VFS_NEXT_MKNOD(handle, path, mode, dev);
|
|---|
| 347 | }
|
|---|
| 348 |
|
|---|
| 349 | static char *skel_realpath(vfs_handle_struct *handle, const char *path)
|
|---|
| 350 | {
|
|---|
| 351 | return SMB_VFS_NEXT_REALPATH(handle, path);
|
|---|
| 352 | }
|
|---|
| 353 |
|
|---|
| 354 | static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle,
|
|---|
| 355 | struct sys_notify_context *ctx, struct notify_entry *e,
|
|---|
| 356 | void (*callback)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev),
|
|---|
| 357 | void *private_data, void *handle_p)
|
|---|
| 358 | {
|
|---|
| 359 | return SMB_VFS_NEXT_NOTIFY_WATCH(handle, ctx, e, callback,
|
|---|
| 360 | private_data, handle_p);
|
|---|
| 361 | }
|
|---|
| 362 |
|
|---|
| 363 | static int skel_chflags(vfs_handle_struct *handle, const char *path, uint flags)
|
|---|
| 364 | {
|
|---|
| 365 | return SMB_VFS_NEXT_CHFLAGS(handle, path, flags);
|
|---|
| 366 | }
|
|---|
| 367 |
|
|---|
| 368 | static struct file_id skel_file_id_create(vfs_handle_struct *handle,
|
|---|
| 369 | const SMB_STRUCT_STAT *sbuf)
|
|---|
| 370 | {
|
|---|
| 371 | return SMB_VFS_NEXT_FILE_ID_CREATE(handle, sbuf);
|
|---|
| 372 | }
|
|---|
| 373 |
|
|---|
| 374 | static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
|
|---|
| 375 | struct files_struct *fsp,
|
|---|
| 376 | const char *fname,
|
|---|
| 377 | TALLOC_CTX *mem_ctx,
|
|---|
| 378 | unsigned int *num_streams,
|
|---|
| 379 | struct stream_struct **streams)
|
|---|
| 380 | {
|
|---|
| 381 | return SMB_VFS_NEXT_STREAMINFO(handle,
|
|---|
| 382 | fsp,
|
|---|
| 383 | fname,
|
|---|
| 384 | mem_ctx,
|
|---|
| 385 | num_streams,
|
|---|
| 386 | streams);
|
|---|
| 387 | }
|
|---|
| 388 |
|
|---|
| 389 | static int skel_get_real_filename(struct vfs_handle_struct *handle,
|
|---|
| 390 | const char *path,
|
|---|
| 391 | const char *name,
|
|---|
| 392 | TALLOC_CTX *mem_ctx,
|
|---|
| 393 | char **found_name)
|
|---|
| 394 | {
|
|---|
| 395 | return SMB_VFS_NEXT_GET_REAL_FILENAME(handle,
|
|---|
| 396 | path,
|
|---|
| 397 | name,
|
|---|
| 398 | mem_ctx,
|
|---|
| 399 | found_name);
|
|---|
| 400 | }
|
|---|
| 401 |
|
|---|
| 402 | static const char *skel_connectpath(struct vfs_handle_struct *handle,
|
|---|
| 403 | const char *filename)
|
|---|
| 404 | {
|
|---|
| 405 | return SMB_VFS_NEXT_CONNECTPATH(handle, filename);
|
|---|
| 406 | }
|
|---|
| 407 |
|
|---|
| 408 | static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
|
|---|
| 409 | struct byte_range_lock *br_lck,
|
|---|
| 410 | struct lock_struct *plock,
|
|---|
| 411 | bool blocking_lock,
|
|---|
| 412 | struct blocking_lock_record *blr)
|
|---|
| 413 | {
|
|---|
| 414 | return SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle,
|
|---|
| 415 | br_lck,
|
|---|
| 416 | plock,
|
|---|
| 417 | blocking_lock,
|
|---|
| 418 | blr);
|
|---|
| 419 | }
|
|---|
| 420 |
|
|---|
| 421 | static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
|
|---|
| 422 | struct messaging_context *msg_ctx,
|
|---|
| 423 | struct byte_range_lock *br_lck,
|
|---|
| 424 | const struct lock_struct *plock)
|
|---|
| 425 | {
|
|---|
| 426 | return SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle,
|
|---|
| 427 | msg_ctx,
|
|---|
| 428 | br_lck,
|
|---|
| 429 | plock);
|
|---|
| 430 | }
|
|---|
| 431 |
|
|---|
| 432 | static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
|
|---|
| 433 | struct byte_range_lock *br_lck,
|
|---|
| 434 | struct lock_struct *plock,
|
|---|
| 435 | struct blocking_lock_record *blr)
|
|---|
| 436 | {
|
|---|
| 437 | return SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle,
|
|---|
| 438 | br_lck,
|
|---|
| 439 | plock,
|
|---|
| 440 | blr);
|
|---|
| 441 | }
|
|---|
| 442 |
|
|---|
| 443 | static bool skel_strict_lock(struct vfs_handle_struct *handle,
|
|---|
| 444 | struct files_struct *fsp,
|
|---|
| 445 | struct lock_struct *plock)
|
|---|
| 446 | {
|
|---|
| 447 | return SMB_VFS_NEXT_STRICT_LOCK(handle,
|
|---|
| 448 | fsp,
|
|---|
| 449 | plock);
|
|---|
| 450 | }
|
|---|
| 451 |
|
|---|
| 452 | static void skel_strict_unlock(struct vfs_handle_struct *handle,
|
|---|
| 453 | struct files_struct *fsp,
|
|---|
| 454 | struct lock_struct *plock)
|
|---|
| 455 | {
|
|---|
| 456 | SMB_VFS_NEXT_STRICT_UNLOCK(handle,
|
|---|
| 457 | fsp,
|
|---|
| 458 | plock);
|
|---|
| 459 | }
|
|---|
| 460 |
|
|---|
| 461 | static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
|
|---|
| 462 | const char *mapped_name,
|
|---|
| 463 | enum vfs_translate_direction direction,
|
|---|
| 464 | TALLOC_CTX *mem_ctx,
|
|---|
| 465 | char **pmapped_name)
|
|---|
| 466 | {
|
|---|
| 467 | return SMB_VFS_NEXT_TRANSLATE_NAME(handle, mapped_name, direction,
|
|---|
| 468 | mem_ctx, pmapped_name);
|
|---|
| 469 | }
|
|---|
| 470 |
|
|---|
| 471 | static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
|
|---|
| 472 | uint32 security_info, struct security_descriptor **ppdesc)
|
|---|
| 473 | {
|
|---|
| 474 | return SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc);
|
|---|
| 475 | }
|
|---|
| 476 |
|
|---|
| 477 | static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
|
|---|
| 478 | const char *name, uint32 security_info, struct security_descriptor **ppdesc)
|
|---|
| 479 | {
|
|---|
| 480 | return SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, ppdesc);
|
|---|
| 481 | }
|
|---|
| 482 |
|
|---|
| 483 | static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
|
|---|
| 484 | uint32 security_info_sent, const struct security_descriptor *psd)
|
|---|
| 485 | {
|
|---|
| 486 | return SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
|
|---|
| 487 | }
|
|---|
| 488 |
|
|---|
| 489 | static int skel_chmod_acl(vfs_handle_struct *handle, const char *name, mode_t mode)
|
|---|
| 490 | {
|
|---|
| 491 | return SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode);
|
|---|
| 492 | }
|
|---|
| 493 |
|
|---|
| 494 | static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
|
|---|
| 495 | {
|
|---|
| 496 | return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
|
|---|
| 497 | }
|
|---|
| 498 |
|
|---|
| 499 | static int skel_sys_acl_get_entry(vfs_handle_struct *handle, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
|
|---|
| 500 | {
|
|---|
| 501 | return SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, theacl, entry_id, entry_p);
|
|---|
| 502 | }
|
|---|
| 503 |
|
|---|
| 504 | static int skel_sys_acl_get_tag_type(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p)
|
|---|
| 505 | {
|
|---|
| 506 | return SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, entry_d, tag_type_p);
|
|---|
| 507 | }
|
|---|
| 508 |
|
|---|
| 509 | static int skel_sys_acl_get_permset(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p)
|
|---|
| 510 | {
|
|---|
| 511 | return SMB_VFS_NEXT_SYS_ACL_GET_PERMSET(handle, entry_d, permset_p);
|
|---|
| 512 | }
|
|---|
| 513 |
|
|---|
| 514 | static void *skel_sys_acl_get_qualifier(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d)
|
|---|
| 515 | {
|
|---|
| 516 | return SMB_VFS_NEXT_SYS_ACL_GET_QUALIFIER(handle, entry_d);
|
|---|
| 517 | }
|
|---|
| 518 |
|
|---|
| 519 | static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type)
|
|---|
| 520 | {
|
|---|
| 521 | return SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, path_p, type);
|
|---|
| 522 | }
|
|---|
| 523 |
|
|---|
| 524 | static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
|
|---|
| 525 | {
|
|---|
| 526 | return SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp);
|
|---|
| 527 | }
|
|---|
| 528 |
|
|---|
| 529 | static int skel_sys_acl_clear_perms(vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset)
|
|---|
| 530 | {
|
|---|
| 531 | return SMB_VFS_NEXT_SYS_ACL_CLEAR_PERMS(handle, permset);
|
|---|
| 532 | }
|
|---|
| 533 |
|
|---|
| 534 | static int skel_sys_acl_add_perm(vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
|
|---|
| 535 | {
|
|---|
| 536 | return SMB_VFS_NEXT_SYS_ACL_ADD_PERM(handle, permset, perm);
|
|---|
| 537 | }
|
|---|
| 538 |
|
|---|
| 539 | static char *skel_sys_acl_to_text(vfs_handle_struct *handle, SMB_ACL_T theacl, ssize_t *plen)
|
|---|
| 540 | {
|
|---|
| 541 | return SMB_VFS_NEXT_SYS_ACL_TO_TEXT(handle, theacl, plen);
|
|---|
| 542 | }
|
|---|
| 543 |
|
|---|
| 544 | static SMB_ACL_T skel_sys_acl_init(vfs_handle_struct *handle, int count)
|
|---|
| 545 | {
|
|---|
| 546 | return SMB_VFS_NEXT_SYS_ACL_INIT(handle, count);
|
|---|
| 547 | }
|
|---|
| 548 |
|
|---|
| 549 | static int skel_sys_acl_create_entry(vfs_handle_struct *handle, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry)
|
|---|
| 550 | {
|
|---|
| 551 | return SMB_VFS_NEXT_SYS_ACL_CREATE_ENTRY(handle, pacl, pentry);
|
|---|
| 552 | }
|
|---|
| 553 |
|
|---|
| 554 | static int skel_sys_acl_set_tag_type(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype)
|
|---|
| 555 | {
|
|---|
| 556 | return SMB_VFS_NEXT_SYS_ACL_SET_TAG_TYPE(handle, entry, tagtype);
|
|---|
| 557 | }
|
|---|
| 558 |
|
|---|
| 559 | static int skel_sys_acl_set_qualifier(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, void *qual)
|
|---|
| 560 | {
|
|---|
| 561 | return SMB_VFS_NEXT_SYS_ACL_SET_QUALIFIER(handle, entry, qual);
|
|---|
| 562 | }
|
|---|
| 563 |
|
|---|
| 564 | static int skel_sys_acl_set_permset(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
|
|---|
| 565 | {
|
|---|
| 566 | return SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, entry, permset);
|
|---|
| 567 | }
|
|---|
| 568 |
|
|---|
| 569 | static int skel_sys_acl_valid(vfs_handle_struct *handle, SMB_ACL_T theacl )
|
|---|
| 570 | {
|
|---|
| 571 | return SMB_VFS_NEXT_SYS_ACL_VALID(handle, theacl);
|
|---|
| 572 | }
|
|---|
| 573 |
|
|---|
| 574 | static int skel_sys_acl_set_file(vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
|
|---|
| 575 | {
|
|---|
| 576 | return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, name, acltype, theacl);
|
|---|
| 577 | }
|
|---|
| 578 |
|
|---|
| 579 | static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
|
|---|
| 580 | {
|
|---|
| 581 | return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
|
|---|
| 582 | }
|
|---|
| 583 |
|
|---|
| 584 | static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path)
|
|---|
| 585 | {
|
|---|
| 586 | return SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, path);
|
|---|
| 587 | }
|
|---|
| 588 |
|
|---|
| 589 | static int skel_sys_acl_get_perm(vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
|
|---|
| 590 | {
|
|---|
| 591 | return SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, permset, perm);
|
|---|
| 592 | }
|
|---|
| 593 |
|
|---|
| 594 | static int skel_sys_acl_free_text(vfs_handle_struct *handle, char *text)
|
|---|
| 595 | {
|
|---|
| 596 | return SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, text);
|
|---|
| 597 | }
|
|---|
| 598 |
|
|---|
| 599 | static int skel_sys_acl_free_acl(vfs_handle_struct *handle, SMB_ACL_T posix_acl)
|
|---|
| 600 | {
|
|---|
| 601 | return SMB_VFS_NEXT_SYS_ACL_FREE_ACL(handle, posix_acl);
|
|---|
| 602 | }
|
|---|
| 603 |
|
|---|
| 604 | static int skel_sys_acl_free_qualifier(vfs_handle_struct *handle, void *qualifier, SMB_ACL_TAG_T tagtype)
|
|---|
| 605 | {
|
|---|
| 606 | return SMB_VFS_NEXT_SYS_ACL_FREE_QUALIFIER(handle, qualifier, tagtype);
|
|---|
| 607 | }
|
|---|
| 608 |
|
|---|
| 609 | static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t size)
|
|---|
| 610 | {
|
|---|
| 611 | return SMB_VFS_NEXT_GETXATTR(handle, path, name, value, size);
|
|---|
| 612 | }
|
|---|
| 613 |
|
|---|
| 614 | static ssize_t skel_lgetxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t
|
|---|
| 615 | size)
|
|---|
| 616 | {
|
|---|
| 617 | return SMB_VFS_NEXT_LGETXATTR(handle, path, name, value, size);
|
|---|
| 618 | }
|
|---|
| 619 |
|
|---|
| 620 | static ssize_t skel_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
|
|---|
| 621 | {
|
|---|
| 622 | return SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size);
|
|---|
| 623 | }
|
|---|
| 624 |
|
|---|
| 625 | static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
|
|---|
| 626 | {
|
|---|
| 627 | return SMB_VFS_NEXT_LISTXATTR(handle, path, list, size);
|
|---|
| 628 | }
|
|---|
| 629 |
|
|---|
| 630 | static ssize_t skel_llistxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
|
|---|
| 631 | {
|
|---|
| 632 | return SMB_VFS_NEXT_LLISTXATTR(handle, path, list, size);
|
|---|
| 633 | }
|
|---|
| 634 |
|
|---|
| 635 | static ssize_t skel_flistxattr(vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
|
|---|
| 636 | {
|
|---|
| 637 | return SMB_VFS_NEXT_FLISTXATTR(handle, fsp, list, size);
|
|---|
| 638 | }
|
|---|
| 639 |
|
|---|
| 640 | static int skel_removexattr(vfs_handle_struct *handle, const char *path, const char *name)
|
|---|
| 641 | {
|
|---|
| 642 | return SMB_VFS_NEXT_REMOVEXATTR(handle, path, name);
|
|---|
| 643 | }
|
|---|
| 644 |
|
|---|
| 645 | static int skel_lremovexattr(vfs_handle_struct *handle, const char *path, const char *name)
|
|---|
| 646 | {
|
|---|
| 647 | return SMB_VFS_NEXT_LREMOVEXATTR(handle, path, name);
|
|---|
| 648 | }
|
|---|
| 649 |
|
|---|
| 650 | static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
|
|---|
| 651 | {
|
|---|
| 652 | return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
|
|---|
| 653 | }
|
|---|
| 654 |
|
|---|
| 655 | static int skel_setxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
|
|---|
| 656 | {
|
|---|
| 657 | return SMB_VFS_NEXT_SETXATTR(handle, path, name, value, size, flags);
|
|---|
| 658 | }
|
|---|
| 659 |
|
|---|
| 660 | static int skel_lsetxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
|
|---|
| 661 | {
|
|---|
| 662 | return SMB_VFS_NEXT_LSETXATTR(handle, path, name, value, size, flags);
|
|---|
| 663 | }
|
|---|
| 664 |
|
|---|
| 665 | static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags)
|
|---|
| 666 | {
|
|---|
| 667 | return SMB_VFS_NEXT_FSETXATTR(handle, fsp, name, value, size, flags);
|
|---|
| 668 | }
|
|---|
| 669 |
|
|---|
| 670 | static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
|
|---|
| 671 | {
|
|---|
| 672 | return SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
|
|---|
| 673 | }
|
|---|
| 674 |
|
|---|
| 675 | static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
|
|---|
| 676 | {
|
|---|
| 677 | return SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
|
|---|
| 678 | }
|
|---|
| 679 |
|
|---|
| 680 | static ssize_t skel_aio_return_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
|
|---|
| 681 | {
|
|---|
| 682 | return SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
|
|---|
| 683 | }
|
|---|
| 684 |
|
|---|
| 685 | static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
|
|---|
| 686 | {
|
|---|
| 687 | return SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
|
|---|
| 688 | }
|
|---|
| 689 |
|
|---|
| 690 | static int skel_aio_error_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
|
|---|
| 691 | {
|
|---|
| 692 | return SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
|
|---|
| 693 | }
|
|---|
| 694 |
|
|---|
| 695 | static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
|
|---|
| 696 | {
|
|---|
| 697 | return SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
|
|---|
| 698 | }
|
|---|
| 699 |
|
|---|
| 700 | static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
|
|---|
| 701 | {
|
|---|
| 702 | return SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
|
|---|
| 703 | }
|
|---|
| 704 |
|
|---|
| 705 | static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
|
|---|
| 706 | {
|
|---|
| 707 | return SMB_VFS_NEXT_AIO_FORCE(handle, fsp);
|
|---|
| 708 | }
|
|---|
| 709 |
|
|---|
| 710 | static bool skel_is_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname, SMB_STRUCT_STAT *sbuf)
|
|---|
| 711 | {
|
|---|
| 712 | return SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
|
|---|
| 713 | }
|
|---|
| 714 |
|
|---|
| 715 | static int skel_set_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname)
|
|---|
| 716 | {
|
|---|
| 717 | return SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
|
|---|
| 718 | }
|
|---|
| 719 |
|
|---|
| 720 | /* VFS operations structure */
|
|---|
| 721 |
|
|---|
| 722 | struct vfs_fn_pointers skel_transparent_fns = {
|
|---|
| 723 | /* Disk operations */
|
|---|
| 724 |
|
|---|
| 725 | .connect_fn = skel_connect,
|
|---|
| 726 | .disconnect = skel_disconnect,
|
|---|
| 727 | .disk_free = skel_disk_free,
|
|---|
| 728 | .get_quota = skel_get_quota,
|
|---|
| 729 | .set_quota = skel_set_quota,
|
|---|
| 730 | .get_shadow_copy_data = skel_get_shadow_copy_data,
|
|---|
| 731 | .statvfs = skel_statvfs,
|
|---|
| 732 | .fs_capabilities = skel_fs_capabilities,
|
|---|
| 733 |
|
|---|
| 734 | /* Directory operations */
|
|---|
| 735 |
|
|---|
| 736 | .opendir = skel_opendir,
|
|---|
| 737 | .fdopendir = skel_fdopendir,
|
|---|
| 738 | .readdir = skel_readdir,
|
|---|
| 739 | .seekdir = skel_seekdir,
|
|---|
| 740 | .telldir = skel_telldir,
|
|---|
| 741 | .rewind_dir = skel_rewind_dir,
|
|---|
| 742 | .mkdir = skel_mkdir,
|
|---|
| 743 | .rmdir = skel_rmdir,
|
|---|
| 744 | .closedir = skel_closedir,
|
|---|
| 745 | .init_search_op = skel_init_search_op,
|
|---|
| 746 |
|
|---|
| 747 | /* File operations */
|
|---|
| 748 |
|
|---|
| 749 | .open_fn = skel_open,
|
|---|
| 750 | .create_file = skel_create_file,
|
|---|
| 751 | .close_fn = skel_close_fn,
|
|---|
| 752 | .vfs_read = skel_vfs_read,
|
|---|
| 753 | .pread = skel_pread,
|
|---|
| 754 | .write = skel_write,
|
|---|
| 755 | .pwrite = skel_pwrite,
|
|---|
| 756 | .lseek = skel_lseek,
|
|---|
| 757 | .sendfile = skel_sendfile,
|
|---|
| 758 | .recvfile = skel_recvfile,
|
|---|
| 759 | .rename = skel_rename,
|
|---|
| 760 | .fsync = skel_fsync,
|
|---|
| 761 | .stat = skel_stat,
|
|---|
| 762 | .fstat = skel_fstat,
|
|---|
| 763 | .lstat = skel_lstat,
|
|---|
| 764 | .get_alloc_size = skel_get_alloc_size,
|
|---|
| 765 | .unlink = skel_unlink,
|
|---|
| 766 | .chmod = skel_chmod,
|
|---|
| 767 | .fchmod = skel_fchmod,
|
|---|
| 768 | .chown = skel_chown,
|
|---|
| 769 | .fchown = skel_fchown,
|
|---|
| 770 | .lchown = skel_lchown,
|
|---|
| 771 | .chdir = skel_chdir,
|
|---|
| 772 | .getwd = skel_getwd,
|
|---|
| 773 | .ntimes = skel_ntimes,
|
|---|
| 774 | .ftruncate = skel_ftruncate,
|
|---|
| 775 | .fallocate = skel_fallocate,
|
|---|
| 776 | .lock = skel_lock,
|
|---|
| 777 | .kernel_flock = skel_kernel_flock,
|
|---|
| 778 | .linux_setlease = skel_linux_setlease,
|
|---|
| 779 | .getlock = skel_getlock,
|
|---|
| 780 | .symlink = skel_symlink,
|
|---|
| 781 | .vfs_readlink = skel_vfs_readlink,
|
|---|
| 782 | .link = skel_link,
|
|---|
| 783 | .mknod = skel_mknod,
|
|---|
| 784 | .realpath = skel_realpath,
|
|---|
| 785 | .notify_watch = skel_notify_watch,
|
|---|
| 786 | .chflags = skel_chflags,
|
|---|
| 787 | .file_id_create = skel_file_id_create,
|
|---|
| 788 |
|
|---|
| 789 | .streaminfo = skel_streaminfo,
|
|---|
| 790 | .get_real_filename = skel_get_real_filename,
|
|---|
| 791 | .connectpath = skel_connectpath,
|
|---|
| 792 | .brl_lock_windows = skel_brl_lock_windows,
|
|---|
| 793 | .brl_unlock_windows = skel_brl_unlock_windows,
|
|---|
| 794 | .brl_cancel_windows = skel_brl_cancel_windows,
|
|---|
| 795 | .strict_lock = skel_strict_lock,
|
|---|
| 796 | .strict_unlock = skel_strict_unlock,
|
|---|
| 797 | .translate_name = skel_translate_name,
|
|---|
| 798 |
|
|---|
| 799 | /* NT ACL operations. */
|
|---|
| 800 |
|
|---|
| 801 | .fget_nt_acl = skel_fget_nt_acl,
|
|---|
| 802 | .get_nt_acl = skel_get_nt_acl,
|
|---|
| 803 | .fset_nt_acl = skel_fset_nt_acl,
|
|---|
| 804 |
|
|---|
| 805 | /* POSIX ACL operations. */
|
|---|
| 806 |
|
|---|
| 807 | .chmod_acl = skel_chmod_acl,
|
|---|
| 808 | .fchmod_acl = skel_fchmod_acl,
|
|---|
| 809 |
|
|---|
| 810 | .sys_acl_get_entry = skel_sys_acl_get_entry,
|
|---|
| 811 | .sys_acl_get_tag_type = skel_sys_acl_get_tag_type,
|
|---|
| 812 | .sys_acl_get_permset = skel_sys_acl_get_permset,
|
|---|
| 813 | .sys_acl_get_qualifier = skel_sys_acl_get_qualifier,
|
|---|
| 814 | .sys_acl_get_file = skel_sys_acl_get_file,
|
|---|
| 815 | .sys_acl_get_fd = skel_sys_acl_get_fd,
|
|---|
| 816 | .sys_acl_clear_perms = skel_sys_acl_clear_perms,
|
|---|
| 817 | .sys_acl_add_perm = skel_sys_acl_add_perm,
|
|---|
| 818 | .sys_acl_to_text = skel_sys_acl_to_text,
|
|---|
| 819 | .sys_acl_init = skel_sys_acl_init,
|
|---|
| 820 | .sys_acl_create_entry = skel_sys_acl_create_entry,
|
|---|
| 821 | .sys_acl_set_tag_type = skel_sys_acl_set_tag_type,
|
|---|
| 822 | .sys_acl_set_qualifier = skel_sys_acl_set_qualifier,
|
|---|
| 823 | .sys_acl_set_permset = skel_sys_acl_set_permset,
|
|---|
| 824 | .sys_acl_valid = skel_sys_acl_valid,
|
|---|
| 825 | .sys_acl_set_file = skel_sys_acl_set_file,
|
|---|
| 826 | .sys_acl_set_fd = skel_sys_acl_set_fd,
|
|---|
| 827 | .sys_acl_delete_def_file = skel_sys_acl_delete_def_file,
|
|---|
| 828 | .sys_acl_get_perm = skel_sys_acl_get_perm,
|
|---|
| 829 | .sys_acl_free_text = skel_sys_acl_free_text,
|
|---|
| 830 | .sys_acl_free_acl = skel_sys_acl_free_acl,
|
|---|
| 831 | .sys_acl_free_qualifier = skel_sys_acl_free_qualifier,
|
|---|
| 832 |
|
|---|
| 833 | /* EA operations. */
|
|---|
| 834 | .getxattr = skel_getxattr,
|
|---|
| 835 | .lgetxattr = skel_lgetxattr,
|
|---|
| 836 | .fgetxattr = skel_fgetxattr,
|
|---|
| 837 | .listxattr = skel_listxattr,
|
|---|
| 838 | .llistxattr = skel_llistxattr,
|
|---|
| 839 | .flistxattr = skel_flistxattr,
|
|---|
| 840 | .removexattr = skel_removexattr,
|
|---|
| 841 | .lremovexattr = skel_lremovexattr,
|
|---|
| 842 | .fremovexattr = skel_fremovexattr,
|
|---|
| 843 | .setxattr = skel_setxattr,
|
|---|
| 844 | .lsetxattr = skel_lsetxattr,
|
|---|
| 845 | .fsetxattr = skel_fsetxattr,
|
|---|
| 846 |
|
|---|
| 847 | /* aio operations */
|
|---|
| 848 | .aio_read = skel_aio_read,
|
|---|
| 849 | .aio_write = skel_aio_write,
|
|---|
| 850 | .aio_return_fn = skel_aio_return_fn,
|
|---|
| 851 | .aio_cancel = skel_aio_cancel,
|
|---|
| 852 | .aio_error_fn = skel_aio_error_fn,
|
|---|
| 853 | .aio_fsync = skel_aio_fsync,
|
|---|
| 854 | .aio_suspend = skel_aio_suspend,
|
|---|
| 855 | .aio_force = skel_aio_force,
|
|---|
| 856 |
|
|---|
| 857 | /* offline operations */
|
|---|
| 858 | .is_offline = skel_is_offline,
|
|---|
| 859 | .set_offline = skel_set_offline
|
|---|
| 860 | };
|
|---|
| 861 |
|
|---|
| 862 | NTSTATUS vfs_skel_transparent_init(void)
|
|---|
| 863 | {
|
|---|
| 864 | return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_transparent", &skel_transparent_fns);
|
|---|
| 865 | }
|
|---|