[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1177-gebe1aa9

Jeremy Allison jra at samba.org
Wed Feb 25 02:04:45 GMT 2009


The branch, master has been updated
       via  ebe1aa9340d190b2ebcfd2c96f68c7771cccdf01 (commit)
      from  f68c09110776c1cdeb83d16a660081e6be0c89ed (commit)

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


- Log -----------------------------------------------------------------
commit ebe1aa9340d190b2ebcfd2c96f68c7771cccdf01
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Feb 24 18:03:49 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:
 source3/smbd/trans2.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 759e520..433b8a0 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4972,6 +4972,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)
@@ -4980,6 +4981,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;
@@ -5723,12 +5732,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);
+	status = smb_set_file_dosmode(conn, fsp, fname, psbuf, dosmode);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}
 
-
 	/* access time */
 	ft.atime = interpret_long_date(pdata+8);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list