[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Tue Nov 3 14:11:04 MST 2009


The branch, master has been updated
       via  074ad24... s4-smbtorture: simplify some torture_comments in RPC-LSA.
       via  463b1eb... s3-passdb: cleanup some callers of pdb_get_trusteddom_pw().
      from  31ce8ee... Fix debug statements to use correct function name. Jeremy.

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


- Log -----------------------------------------------------------------
commit 074ad24653e85c60b9af863ac526832229754a96
Author: Günther Deschner <gd at samba.org>
Date:   Mon Nov 2 19:59:47 2009 +0100

    s4-smbtorture: simplify some torture_comments in RPC-LSA.
    
    Guenther

commit 463b1eb2b55ae85cfc9539c936375a989cde1076
Author: Günther Deschner <gd at samba.org>
Date:   Fri Oct 30 02:15:45 2009 +0100

    s3-passdb: cleanup some callers of pdb_get_trusteddom_pw().
    
    Guenther

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

Summary of changes:
 source3/auth/auth_domain.c      |    4 +---
 source3/winbindd/winbindd_ads.c |    4 +---
 source4/torture/rpc/lsa.c       |   26 ++++++--------------------
 3 files changed, 8 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 084d84c..c527360 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -447,8 +447,6 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte
 	NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
 	unsigned char trust_md4_password[16];
 	char *trust_password;
-	time_t last_change_time;
-	DOM_SID sid;
 	fstring dc_name;
 	struct sockaddr_storage dc_ss;
 
@@ -481,7 +479,7 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte
 	 */
 
 	if (!pdb_get_trusteddom_pw(user_info->domain, &trust_password,
-				   &sid, &last_change_time)) {
+				   NULL, NULL)) {
 		DEBUG(0, ("check_trustdomain_security: could not fetch trust "
 			  "account password for domain %s\n",
 			  user_info->domain));
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index 119e81d..b271671 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -84,10 +84,8 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
 	SAFE_FREE(ads->auth.realm);
 
 	if ( IS_DC ) {
-		DOM_SID sid;
-		time_t last_set_time;
 
-		if ( !pdb_get_trusteddom_pw( domain->name, &ads->auth.password, &sid, &last_set_time ) ) {
+		if ( !pdb_get_trusteddom_pw( domain->name, &ads->auth.password, NULL, NULL ) ) {
 			ads_destroy( &ads );
 			return NULL;
 		}
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 710f4c5..35a3b0a 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -2498,21 +2498,16 @@ static bool test_QueryInfoPolicyCalls(	bool version2,
 	NTSTATUS status;
 	int i;
 	bool ret = true;
+	const char *call = talloc_asprintf(tctx, "QueryInfoPolicy%s", version2 ? "2":"");
 
-	if (version2)
-		torture_comment(tctx, "\nTesting QueryInfoPolicy2\n");
-	else
-		torture_comment(tctx, "\nTesting QueryInfoPolicy\n");
+	torture_comment(tctx, "\nTesting %s\n", call);
 
 	for (i=1;i<=14;i++) {
 		r.in.handle = handle;
 		r.in.level = i;
 		r.out.info = &info;
 
-		if (version2)
-			torture_comment(tctx, "\nTrying QueryInfoPolicy2 level %d\n", i);
-		else
-			torture_comment(tctx, "\nTrying QueryInfoPolicy level %d\n", i);
+		torture_comment(tctx, "\nTrying %s level %d\n", call, i);
 
 		if (version2)
 			/* We can perform the cast, because both types are
@@ -2543,10 +2538,7 @@ static bool test_QueryInfoPolicyCalls(	bool version2,
 		case LSA_POLICY_INFO_AUDIT_EVENTS:
 		case LSA_POLICY_INFO_PD:
 			if (!NT_STATUS_IS_OK(status)) {
-				if (version2)
-					torture_comment(tctx, "QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
-				else
-					torture_comment(tctx, "QueryInfoPolicy failed - %s\n", nt_errstr(status));
+				torture_comment(tctx, "%s failed - %s\n", call, nt_errstr(status));
 				ret = false;
 			}
 			break;
@@ -2554,17 +2546,11 @@ static bool test_QueryInfoPolicyCalls(	bool version2,
 			if (torture_setting_bool(tctx, "samba4", false)) {
 				/* Other levels not implemented yet */
 				if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) {
-					if (version2)
-						torture_comment(tctx, "QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
-					else
-						torture_comment(tctx, "QueryInfoPolicy failed - %s\n", nt_errstr(status));
+					torture_comment(tctx, "%s failed - %s\n", call, nt_errstr(status));
 					ret = false;
 				}
 			} else if (!NT_STATUS_IS_OK(status)) {
-				if (version2)
-					torture_comment(tctx, "QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
-				else
-					torture_comment(tctx, "QueryInfoPolicy failed - %s\n", nt_errstr(status));
+				torture_comment(tctx, "%s failed - %s\n", call, nt_errstr(status));
 				ret = false;
 			}
 			break;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list