[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4575-g507f585

Jeremy Allison jra at samba.org
Mon Dec 1 22:08:54 GMT 2008


The branch, v3-3-test has been updated
       via  507f5853bc98a240307f429c369bf920e3f2f4a4 (commit)
      from  fe13b58addab1a685cd31c8f9c0341472f338071 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 507f5853bc98a240307f429c369bf920e3f2f4a4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:59:00 2008 -0800

    s3:streams_depot: map 'file::$DATA' to just 'file'
    
    metze

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

Summary of changes:
 source/modules/vfs_streams_depot.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_depot.c b/source/modules/vfs_streams_depot.c
index e7eceda..ccb0a2e 100644
--- a/source/modules/vfs_streams_depot.c
+++ b/source/modules/vfs_streams_depot.c
@@ -270,6 +270,11 @@ static char *stream_name(vfs_handle_struct *handle, const char *fname,
 		goto fail;
 	}
 
+	/* if it's the ::$DATA stream just return the base file name */
+	if (!sname) {
+		return base;
+	}
+
 	dirname = stream_dir(handle, base, NULL, create_dir);
 
 	if (dirname == NULL) {
@@ -409,6 +414,7 @@ static int streams_depot_open(vfs_handle_struct *handle,  const char *fname,
 {
 	TALLOC_CTX *frame;
 	char *base = NULL;
+	char *sname = NULL;
 	SMB_STRUCT_STAT base_sbuf;
 	char *stream_fname;
 	int ret = -1;
@@ -420,11 +426,16 @@ static int streams_depot_open(vfs_handle_struct *handle,  const char *fname,
 	frame = talloc_stackframe();
 
 	if (!NT_STATUS_IS_OK(split_ntfs_stream_name(talloc_tos(), fname,
-						    &base, NULL))) {
+						    &base, &sname))) {
 		errno = ENOMEM;
 		goto done;
 	}
 
+	if (!sname) {
+		ret = SMB_VFS_NEXT_OPEN(handle, base, fsp, flags, mode);
+		goto done;
+	}
+
 	ret = SMB_VFS_NEXT_STAT(handle, base, &base_sbuf);
 
 	if (ret == -1) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list