summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-07 09:04:03 +0200
committerVolker Lendecke <vl@samba.org>2008-06-07 09:04:03 +0200
commitd1e0c7f0c1a62030e08fd3ae00ec8ed07c79aa72 (patch)
tree58f8476a0a07cf4aa03027db7b074e3484593afa
parent0e7d1aae2f4767d3744aeb1eab15ed793e71db74 (diff)
downloadsamba-d1e0c7f0c1a62030e08fd3ae00ec8ed07c79aa72.tar.gz
samba-d1e0c7f0c1a62030e08fd3ae00ec8ed07c79aa72.tar.bz2
samba-d1e0c7f0c1a62030e08fd3ae00ec8ed07c79aa72.zip
Add STREAMINFO op to vfs_full_audit
Fix Coverity ID 552 and 553 (This used to be commit c46e10d2605b22d31675976e62e5ae61d73c8a0a)
-rw-r--r--source3/include/vfs_macros.h2
-rw-r--r--source3/modules/vfs_full_audit.c27
2 files changed, 28 insertions, 1 deletions
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index bb3aeba77b..db789572a4 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -334,7 +334,7 @@
#define SMB_VFS_NEXT_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs_next.ops.notify_watch((conn)->vfs_next.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p)))
#define SMB_VFS_NEXT_CHFLAGS(handle, path, flags) ((handle)->vfs_next.ops.chflags((handle)->vfs_next.handles.chflags, (path), (flags)))
#define SMB_VFS_NEXT_FILE_ID_CREATE(handle, dev, inode) ((handle)->vfs_next.ops.file_id_create((handle)->vfs_next.handles.file_id_create, (dev), (inode)))
-#define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) ((handle)->vfs.ops.streaminfo((handle)->vfs.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
+#define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) ((handle)->vfs_next.ops.streaminfo((handle)->vfs_next.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
/* NT ACL operations. */
#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) ((handle)->vfs_next.ops.fget_nt_acl((handle)->vfs_next.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 8718dbd886..3005de3829 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -188,6 +188,12 @@ static int smb_full_audit_chflags(vfs_handle_struct *handle,
const char *path, unsigned int flags);
static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *handle,
SMB_DEV_T dev, SMB_INO_T inode);
+static NTSTATUS smb_full_audit_streaminfo(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *pnum_streams,
+ struct stream_struct **pstreams);
static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32 security_info,
SEC_DESC **ppdesc);
@@ -417,6 +423,8 @@ static vfs_op_tuple audit_op_tuples[] = {
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_streaminfo), SMB_VFS_OP_STREAMINFO,
+ SMB_VFS_LAYER_LOGGER},
/* NT ACL operations. */
@@ -583,6 +591,7 @@ static struct {
{ SMB_VFS_OP_NOTIFY_WATCH, "notify_watch" },
{ SMB_VFS_OP_CHFLAGS, "chflags" },
{ SMB_VFS_OP_FILE_ID_CREATE, "file_id_create" },
+ { SMB_VFS_OP_STREAMINFO, "streaminfo" },
{ SMB_VFS_OP_FGET_NT_ACL, "fget_nt_acl" },
{ SMB_VFS_OP_GET_NT_ACL, "get_nt_acl" },
{ SMB_VFS_OP_FSET_NT_ACL, "fset_nt_acl" },
@@ -1523,6 +1532,24 @@ static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *ha
return result;
}
+static NTSTATUS smb_full_audit_streaminfo(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *pnum_streams,
+ struct stream_struct **pstreams)
+{
+ NTSTATUS result;
+
+ result = SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx,
+ pnum_streams, pstreams);
+
+ do_log(SMB_VFS_OP_STREAMINFO, NT_STATUS_IS_OK(result), handle,
+ "%s", fname);
+
+ return result;
+}
+
static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32 security_info,
SEC_DESC **ppdesc)