[SCM] Samba Shared Repository - branch v3-5-test updated

Jeremy Allison jra at samba.org
Tue Dec 1 15:49:43 MST 2009


The branch, v3-5-test has been updated
       via  d09fd7e... Ensure we don't see the xattr used to store NT security (visible when xattr_tdb is used). Allows make test to pass with acl_xattr.so prepended to the vfs modules. Jeremy. (cherry picked from commit 8dda4cea660639190c1c7e84355186d07a6e064f)
       via  81e22af... s3: Fix smbd to correctly return INVALID_LEVEL on set_file_end_of_file_info for paths
      from  86de664... s3:build: fix detection of CTDB headers on systems without system-libtalloc

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


- Log -----------------------------------------------------------------
commit d09fd7e6039fad1ec2c7e1a3730ef304eab308d5
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Dec 1 14:08:16 2009 -0800

    Ensure we don't see the xattr used to store NT security (visible when xattr_tdb
    is used). Allows make test to pass with acl_xattr.so prepended to the vfs modules.
    Jeremy.
    (cherry picked from commit 8dda4cea660639190c1c7e84355186d07a6e064f)

commit 81e22afd9e4cb7b26cdb95b5dfdaf5dac877e147
Author: Tim Prouty <tprouty at samba.org>
Date:   Tue Dec 1 10:47:08 2009 -0800

    s3: Fix smbd to correctly return INVALID_LEVEL on set_file_end_of_file_info for paths
    
    This allows smbd to pass the freshly updated RAW-SFILEINFO-END-OF-FILE
    torture test.
    (cherry picked from commit ae649782df6e22c8e1922aaa03c248e5af68a036)

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

Summary of changes:
 source3/include/smb.h |    2 --
 source3/smbd/trans2.c |   33 +++++++++++++++++++++++++++------
 2 files changed, 27 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index 0968984..4affd4a 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1895,8 +1895,6 @@ struct ea_list {
 #define SAMBA_XATTR_DOS_ATTRIB "user.DOSATTRIB"
 /* Prefix for DosStreams in the vfs_streams_xattr module */
 #define SAMBA_XATTR_DOSSTREAM_PREFIX "user.DosStream."
-/* Prefix for DOS timestamps. */
-#define SAMBA_XATTR_DOSTIMESTAMPS "user.DosTimestamps"
 /* Prefix for xattrs storing streams. */
 #define SAMBA_XATTR_MARKER "user.SAMBA_STREAMS"
 
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 17ebd81..3b4a4b7 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -70,8 +70,8 @@ static bool samba_private_attr_name(const char *unix_ea_name)
 	static const char * const prohibited_ea_names[] = {
 		SAMBA_POSIX_INHERITANCE_EA_NAME,
 		SAMBA_XATTR_DOS_ATTRIB,
-		SAMBA_XATTR_DOSTIMESTAMPS,
 		SAMBA_XATTR_MARKER,
+		XATTR_NTACL_NAME,
 		NULL
 	};
 
@@ -5538,7 +5538,8 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
 				  files_struct *fsp,
 				  const struct smb_filename *smb_fname,
 				  const SMB_STRUCT_STAT *psbuf,
-				  SMB_OFF_T size)
+				  SMB_OFF_T size,
+				  bool fail_after_createfile)
 {
 	NTSTATUS status = NT_STATUS_OK;
 	struct smb_filename *smb_fname_tmp = NULL;
@@ -5598,6 +5599,12 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
 		return status;
 	}
 
+	/* See RAW-SFILEINFO-END-OF-FILE */
+	if (fail_after_createfile) {
+		close_file(req, new_fsp,NORMAL_CLOSE);
+		return NT_STATUS_INVALID_LEVEL;
+	}
+
 	if (vfs_set_filelen(new_fsp, size) == -1) {
 		status = map_nt_error_from_unix(errno);
 		close_file(req, new_fsp,NORMAL_CLOSE);
@@ -6474,7 +6481,8 @@ static NTSTATUS smb_set_file_end_of_file_info(connection_struct *conn,
 					const char *pdata,
 					int total_data,
 					files_struct *fsp,
-					const struct smb_filename *smb_fname)
+					const struct smb_filename *smb_fname,
+					bool fail_after_createfile)
 {
 	SMB_OFF_T size;
 
@@ -6499,7 +6507,8 @@ static NTSTATUS smb_set_file_end_of_file_info(connection_struct *conn,
 				fsp,
 				smb_fname,
 				&smb_fname->st,
-				size);
+				size,
+				fail_after_createfile);
 }
 
 /****************************************************************************
@@ -6785,7 +6794,8 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
 				   fsp,
 				   smb_fname,
 				   &sbuf,
-				   size);
+				   size,
+				   false);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}
@@ -7381,11 +7391,22 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
 		case SMB_FILE_END_OF_FILE_INFORMATION:
 		case SMB_SET_FILE_END_OF_FILE_INFO:
 		{
+			/*
+			 * XP/Win7 both fail after the createfile with
+			 * SMB_SET_FILE_END_OF_FILE_INFO but not
+			 * SMB_FILE_END_OF_FILE_INFORMATION (pass-through).
+			 * The level is known here, so pass it down
+			 * appropriately.
+			 */
+			bool should_fail =
+			    (info_level == SMB_SET_FILE_END_OF_FILE_INFO);
+
 			status = smb_set_file_end_of_file_info(conn, req,
 								pdata,
 								total_data,
 								fsp,
-								smb_fname);
+								smb_fname,
+								should_fail);
 			break;
 		}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list