[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed Jul 18 01:13:02 UTC 2018


The branch, master has been updated
       via  7b0c1f8 dsdb: Fix the 32-bit build
       via  2e65a12 kcc: Fix the 32-bit build
       via  e60e936 s3: smbd: fix path check in smbd_smb2_create_durable_lease_check()
       via  7253197 s4: torture: run test_durable_v2_open_reopen2_lease() in a subdirectory
      from  ba991da tevent: fix CID 1437974 dereference after null check

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


- Log -----------------------------------------------------------------
commit 7b0c1f8f19c52e97dc987d16cc438eecf6cb830f
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jul 13 16:31:21 2018 +0200

    dsdb: Fix the 32-bit build
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Jul 18 03:12:02 CEST 2018 on sn-devel-144

commit 2e65a1262a23c200fdbc0bc6ef90eb116e3068a8
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jul 13 16:31:07 2018 +0200

    kcc: Fix the 32-bit build
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e60e9368cb3cb512e2506620d814187a692108e0
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Jul 17 15:40:04 2018 +0200

    s3: smbd: fix path check in smbd_smb2_create_durable_lease_check()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13535
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 725319743f1f2de934cbde477ca84430f5b2b4b4
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Jul 17 15:56:05 2018 +0200

    s4: torture: run test_durable_v2_open_reopen2_lease() in a subdirectory
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13535
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 source3/smbd/smb2_create.c                 | 16 +++++++++++++++-
 source4/dsdb/kcc/scavenge_dns_records.c    |  2 +-
 source4/dsdb/samdb/ldb_modules/audit_log.c |  4 ++--
 source4/torture/smb2/durable_v2_open.c     | 11 +++++++++--
 4 files changed, 27 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 8fbea23..7f80f6f 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -381,6 +381,7 @@ static NTSTATUS smbd_smb2_create_durable_lease_check(struct smb_request *smb1req
 	const char *requested_filename, const struct files_struct *fsp,
 	const struct smb2_lease *lease_ptr)
 {
+	char *filename = NULL;
 	struct smb_filename *smb_fname = NULL;
 	uint32_t ucf_flags;
 	NTSTATUS status;
@@ -407,10 +408,23 @@ static NTSTATUS smbd_smb2_create_durable_lease_check(struct smb_request *smb1req
 		return NT_STATUS_OBJECT_NAME_NOT_FOUND;
 	}
 
+	filename = talloc_strdup(talloc_tos(), requested_filename);
+	if (filename == NULL) {
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	/* This also converts '\' to '/' */
+	status = check_path_syntax(filename);
+	if (!NT_STATUS_IS_OK(status)) {
+		TALLOC_FREE(filename);
+		return status;
+	}
+
 	ucf_flags = filename_create_ucf_flags(smb1req, FILE_OPEN);
 	status = filename_convert(talloc_tos(), fsp->conn,
-				  requested_filename, ucf_flags,
+				  filename, ucf_flags,
 				  NULL, &smb_fname);
+	TALLOC_FREE(filename);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(10, ("filename_convert returned %s\n",
 			   nt_errstr(status)));
diff --git a/source4/dsdb/kcc/scavenge_dns_records.c b/source4/dsdb/kcc/scavenge_dns_records.c
index 2f4f482..6c0684b 100644
--- a/source4/dsdb/kcc/scavenge_dns_records.c
+++ b/source4/dsdb/kcc/scavenge_dns_records.c
@@ -164,7 +164,7 @@ NTSTATUS dns_tombstone_records_zone(TALLOC_CTX *mem_ctx,
 			 "(&(objectClass=dnsNode)"
 			 "(&(!(dnsTombstoned=TRUE))"
 			 "(dnsRecord:" DSDB_MATCH_FOR_DNS_TO_TOMBSTONE_TIME
-			 ":=%lu)))",
+			 ":=%"PRIu64")))",
 			 t);
 	if (ret != LDB_SUCCESS) {
 		*error_string = talloc_asprintf(mem_ctx,
diff --git a/source4/dsdb/samdb/ldb_modules/audit_log.c b/source4/dsdb/samdb/ldb_modules/audit_log.c
index 581f2f2..800f8e8 100644
--- a/source4/dsdb/samdb/ldb_modules/audit_log.c
+++ b/source4/dsdb/samdb/ldb_modules/audit_log.c
@@ -754,7 +754,7 @@ static char *transaction_human_readable(
 
 	log_entry = talloc_asprintf(
 		mem_ctx,
-		"[%s] at [%s] duration [%ld]",
+		"[%s] at [%s] duration [%"PRIi64"]",
 		action,
 		timestamp,
 		duration);
@@ -791,7 +791,7 @@ static char *commit_failure_human_readable(
 
 	log_entry = talloc_asprintf(
 		mem_ctx,
-		"[%s] at [%s] duration [%ld] status [%d] reason [%s]",
+		"[%s] at [%s] duration [%"PRIi64"] status [%d] reason [%s]",
 		action,
 		timestamp,
 		duration,
diff --git a/source4/torture/smb2/durable_v2_open.c b/source4/torture/smb2/durable_v2_open.c
index 3a0e070..0a928ec 100644
--- a/source4/torture/smb2/durable_v2_open.c
+++ b/source4/torture/smb2/durable_v2_open.c
@@ -1518,9 +1518,15 @@ bool test_durable_v2_open_reopen2_lease_v2(struct torture_context *tctx,
 
 	options = tree->session->transport->options;
 
+	smb2_deltree(tree, __func__);
+	status = torture_smb2_testdir(tree, __func__, &_h);
+	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+					"torture_smb2_testdir failed\n");
+	smb2_util_close(tree, _h);
+
 	/* Choose a random name in case the state is left a little funky. */
-	snprintf(fname, 256, "durable_v2_open_reopen2_%s.dat",
-		 generate_random_str(tctx, 8));
+	snprintf(fname, 256, "%s\\durable_v2_open_reopen2_%s.dat",
+		 __func__, generate_random_str(tctx, 8));
 
 	smb2_util_unlink(tree, fname);
 
@@ -1726,6 +1732,7 @@ done:
 	}
 
 	smb2_util_unlink(tree, fname);
+	smb2_deltree(tree, __func__);
 
 	talloc_free(tree);
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list