Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

Location:
vendor/current/examples/VFS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/examples/VFS/shadow_copy_test.c

    r414 r740  
    2020
    2121#include "includes.h"
     22#include "ntioctl.h"
     23#include "smbd/proto.h"
    2224
    2325#undef DBGC_CLASS
     
    5153*/
    5254
    53 static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
     55static int test_get_shadow_copy_data(vfs_handle_struct *handle,
     56                                    files_struct *fsp,
     57                                    struct shadow_copy_data *shadow_copy_data,
     58                                    bool labels)
    5459{
    5560        uint32 num = 3;
     
    6065        if (labels) {   
    6166                if (num) {
    62                         shadow_copy_data->labels = TALLOC_ZERO_ARRAY(shadow_copy_data->mem_ctx,SHADOW_COPY_LABEL,num);
     67                        shadow_copy_data->labels = TALLOC_ZERO_ARRAY(shadow_copy_data,SHADOW_COPY_LABEL,num);
    6368                } else {
    6469                        shadow_copy_data->labels = NULL;
     
    8287NTSTATUS vfs_shadow_copy_test_init(void)
    8388{
    84         return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy_test", &vfs_test_shadow_copy_fns);
     89        return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
     90                                "shadow_copy_test",
     91                                &vfs_test_shadow_copy_fns);
    8592}
  • vendor/current/examples/VFS/skel_opaque.c

    r414 r740  
    2424
    2525#include "includes.h"
     26#include "smbd/proto.h"
    2627
    2728/* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE
     
    6667}
    6768
    68 static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
     69static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, struct shadow_copy_data *shadow_copy_data, bool labels)
    6970{
    7071        errno = ENOSYS;
     
    8485
    8586static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle,  const char *fname, const char *mask, uint32 attr)
     87{
     88        return NULL;
     89}
     90
     91static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
    8692{
    8793        return NULL;
     
    151157                                uint32_t oplock_request,
    152158                                uint64_t allocation_size,
     159                                uint32_t private_flags,
    153160                                struct security_descriptor *sd,
    154161                                struct ea_list *ea_list,
     
    308315}
    309316
     317static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
     318                        enum vfs_fallocate_mode mode,
     319                        SMB_OFF_T offset, SMB_OFF_T len)
     320{
     321        errno = ENOSYS;
     322        return -1;
     323}
     324
    310325static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
    311326{
     
    356371}
    357372
    358 static char *skel_realpath(vfs_handle_struct *handle,  const char *path, char *resolved_path)
     373static char *skel_realpath(vfs_handle_struct *handle,  const char *path)
    359374{
    360375        errno = ENOSYS;
     
    464479
    465480static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
    466         uint32 security_info, SEC_DESC **ppdesc)
     481        uint32 security_info, struct security_descriptor **ppdesc)
    467482{
    468483        return NT_STATUS_NOT_IMPLEMENTED;
     
    470485
    471486static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
    472         const char *name, uint32 security_info, SEC_DESC **ppdesc)
     487        const char *name, uint32 security_info, struct security_descriptor **ppdesc)
    473488{
    474489        return NT_STATUS_NOT_IMPLEMENTED;
     
    476491
    477492static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
    478         uint32 security_info_sent, const SEC_DESC *psd)
     493        uint32 security_info_sent, const struct security_descriptor *psd)
    479494{
    480495        return NT_STATUS_NOT_IMPLEMENTED;
     
    747762}
    748763
    749 static bool skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
     764static bool skel_is_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname, SMB_STRUCT_STAT *sbuf)
    750765{
    751766        errno = ENOSYS;
     
    753768}
    754769
    755 static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)
     770static int skel_set_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname)
    756771{
    757772        errno = ENOSYS;
     
    776791
    777792        .opendir = skel_opendir,
     793        .fdopendir = skel_fdopendir,
    778794        .readdir = skel_readdir,
    779795        .seekdir = skel_seekdir,
     
    787803        /* File operations */
    788804
    789         .open = skel_open,
     805        .open_fn = skel_open,
    790806        .create_file = skel_create_file,
    791807        .close_fn = skel_close_fn,
     
    813829        .ntimes = skel_ntimes,
    814830        .ftruncate = skel_ftruncate,
     831        .fallocate = skel_fallocate,
    815832        .lock = skel_lock,
    816833        .kernel_flock = skel_kernel_flock,
  • vendor/current/examples/VFS/skel_transparent.c

    r414 r740  
    2424
    2525#include "includes.h"
     26#include "smbd/proto.h"
    2627
    2728/* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE
     
    6566}
    6667
    67 static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
     68static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, struct shadow_copy_data *shadow_copy_data, bool labels)
    6869{
    6970        return SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, labels);
     
    8384{
    8485        return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
     86}
     87
     88static 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);
    8591}
    8692
     
    144150                                uint32_t oplock_request,
    145151                                uint64_t allocation_size,
     152                                uint32_t private_flags,
    146153                                struct security_descriptor *sd,
    147154                                struct ea_list *ea_list,
     
    160167                                oplock_request,
    161168                                allocation_size,
     169                                private_flags,
    162170                                sd,
    163171                                ea_list,
     
    291299}
    292300
     301static 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
    293309static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
    294310{
     
    331347}
    332348
    333 static char *skel_realpath(vfs_handle_struct *handle,  const char *path, char *resolved_path)
    334 {
    335         return SMB_VFS_NEXT_REALPATH(handle, path, resolved_path);
     349static char *skel_realpath(vfs_handle_struct *handle,  const char *path)
     350{
     351        return SMB_VFS_NEXT_REALPATH(handle, path);
    336352}
    337353
     
    454470
    455471static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
    456         uint32 security_info, SEC_DESC **ppdesc)
     472        uint32 security_info, struct security_descriptor **ppdesc)
    457473{
    458474        return SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc);
     
    460476
    461477static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
    462         const char *name, uint32 security_info, SEC_DESC **ppdesc)
     478        const char *name, uint32 security_info, struct security_descriptor **ppdesc)
    463479{
    464480        return SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, ppdesc);
     
    466482
    467483static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
    468         uint32 security_info_sent, const SEC_DESC *psd)
     484        uint32 security_info_sent, const struct security_descriptor *psd)
    469485{
    470486        return SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
     
    692708}
    693709
    694 static bool skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
    695 {
    696         return SMB_VFS_NEXT_IS_OFFLINE(handle, path, sbuf);
    697 }
    698 
    699 static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)
    700 {
    701         return SMB_VFS_NEXT_SET_OFFLINE(handle, path);
     710static 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
     715static int skel_set_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname)
     716{
     717        return SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
    702718}
    703719
     
    719735
    720736        .opendir = skel_opendir,
     737        .fdopendir = skel_fdopendir,
    721738        .readdir = skel_readdir,
    722739        .seekdir = skel_seekdir,
     
    730747        /* File operations */
    731748
    732         .open = skel_open,
     749        .open_fn = skel_open,
    733750        .create_file = skel_create_file,
    734751        .close_fn = skel_close_fn,
     
    756773        .ntimes = skel_ntimes,
    757774        .ftruncate = skel_ftruncate,
     775        .fallocate = skel_fallocate,
    758776        .lock = skel_lock,
    759777        .kernel_flock = skel_kernel_flock,
Note: See TracChangeset for help on using the changeset viewer.