diff options
author | Gerald Carter <jerry@samba.org> | 2007-03-20 16:56:16 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2007-03-20 16:56:16 +0000 |
commit | 651d5a89c59c107c05e789358624058e16af1b66 (patch) | |
tree | dfd29754255ea87b30eb16a06c505e42f98b9be3 /examples | |
parent | 0f475ed1a387e37d477fd434c06ad5783c58adea (diff) | |
download | samba-651d5a89c59c107c05e789358624058e16af1b66.tar.gz samba-651d5a89c59c107c05e789358624058e16af1b66.tar.xz samba-651d5a89c59c107c05e789358624058e16af1b66.zip |
r21889: * Pull from SAMBA-3_0_25 svn r21888
* Set version to 3.0.25pre2
Diffstat (limited to 'examples')
-rw-r--r-- | examples/VFS/Makefile.in | 2 | ||||
-rw-r--r-- | examples/VFS/configure.in | 4 | ||||
-rw-r--r-- | examples/VFS/skel_opaque.c | 42 | ||||
-rw-r--r-- | examples/VFS/skel_transparent.c | 34 |
4 files changed, 67 insertions, 15 deletions
diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in index caf8f030aa4..53914994b1c 100644 --- a/examples/VFS/Makefile.in +++ b/examples/VFS/Makefile.in @@ -39,5 +39,5 @@ clean: rm -f core *~ *% *.bak *.o *.$(SHLIBEXT) distclean: clean - rm config.* Makefile + rm -f config.status config.cache Makefile diff --git a/examples/VFS/configure.in b/examples/VFS/configure.in index 515d43f0096..1a0ff6bb4ca 100644 --- a/examples/VFS/configure.in +++ b/examples/VFS/configure.in @@ -182,6 +182,10 @@ PICFLAGS="" PICSUFFIX="po" SHLIBEXT="so" +# Since we are not embedded in the Samba tree, building shared modules is +# really the only option. +enable_shared=yes + if test "$enable_shared" = "yes"; then # this bit needs to be modified for each OS that is suported by # smbwrapper. You need to specify how to created a shared library and diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 096068da147..7103d0c27b7 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -38,6 +38,11 @@ * --metze */ +/* NOTE: As of approximately Samba 3.0.24, the vfswrap_* functions are not + * global symbols. They are included here only as an pointer that opaque + * operations should not call further into the VFS. + */ + static int skel_connect(vfs_handle_struct *handle, const char *service, const char *user) { return 0; @@ -211,9 +216,9 @@ static char *skel_getwd(vfs_handle_struct *handle, char *buf) return vfswrap_getwd(NULL, buf); } -static int skel_utime(vfs_handle_struct *handle, const char *path, struct utimbuf *times) +static int skel_ntimes(vfs_handle_struct *handle, const char *path, const struct timespec ts[2]) { - return vfswrap_utime(NULL, path, times); + return vfswrap_ntimes(NULL, path, ts); } static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T offset) @@ -236,6 +241,7 @@ static int skel_symlink(vfs_handle_struct *handle, const char *oldpath, const c return vfswrap_symlink(NULL, oldpath, newpath); } + static int skel_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz) { return vfswrap_readlink(NULL, path, buf, bufsiz); @@ -256,25 +262,43 @@ static char *skel_realpath(vfs_handle_struct *handle, const char *path, char *r return vfswrap_realpath(NULL, path, resolved_path); } -static size_t skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info, struct security_descriptor_info **ppdesc) +static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle, + struct sys_notify_context *ctx, struct notify_entry *e, + void (*callback)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev), + void *private_data, void *handle_p) +{ + return NT_STATUS_NOT_SUPPORTED; +} + +static int skel_chflags(vfs_handle_struct *handle, const char *path, uint flags) +{ + errno = ENOSYS; + return -1; +} + +static size_t skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp, + int fd, uint32 security_info, SEC_DESC **ppdesc) { errno = ENOSYS; return 0; } -static size_t skel_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info, struct security_descriptor_info **ppdesc) +static size_t skel_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp, + const char *name, uint32 security_info, SEC_DESC **ppdesc) { errno = ENOSYS; return 0; } -static BOOL skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd) +static BOOL skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int + fd, uint32 security_info_sent, SEC_DESC *psd) { errno = ENOSYS; return False; } -static BOOL skel_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd) +static BOOL skel_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const + char *name, uint32 security_info_sent, SEC_DESC *psd) { errno = ENOSYS; return False; @@ -578,7 +602,7 @@ static vfs_op_tuple skel_op_tuples[] = { {SMB_VFS_OP(skel_fchown), SMB_VFS_OP_FCHOWN, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(skel_chdir), SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(skel_getwd), SMB_VFS_OP_GETWD, SMB_VFS_LAYER_OPAQUE}, - {SMB_VFS_OP(skel_utime), SMB_VFS_OP_UTIME, SMB_VFS_LAYER_OPAQUE}, + {SMB_VFS_OP(skel_ntimes), SMB_VFS_OP_NTIMES, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(skel_ftruncate), SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(skel_lock), SMB_VFS_OP_LOCK, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(skel_getlock), SMB_VFS_OP_GETLOCK, SMB_VFS_LAYER_OPAQUE}, @@ -587,6 +611,10 @@ static vfs_op_tuple skel_op_tuples[] = { {SMB_VFS_OP(skel_link), SMB_VFS_OP_LINK, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(skel_mknod), SMB_VFS_OP_MKNOD, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(skel_realpath), SMB_VFS_OP_REALPATH, SMB_VFS_LAYER_OPAQUE}, + {SMB_VFS_OP(skel_notify_watch), SMB_VFS_OP_NOTIFY_WATCH, SMB_VFS_LAYER_OPAQUE}, + {SMB_VFS_OP(skel_chflags), SMB_VFS_OP_CHFLAGS, SMB_VFS_LAYER_OPAQUE}, + + /* NT File ACL operations */ diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 2a379cd6d89..2efb3d54a78 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -210,9 +210,9 @@ static char *skel_getwd(vfs_handle_struct *handle, char *buf) return SMB_VFS_NEXT_GETWD(handle, buf); } -static int skel_utime(vfs_handle_struct *handle, const char *path, struct utimbuf *times) +static int skel_ntimes(vfs_handle_struct *handle, const char *path, const struct timespec ts[2]) { - return SMB_VFS_NEXT_UTIME(handle, path, times); + return SMB_VFS_NEXT_NTIMES(handle, path, ts); } static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T offset) @@ -255,22 +255,40 @@ static char *skel_realpath(vfs_handle_struct *handle, const char *path, char *r return SMB_VFS_NEXT_REALPATH(handle, path, resolved_path); } -static size_t skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info, struct security_descriptor_info **ppdesc) +static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle, + struct sys_notify_context *ctx, struct notify_entry *e, + void (*callback)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev), + void *private_data, void *handle_p) +{ + return SMB_VFS_NEXT_NOTIFY_WATCH(handle, ctx, e, callback, + private_data, handle_p); +} + +static int skel_chflags(vfs_handle_struct *handle, const char *path, uint flags) +{ + return SMB_VFS_NEXT_CHFLAGS(handle, path, flags); +} + +static size_t skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp, + int fd, uint32 security_info, SEC_DESC **ppdesc) { return SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, fd, security_info, ppdesc); } -static size_t skel_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info, struct security_descriptor_info **ppdesc) +static size_t skel_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp, + const char *name, uint32 security_info, SEC_DESC **ppdesc) { return SMB_VFS_NEXT_GET_NT_ACL(handle, fsp, name, security_info, ppdesc); } -static BOOL skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd) +static BOOL skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, + int fd, uint32 security_info_sent, SEC_DESC *psd) { return SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, fd, security_info_sent, psd); } -static BOOL skel_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd) +static BOOL skel_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, + const char *name, uint32 security_info_sent, SEC_DESC *psd) { return SMB_VFS_NEXT_SET_NT_ACL(handle, fsp, name, security_info_sent, psd); } @@ -545,7 +563,7 @@ static vfs_op_tuple skel_op_tuples[] = { {SMB_VFS_OP(skel_fchown), SMB_VFS_OP_FCHOWN, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(skel_chdir), SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(skel_getwd), SMB_VFS_OP_GETWD, SMB_VFS_LAYER_TRANSPARENT}, - {SMB_VFS_OP(skel_utime), SMB_VFS_OP_UTIME, SMB_VFS_LAYER_TRANSPARENT}, + {SMB_VFS_OP(skel_ntimes), SMB_VFS_OP_NTIMES, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(skel_ftruncate), SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(skel_lock), SMB_VFS_OP_LOCK, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(skel_getlock), SMB_VFS_OP_GETLOCK, SMB_VFS_LAYER_TRANSPARENT}, @@ -554,6 +572,8 @@ static vfs_op_tuple skel_op_tuples[] = { {SMB_VFS_OP(skel_link), SMB_VFS_OP_LINK, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(skel_mknod), SMB_VFS_OP_MKNOD, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(skel_realpath), SMB_VFS_OP_REALPATH, SMB_VFS_LAYER_TRANSPARENT}, + {SMB_VFS_OP(skel_notify_watch), SMB_VFS_OP_NOTIFY_WATCH, SMB_VFS_LAYER_TRANSPARENT}, + {SMB_VFS_OP(skel_chflags), SMB_VFS_OP_CHFLAGS, SMB_VFS_LAYER_TRANSPARENT}, /* NT File ACL operations */ |