[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Fri Jun 22 11:28:01 MDT 2012


The branch, master has been updated
       via  e7b5814 s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
       via  b9a15f1 s3: Give machine password changes 10 minutes of time
       via  51b30c6 s3:torture:smb2: pass smb2-session-reconnect test (add generosity in error case)
      from  4676e7f dbwrap: don't ignore the result of dbwrap_parse_record in dbwrap_fetch_int32()

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


- Log -----------------------------------------------------------------
commit e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jun 22 15:46:13 2012 +0200

    s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
    
    gpfs2smb_acl can leave errno!=0 around even if it returned a correct
    result!=NULL. We can only rely on errno being set if another error
    condition (in this case result==NULL) indicates an error. If
    result!=NULL, errno is undefined and can be anything. This leads to
    SAFE_FREE(result) further down even in the success case.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104

commit b9a15f1bfad30a824f9ec87bc9f7c65adf50dae0
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jun 22 14:26:45 2012 +0200

    s3: Give machine password changes 10 minutes of time
    
    This is what we do at domain join time as well, see
    lib/netapi/joindomain.c:141
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 51b30c61f4cfc257b4a3938363041214a4106907
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 18 17:55:51 2012 +0200

    s3:torture:smb2: pass smb2-session-reconnect test (add generosity in error case)
    
    samba checks tree before file, so we get a
    STATUS_NETWORK_NAME_DELETED instead STATUS_FILE_CLOSED
    when operating on a file handle on a invalid tree id.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

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

Summary of changes:
 source3/modules/vfs_gpfs.c        |    4 ++--
 source3/rpc_client/cli_netlogon.c |   13 +++++++++++++
 source3/torture/test_smb2.c       |   28 +++++++++++++++++++++-------
 3 files changed, 36 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index d4009c4..a165cfa 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -641,8 +641,8 @@ static SMB_ACL_T gpfsacl_get_posix_acl(const char *path, gpfs_aclType_t type)
 		   pacl->acl_nace));
 
 	result = gpfs2smb_acl(pacl);
-	if (result == NULL) {
-		goto done;
+	if (result != NULL) {
+		errno = 0;
 	}
 
  done:
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 3c685fd..bbcca06 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -625,11 +625,14 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
 	if (cli->dc->negotiate_flags & NETLOGON_NEG_PASSWORD_SET2) {
 
 		struct netr_CryptPassword new_password;
+		uint32_t old_timeout;
 
 		init_netr_CryptPassword(new_trust_pwd_cleartext,
 					cli->dc->session_key,
 					&new_password);
 
+		old_timeout = dcerpc_binding_handle_set_timeout(b, 600000);
+
 		status = dcerpc_netr_ServerPasswordSet2(b, mem_ctx,
 							cli->srv_name_slash,
 							cli->dc->account_name,
@@ -639,6 +642,9 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
 							&srv_cred,
 							&new_password,
 							&result);
+
+		dcerpc_binding_handle_set_timeout(b, old_timeout);
+
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(0,("dcerpc_netr_ServerPasswordSet2 failed: %s\n",
 				nt_errstr(status)));
@@ -647,9 +653,13 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
 	} else {
 
 		struct samr_Password new_password;
+		uint32_t old_timeout;
+
 		memcpy(new_password.hash, new_trust_passwd_hash, sizeof(new_password.hash));
 		netlogon_creds_des_encrypt(cli->dc, &new_password);
 
+		old_timeout = dcerpc_binding_handle_set_timeout(b, 600000);
+
 		status = dcerpc_netr_ServerPasswordSet(b, mem_ctx,
 						       cli->srv_name_slash,
 						       cli->dc->account_name,
@@ -659,6 +669,9 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
 						       &srv_cred,
 						       &new_password,
 						       &result);
+
+		dcerpc_binding_handle_set_timeout(b, old_timeout);
+
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(0,("dcerpc_netr_ServerPasswordSet failed: %s\n",
 				nt_errstr(status)));
diff --git a/source3/torture/test_smb2.c b/source3/torture/test_smb2.c
index 8aff588..af0e156 100644
--- a/source3/torture/test_smb2.c
+++ b/source3/torture/test_smb2.c
@@ -529,7 +529,9 @@ bool run_smb2_session_reconnect(int dummy)
 	 */
 	status = smb2cli_flush(cli2->conn, cli2->timeout, cli2->smb2.session,
 			       cli2->smb2.tid, fid_persistent, fid_volatile);
-	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) {
+	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED))
+	{
 		printf("smb2cli_flush returned %s\n", nt_errstr(status));
 		return false;
 	}
@@ -537,7 +539,9 @@ bool run_smb2_session_reconnect(int dummy)
 	status = smb2cli_write(cli2->conn, cli2->timeout, cli2->smb2.session,
 			       cli2->smb2.tid, strlen(hello), 0, fid_persistent,
 			       fid_volatile, 0, 0, (const uint8_t *)hello);
-	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) {
+	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED))
+	{
 		printf("smb2cli_write returned %s\n", nt_errstr(status));
 		return false;
 	}
@@ -546,7 +550,9 @@ bool run_smb2_session_reconnect(int dummy)
 			      cli2->smb2.tid, 0x10000, 0, fid_persistent,
 			      fid_volatile, 2, 0,
 			      talloc_tos(), &result, &nread);
-	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) {
+	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED))
+	{
 		printf("smb2cli_read returned %s\n", nt_errstr(status));
 		return false;
 	}
@@ -585,7 +591,9 @@ bool run_smb2_session_reconnect(int dummy)
 
 	status = smb2cli_flush(cli2->conn, cli2->timeout, cli2->smb2.session,
 			       cli2->smb2.tid, fid_persistent, fid_volatile);
-	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) {
+	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED))
+	{
 		printf("smb2cli_flush returned %s\n", nt_errstr(status));
 		return false;
 	}
@@ -593,7 +601,9 @@ bool run_smb2_session_reconnect(int dummy)
 	status = smb2cli_write(cli2->conn, cli2->timeout, cli2->smb2.session,
 			       cli2->smb2.tid, strlen(hello), 0, fid_persistent,
 			       fid_volatile, 0, 0, (const uint8_t *)hello);
-	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) {
+	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED))
+	{
 		printf("smb2cli_write returned %s\n", nt_errstr(status));
 		return false;
 	}
@@ -602,7 +612,9 @@ bool run_smb2_session_reconnect(int dummy)
 			      cli2->smb2.tid, 0x10000, 0, fid_persistent,
 			      fid_volatile, 2, 0,
 			      talloc_tos(), &result, &nread);
-	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) {
+	if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED))
+	{
 		printf("smb2cli_read returned %s\n", nt_errstr(status));
 		return false;
 	}
@@ -619,7 +631,9 @@ bool run_smb2_session_reconnect(int dummy)
 			NULL, /* smb2_create_blobs *blobs */
 			&fid_persistent,
 			&fid_volatile);
-	if (!NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED)) {
+	if (!NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED))
+	{
 		printf("smb2cli_create on cli2 %s\n", nt_errstr(status));
 		return false;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list