[SCM] Samba Shared Repository - branch master updated - 6d4fd789f65ea770a33abfcba42665cf6a0efb10

Volker Lendecke vlendec at samba.org
Mon Jan 5 12:10:45 GMT 2009


The branch, master has been updated
       via  6d4fd789f65ea770a33abfcba42665cf6a0efb10 (commit)
       via  34d0cb4f1707d8a16ca95c6db7ead79bae3e280c (commit)
      from  5318e73e93295cbdd2e50c4291b58a317cb09ea6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6d4fd789f65ea770a33abfcba42665cf6a0efb10
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jan 5 13:08:07 2009 +0100

    Add create_file to vfs_op_names

commit 34d0cb4f1707d8a16ca95c6db7ead79bae3e280c
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jan 5 12:58:23 2009 +0100

    Fix bug 6012: Add "get_real_filename" to full_audit
    
    Thanks to Hodur <coil93 at gmail.com> for testing!
    
    Volker

-----------------------------------------------------------------------

Summary of changes:
 source3/include/vfs_macros.h     |    2 +-
 source3/modules/vfs_full_audit.c |   26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index b008d86..c6ccd49 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -340,7 +340,7 @@
 #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_next.ops.streaminfo((handle)->vfs_next.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
-#define SMB_VFS_NEXT_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name) ((conn)->vfs_next.ops.get_real_filename((conn)->vfs_next.handles.get_real_filename, (path), (name), (mem_ctx), (found_name)))
+#define SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name, mem_ctx, found_name) ((handle)->vfs_next.ops.get_real_filename((handle)->vfs_next.handles.get_real_filename, (path), (name), (mem_ctx), (found_name)))
 
 /* 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 7970bf2..e4bda09 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -211,6 +211,11 @@ static NTSTATUS smb_full_audit_streaminfo(vfs_handle_struct *handle,
 					  TALLOC_CTX *mem_ctx,
 					  unsigned int *pnum_streams,
 					  struct stream_struct **pstreams);
+static int smb_full_audit_get_real_filename(struct vfs_handle_struct *handle,
+					    const char *path,
+					    const char *name,
+					    TALLOC_CTX *mem_ctx,
+					    char **found_name);
 static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 				uint32 security_info,
 				SEC_DESC **ppdesc);
@@ -444,6 +449,8 @@ static vfs_op_tuple audit_op_tuples[] = {
 	 SMB_VFS_LAYER_LOGGER},
 	{SMB_VFS_OP(smb_full_audit_streaminfo),	SMB_VFS_OP_STREAMINFO,
 	 SMB_VFS_LAYER_LOGGER},
+	{SMB_VFS_OP(smb_full_audit_get_real_filename), SMB_VFS_OP_GET_REAL_FILENAME,
+	 SMB_VFS_LAYER_LOGGER},
 
 	/* NT ACL operations. */
 
@@ -576,6 +583,7 @@ static struct {
 	{ SMB_VFS_OP_RMDIR,	"rmdir" },
 	{ SMB_VFS_OP_CLOSEDIR,	"closedir" },
 	{ SMB_VFS_OP_OPEN,	"open" },
+	{ SMB_VFS_OP_CREATE_FILE, "create_file" },
 	{ SMB_VFS_OP_CLOSE,	"close" },
 	{ SMB_VFS_OP_READ,	"read" },
 	{ SMB_VFS_OP_PREAD,	"pread" },
@@ -612,6 +620,7 @@ static struct {
 	{ SMB_VFS_OP_CHFLAGS,	"chflags" },
 	{ SMB_VFS_OP_FILE_ID_CREATE,	"file_id_create" },
 	{ SMB_VFS_OP_STREAMINFO,	"streaminfo" },
+	{ SMB_VFS_OP_GET_REAL_FILENAME, "get_real_filename" },
 	{ 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" },
@@ -1615,6 +1624,23 @@ static NTSTATUS smb_full_audit_streaminfo(vfs_handle_struct *handle,
 	return result;
 }
 
+static int smb_full_audit_get_real_filename(struct vfs_handle_struct *handle,
+					    const char *path,
+					    const char *name,
+					    TALLOC_CTX *mem_ctx,
+					    char **found_name)
+{
+	int result;
+
+	result = SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name, mem_ctx,
+						found_name);
+
+	do_log(SMB_VFS_OP_GET_REAL_FILENAME, (result == 0), handle,
+	       "%s/%s->%s", path, name, (result == 0) ? "" : *found_name);
+
+	return result;
+}
+
 static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 				uint32 security_info,
 				SEC_DESC **ppdesc)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list