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

Jeremy Allison jra at samba.org
Wed Feb 25 02:03:23 GMT 2009


The branch, v3-2-test has been updated
       via  73d0c3143eedb5a9fd4d154aaf42d20ba6a19a1f (commit)
      from  5e6b019d70fef2ad082fc414053c131294bdeb49 (commit)

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


- Log -----------------------------------------------------------------
commit 73d0c3143eedb5a9fd4d154aaf42d20ba6a19a1f
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Feb 24 17:59:19 2009 -0800

    Allow set attributes on a stream fnum to be redirected to the base filename.
    Fixes the new RAW-STREAMS torture test.
    Jeremy.

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

Summary of changes:
 source/smbd/trans2.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index a196802..31fd18d 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -4952,6 +4952,7 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
 ****************************************************************************/
 
 static NTSTATUS smb_set_file_dosmode(connection_struct *conn,
+				files_struct *fsp,
 				const char *fname,
 				SMB_STRUCT_STAT *psbuf,
 				uint32 dosmode)
@@ -4960,6 +4961,14 @@ static NTSTATUS smb_set_file_dosmode(connection_struct *conn,
 		return NT_STATUS_OBJECT_NAME_NOT_FOUND;
 	}
 
+	if (fsp) {
+		if (fsp->base_fsp) {
+			fname = fsp->base_fsp->fsp_name;
+		} else {
+			fname = fsp->fsp_name;
+		}
+	}
+		
 	if (dosmode) {
 		if (S_ISDIR(psbuf->st_mode)) {
 			dosmode |= aDIR;
@@ -5684,9 +5693,11 @@ static NTSTATUS smb_set_file_basic_info(connection_struct *conn,
 	/* Set the attributes */
 	dosmode = IVAL(pdata,32);
 	status = smb_set_file_dosmode(conn,
-					fname,
-					psbuf,
-					dosmode);
+				fsp,
+				fname,
+				psbuf,
+				dosmode);
+
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list