00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _VFS_H
00027 #define _VFS_H
00028
00029
00030
00031 #ifdef vfs_ops
00032 #undef vfs_ops
00033 #endif
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #define SMB_VFS_INTERFACE_VERSION 21
00074
00075
00076
00077 #define vfs_init __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore(void) { __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore };
00078 #define lp_parm_string __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string { \
00079 __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string };
00080 #define lp_vfs_options __ERROR_please_donot_use_lp_vfs_options_anymore_use_lp_parm_xxxx_functions_instead { \
00081 __ERROR_please_donot_use_lp_vfs_options_anymore_use_lp_parm_xxxx_functions_instead };
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 struct vfs_handle_struct;
00092 struct connection_struct;
00093 struct files_struct;
00094 struct security_descriptor_info;
00095 struct vfs_statvfs_struct;
00096
00097
00098
00099
00100
00101
00102
00103
00104 typedef enum _vfs_op_type {
00105 SMB_VFS_OP_NOOP = -1,
00106
00107
00108
00109 SMB_VFS_OP_CONNECT = 0,
00110 SMB_VFS_OP_DISCONNECT,
00111 SMB_VFS_OP_DISK_FREE,
00112 SMB_VFS_OP_GET_QUOTA,
00113 SMB_VFS_OP_SET_QUOTA,
00114 SMB_VFS_OP_GET_SHADOW_COPY_DATA,
00115 SMB_VFS_OP_STATVFS,
00116
00117
00118
00119 SMB_VFS_OP_OPENDIR,
00120 SMB_VFS_OP_READDIR,
00121 SMB_VFS_OP_SEEKDIR,
00122 SMB_VFS_OP_TELLDIR,
00123 SMB_VFS_OP_REWINDDIR,
00124 SMB_VFS_OP_MKDIR,
00125 SMB_VFS_OP_RMDIR,
00126 SMB_VFS_OP_CLOSEDIR,
00127
00128
00129
00130 SMB_VFS_OP_OPEN,
00131 SMB_VFS_OP_CLOSE,
00132 SMB_VFS_OP_READ,
00133 SMB_VFS_OP_PREAD,
00134 SMB_VFS_OP_WRITE,
00135 SMB_VFS_OP_PWRITE,
00136 SMB_VFS_OP_LSEEK,
00137 SMB_VFS_OP_SENDFILE,
00138 SMB_VFS_OP_RENAME,
00139 SMB_VFS_OP_FSYNC,
00140 SMB_VFS_OP_STAT,
00141 SMB_VFS_OP_FSTAT,
00142 SMB_VFS_OP_LSTAT,
00143 SMB_VFS_OP_UNLINK,
00144 SMB_VFS_OP_CHMOD,
00145 SMB_VFS_OP_FCHMOD,
00146 SMB_VFS_OP_CHOWN,
00147 SMB_VFS_OP_FCHOWN,
00148 SMB_VFS_OP_CHDIR,
00149 SMB_VFS_OP_GETWD,
00150 SMB_VFS_OP_NTIMES,
00151 SMB_VFS_OP_FTRUNCATE,
00152 SMB_VFS_OP_LOCK,
00153 SMB_VFS_OP_KERNEL_FLOCK,
00154 SMB_VFS_OP_LINUX_SETLEASE,
00155 SMB_VFS_OP_GETLOCK,
00156 SMB_VFS_OP_SYMLINK,
00157 SMB_VFS_OP_READLINK,
00158 SMB_VFS_OP_LINK,
00159 SMB_VFS_OP_MKNOD,
00160 SMB_VFS_OP_REALPATH,
00161 SMB_VFS_OP_NOTIFY_WATCH,
00162 SMB_VFS_OP_CHFLAGS,
00163
00164
00165
00166 SMB_VFS_OP_FGET_NT_ACL,
00167 SMB_VFS_OP_GET_NT_ACL,
00168 SMB_VFS_OP_FSET_NT_ACL,
00169 SMB_VFS_OP_SET_NT_ACL,
00170
00171
00172
00173 SMB_VFS_OP_CHMOD_ACL,
00174 SMB_VFS_OP_FCHMOD_ACL,
00175
00176 SMB_VFS_OP_SYS_ACL_GET_ENTRY,
00177 SMB_VFS_OP_SYS_ACL_GET_TAG_TYPE,
00178 SMB_VFS_OP_SYS_ACL_GET_PERMSET,
00179 SMB_VFS_OP_SYS_ACL_GET_QUALIFIER,
00180 SMB_VFS_OP_SYS_ACL_GET_FILE,
00181 SMB_VFS_OP_SYS_ACL_GET_FD,
00182 SMB_VFS_OP_SYS_ACL_CLEAR_PERMS,
00183 SMB_VFS_OP_SYS_ACL_ADD_PERM,
00184 SMB_VFS_OP_SYS_ACL_TO_TEXT,
00185 SMB_VFS_OP_SYS_ACL_INIT,
00186 SMB_VFS_OP_SYS_ACL_CREATE_ENTRY,
00187 SMB_VFS_OP_SYS_ACL_SET_TAG_TYPE,
00188 SMB_VFS_OP_SYS_ACL_SET_QUALIFIER,
00189 SMB_VFS_OP_SYS_ACL_SET_PERMSET,
00190 SMB_VFS_OP_SYS_ACL_VALID,
00191 SMB_VFS_OP_SYS_ACL_SET_FILE,
00192 SMB_VFS_OP_SYS_ACL_SET_FD,
00193 SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
00194 SMB_VFS_OP_SYS_ACL_GET_PERM,
00195 SMB_VFS_OP_SYS_ACL_FREE_TEXT,
00196 SMB_VFS_OP_SYS_ACL_FREE_ACL,
00197 SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER,
00198
00199
00200 SMB_VFS_OP_GETXATTR,
00201 SMB_VFS_OP_LGETXATTR,
00202 SMB_VFS_OP_FGETXATTR,
00203 SMB_VFS_OP_LISTXATTR,
00204 SMB_VFS_OP_LLISTXATTR,
00205 SMB_VFS_OP_FLISTXATTR,
00206 SMB_VFS_OP_REMOVEXATTR,
00207 SMB_VFS_OP_LREMOVEXATTR,
00208 SMB_VFS_OP_FREMOVEXATTR,
00209 SMB_VFS_OP_SETXATTR,
00210 SMB_VFS_OP_LSETXATTR,
00211 SMB_VFS_OP_FSETXATTR,
00212
00213
00214 SMB_VFS_OP_AIO_READ,
00215 SMB_VFS_OP_AIO_WRITE,
00216 SMB_VFS_OP_AIO_RETURN,
00217 SMB_VFS_OP_AIO_CANCEL,
00218 SMB_VFS_OP_AIO_ERROR,
00219 SMB_VFS_OP_AIO_FSYNC,
00220 SMB_VFS_OP_AIO_SUSPEND,
00221
00222
00223
00224 SMB_VFS_OP_LAST
00225 } vfs_op_type;
00226
00227
00228
00229
00230 struct vfs_ops {
00231 struct vfs_fn_pointers {
00232
00233
00234 int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user);
00235 void (*disconnect)(struct vfs_handle_struct *handle);
00236 SMB_BIG_UINT (*disk_free)(struct vfs_handle_struct *handle, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
00237 SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
00238 int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
00239 int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
00240 int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels);
00241 int (*statvfs)(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf);
00242
00243
00244
00245 SMB_STRUCT_DIR *(*opendir)(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attributes);
00246 SMB_STRUCT_DIRENT *(*readdir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
00247 void (*seekdir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset);
00248 long (*telldir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
00249 void (*rewind_dir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
00250 int (*mkdir)(struct vfs_handle_struct *handle, const char *path, mode_t mode);
00251 int (*rmdir)(struct vfs_handle_struct *handle, const char *path);
00252 int (*closedir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dir);
00253
00254
00255
00256 int (*open)(struct vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode);
00257 int (*close_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd);
00258 ssize_t (*read)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, void *data, size_t n);
00259 ssize_t (*pread)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, void *data, size_t n, SMB_OFF_T offset);
00260 ssize_t (*write)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, const void *data, size_t n);
00261 ssize_t (*pwrite)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, const void *data, size_t n, SMB_OFF_T offset);
00262 SMB_OFF_T (*lseek)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T offset, int whence);
00263 ssize_t (*sendfile)(struct vfs_handle_struct *handle, int tofd, files_struct *fsp, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
00264 int (*rename)(struct vfs_handle_struct *handle, const char *oldname, const char *newname);
00265 int (*fsync)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd);
00266 int (*stat)(struct vfs_handle_struct *handle, const char *fname, SMB_STRUCT_STAT *sbuf);
00267 int (*fstat)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf);
00268 int (*lstat)(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf);
00269 int (*unlink)(struct vfs_handle_struct *handle, const char *path);
00270 int (*chmod)(struct vfs_handle_struct *handle, const char *path, mode_t mode);
00271 int (*fchmod)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, mode_t mode);
00272 int (*chown)(struct vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid);
00273 int (*fchown)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
00274 int (*chdir)(struct vfs_handle_struct *handle, const char *path);
00275 char *(*getwd)(struct vfs_handle_struct *handle, char *buf);
00276 int (*ntimes)(struct vfs_handle_struct *handle, const char *path, const struct timespec ts[2]);
00277 int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T offset);
00278 BOOL (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
00279 int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 share_mode);
00280 int (*linux_setlease)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int leasetype);
00281 BOOL (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
00282 int (*symlink)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
00283 int (*readlink)(struct vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz);
00284 int (*link)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
00285 int (*mknod)(struct vfs_handle_struct *handle, const char *path, mode_t mode, SMB_DEV_T dev);
00286 char *(*realpath)(struct vfs_handle_struct *handle, const char *path, char *resolved_path);
00287 NTSTATUS (*notify_watch)(struct vfs_handle_struct *handle,
00288 struct sys_notify_context *ctx,
00289 struct notify_entry *e,
00290 void (*callback)(struct sys_notify_context *ctx,
00291 void *private_data,
00292 struct notify_event *ev),
00293 void *private_data, void *handle_p);
00294 int (*chflags)(struct vfs_handle_struct *handle, const char *path, uint flags);
00295
00296
00297
00298 size_t (*fget_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 security_info, struct security_descriptor_info **ppdesc);
00299 size_t (*get_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, uint32 security_info, struct security_descriptor_info **ppdesc);
00300 BOOL (*fset_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd);
00301 BOOL (*set_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd);
00302
00303
00304
00305 int (*chmod_acl)(struct vfs_handle_struct *handle, const char *name, mode_t mode);
00306 int (*fchmod_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, mode_t mode);
00307
00308 int (*sys_acl_get_entry)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
00309 int (*sys_acl_get_tag_type)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
00310 int (*sys_acl_get_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
00311 void * (*sys_acl_get_qualifier)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d);
00312 SMB_ACL_T (*sys_acl_get_file)(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type);
00313 SMB_ACL_T (*sys_acl_get_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd);
00314 int (*sys_acl_clear_perms)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset);
00315 int (*sys_acl_add_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
00316 char * (*sys_acl_to_text)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, ssize_t *plen);
00317 SMB_ACL_T (*sys_acl_init)(struct vfs_handle_struct *handle, int count);
00318 int (*sys_acl_create_entry)(struct vfs_handle_struct *handle, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
00319 int (*sys_acl_set_tag_type)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
00320 int (*sys_acl_set_qualifier)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, void *qual);
00321 int (*sys_acl_set_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
00322 int (*sys_acl_valid)(struct vfs_handle_struct *handle, SMB_ACL_T theacl );
00323 int (*sys_acl_set_file)(struct vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
00324 int (*sys_acl_set_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_ACL_T theacl);
00325 int (*sys_acl_delete_def_file)(struct vfs_handle_struct *handle, const char *path);
00326 int (*sys_acl_get_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
00327 int (*sys_acl_free_text)(struct vfs_handle_struct *handle, char *text);
00328 int (*sys_acl_free_acl)(struct vfs_handle_struct *handle, SMB_ACL_T posix_acl);
00329 int (*sys_acl_free_qualifier)(struct vfs_handle_struct *handle, void *qualifier, SMB_ACL_TAG_T tagtype);
00330
00331
00332 ssize_t (*getxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
00333 ssize_t (*lgetxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
00334 ssize_t (*fgetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int fd, const char *name, void *value, size_t size);
00335 ssize_t (*listxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
00336 ssize_t (*llistxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
00337 ssize_t (*flistxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int fd, char *list, size_t size);
00338 int (*removexattr)(struct vfs_handle_struct *handle, const char *path, const char *name);
00339 int (*lremovexattr)(struct vfs_handle_struct *handle, const char *path, const char *name);
00340 int (*fremovexattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int filedes, const char *name);
00341 int (*setxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
00342 int (*lsetxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
00343 int (*fsetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int filedes, const char *name, const void *value, size_t size, int flags);
00344
00345
00346 int (*aio_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
00347 int (*aio_write)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
00348 ssize_t (*aio_return_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
00349 int (*aio_cancel)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb);
00350 int (*aio_error_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
00351 int (*aio_fsync)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
00352 int (*aio_suspend)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout);
00353
00354 } ops;
00355
00356 struct vfs_handles_pointers {
00357
00358
00359 struct vfs_handle_struct *connect_hnd;
00360 struct vfs_handle_struct *disconnect;
00361 struct vfs_handle_struct *disk_free;
00362 struct vfs_handle_struct *get_quota;
00363 struct vfs_handle_struct *set_quota;
00364 struct vfs_handle_struct *get_shadow_copy_data;
00365 struct vfs_handle_struct *statvfs;
00366
00367
00368
00369 struct vfs_handle_struct *opendir;
00370 struct vfs_handle_struct *readdir;
00371 struct vfs_handle_struct *seekdir;
00372 struct vfs_handle_struct *telldir;
00373 struct vfs_handle_struct *rewind_dir;
00374 struct vfs_handle_struct *mkdir;
00375 struct vfs_handle_struct *rmdir;
00376 struct vfs_handle_struct *closedir;
00377
00378
00379
00380 struct vfs_handle_struct *open;
00381 struct vfs_handle_struct *close_hnd;
00382 struct vfs_handle_struct *read;
00383 struct vfs_handle_struct *pread;
00384 struct vfs_handle_struct *write;
00385 struct vfs_handle_struct *pwrite;
00386 struct vfs_handle_struct *lseek;
00387 struct vfs_handle_struct *sendfile;
00388 struct vfs_handle_struct *rename;
00389 struct vfs_handle_struct *fsync;
00390 struct vfs_handle_struct *stat;
00391 struct vfs_handle_struct *fstat;
00392 struct vfs_handle_struct *lstat;
00393 struct vfs_handle_struct *unlink;
00394 struct vfs_handle_struct *chmod;
00395 struct vfs_handle_struct *fchmod;
00396 struct vfs_handle_struct *chown;
00397 struct vfs_handle_struct *fchown;
00398 struct vfs_handle_struct *chdir;
00399 struct vfs_handle_struct *getwd;
00400 struct vfs_handle_struct *ntimes;
00401 struct vfs_handle_struct *ftruncate;
00402 struct vfs_handle_struct *lock;
00403 struct vfs_handle_struct *kernel_flock;
00404 struct vfs_handle_struct *linux_setlease;
00405 struct vfs_handle_struct *getlock;
00406 struct vfs_handle_struct *symlink;
00407 struct vfs_handle_struct *readlink;
00408 struct vfs_handle_struct *link;
00409 struct vfs_handle_struct *mknod;
00410 struct vfs_handle_struct *realpath;
00411 struct vfs_handle_struct *notify_watch;
00412 struct vfs_handle_struct *chflags;
00413
00414
00415
00416 struct vfs_handle_struct *fget_nt_acl;
00417 struct vfs_handle_struct *get_nt_acl;
00418 struct vfs_handle_struct *fset_nt_acl;
00419 struct vfs_handle_struct *set_nt_acl;
00420
00421
00422
00423 struct vfs_handle_struct *chmod_acl;
00424 struct vfs_handle_struct *fchmod_acl;
00425
00426 struct vfs_handle_struct *sys_acl_get_entry;
00427 struct vfs_handle_struct *sys_acl_get_tag_type;
00428 struct vfs_handle_struct *sys_acl_get_permset;
00429 struct vfs_handle_struct *sys_acl_get_qualifier;
00430 struct vfs_handle_struct *sys_acl_get_file;
00431 struct vfs_handle_struct *sys_acl_get_fd;
00432 struct vfs_handle_struct *sys_acl_clear_perms;
00433 struct vfs_handle_struct *sys_acl_add_perm;
00434 struct vfs_handle_struct *sys_acl_to_text;
00435 struct vfs_handle_struct *sys_acl_init;
00436 struct vfs_handle_struct *sys_acl_create_entry;
00437 struct vfs_handle_struct *sys_acl_set_tag_type;
00438 struct vfs_handle_struct *sys_acl_set_qualifier;
00439 struct vfs_handle_struct *sys_acl_set_permset;
00440 struct vfs_handle_struct *sys_acl_valid;
00441 struct vfs_handle_struct *sys_acl_set_file;
00442 struct vfs_handle_struct *sys_acl_set_fd;
00443 struct vfs_handle_struct *sys_acl_delete_def_file;
00444 struct vfs_handle_struct *sys_acl_get_perm;
00445 struct vfs_handle_struct *sys_acl_free_text;
00446 struct vfs_handle_struct *sys_acl_free_acl;
00447 struct vfs_handle_struct *sys_acl_free_qualifier;
00448
00449
00450 struct vfs_handle_struct *getxattr;
00451 struct vfs_handle_struct *lgetxattr;
00452 struct vfs_handle_struct *fgetxattr;
00453 struct vfs_handle_struct *listxattr;
00454 struct vfs_handle_struct *llistxattr;
00455 struct vfs_handle_struct *flistxattr;
00456 struct vfs_handle_struct *removexattr;
00457 struct vfs_handle_struct *lremovexattr;
00458 struct vfs_handle_struct *fremovexattr;
00459 struct vfs_handle_struct *setxattr;
00460 struct vfs_handle_struct *lsetxattr;
00461 struct vfs_handle_struct *fsetxattr;
00462
00463
00464 struct vfs_handle_struct *aio_read;
00465 struct vfs_handle_struct *aio_write;
00466 struct vfs_handle_struct *aio_return;
00467 struct vfs_handle_struct *aio_cancel;
00468 struct vfs_handle_struct *aio_error;
00469 struct vfs_handle_struct *aio_fsync;
00470 struct vfs_handle_struct *aio_suspend;
00471 } handles;
00472 };
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494 typedef enum _vfs_op_layer {
00495 SMB_VFS_LAYER_NOOP = -1,
00496
00497 SMB_VFS_LAYER_OPAQUE = 0,
00498 SMB_VFS_LAYER_TRANSPARENT,
00499
00500 SMB_VFS_LAYER_LOGGER,
00501
00502 SMB_VFS_LAYER_SPLITTER,
00503
00504 SMB_VFS_LAYER_SCANNER
00505
00506 } vfs_op_layer;
00507
00508
00509
00510
00511
00512
00513
00514
00515 typedef struct vfs_op_tuple {
00516 void* op;
00517 vfs_op_type type;
00518 vfs_op_layer layer;
00519 } vfs_op_tuple;
00520
00521
00522 typedef struct vfs_handle_struct {
00523 struct vfs_handle_struct *next, *prev;
00524 const char *param;
00525 struct vfs_ops vfs_next;
00526 struct connection_struct *conn;
00527 void *data;
00528 void (*free_data)(void **data);
00529 } vfs_handle_struct;
00530
00531
00532 typedef struct vfs_statvfs_struct {
00533
00534 uint32 OptimalTransferSize;
00535 uint32 BlockSize;
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547 SMB_BIG_UINT TotalBlocks;
00548 SMB_BIG_UINT BlocksAvail;
00549 SMB_BIG_UINT UserBlocksAvail;
00550
00551
00552 SMB_BIG_UINT TotalFileNodes;
00553 SMB_BIG_UINT FreeFileNodes;
00554 SMB_BIG_UINT FsIdentifier;
00555
00556
00557 } vfs_statvfs_struct;
00558
00559 #define VFS_ADD_FSP_EXTENSION(handle, fsp, type) \
00560 vfs_add_fsp_extension_notype(handle, (fsp), sizeof(type))
00561
00562 #define VFS_FETCH_FSP_EXTENSION(handle, fsp) \
00563 vfs_fetch_fsp_extension(handle, (fsp))
00564
00565 #define VFS_REMOVE_FSP_EXTENSION(handle, fsp) \
00566 vfs_remove_fsp_extension((handle), (fsp))
00567
00568 #define SMB_VFS_HANDLE_GET_DATA(handle, datap, type, ret) { \
00569 if (!(handle)||((datap=(type *)(handle)->data)==NULL)) { \
00570 DEBUG(0,("%s() failed to get vfs_handle->data!\n",FUNCTION_MACRO)); \
00571 ret; \
00572 } \
00573 }
00574
00575 #define SMB_VFS_HANDLE_SET_DATA(handle, datap, free_fn, type, ret) { \
00576 if (!(handle)) { \
00577 DEBUG(0,("%s() failed to set handle->data!\n",FUNCTION_MACRO)); \
00578 ret; \
00579 } else { \
00580 if ((handle)->free_data) { \
00581 (handle)->free_data(&(handle)->data); \
00582 } \
00583 (handle)->data = (void *)datap; \
00584 (handle)->free_data = free_fn; \
00585 } \
00586 }
00587
00588 #define SMB_VFS_HANDLE_FREE_DATA(handle) { \
00589 if ((handle) && (handle)->free_data) { \
00590 (handle)->free_data(&(handle)->data); \
00591 } \
00592 }
00593
00594
00595 #define SMB_VFS_HANDLE_TEST_DATA(handle) ( !(handle) || !(handle)->data ? False : True )
00596
00597 #define SMB_VFS_OP(x) ((void *) x)
00598
00599 #define DEFAULT_VFS_MODULE_NAME "/[Default VFS]/"
00600
00601 #include "vfs_macros.h"
00602
00603 #endif