svn commit: samba r15132 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

vlendec at samba.org vlendec at samba.org
Wed Apr 19 13:14:15 GMT 2006


Author: vlendec
Date: 2006-04-19 13:14:14 +0000 (Wed, 19 Apr 2006)
New Revision: 15132

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15132

Log:
Fix some shadowed variable warnings
Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_reconnect.c
   trunk/source/nsswitch/winbindd_cache.c
   trunk/source/nsswitch/winbindd_reconnect.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2006-04-19 03:06:50 UTC (rev 15131)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2006-04-19 13:14:14 UTC (rev 15132)
@@ -774,7 +774,7 @@
 	centry_free(centry);
 }
 
-static void wcache_save_password_policy(struct winbindd_domain *domain, NTSTATUS status, SAM_UNK_INFO_1 *password_policy)
+static void wcache_save_password_policy(struct winbindd_domain *domain, NTSTATUS status, SAM_UNK_INFO_1 *policy)
 {
 	struct cache_entry *centry;
 
@@ -782,11 +782,11 @@
 	if (!centry)
 		return;
 
-	centry_put_uint16(centry, password_policy->min_length_password);
-	centry_put_uint16(centry, password_policy->password_history);
-	centry_put_uint32(centry, password_policy->password_properties);
-	centry_put_nttime(centry, password_policy->expire);
-	centry_put_nttime(centry, password_policy->min_passwordage);
+	centry_put_uint16(centry, policy->min_length_password);
+	centry_put_uint16(centry, policy->password_history);
+	centry_put_uint32(centry, policy->password_properties);
+	centry_put_nttime(centry, policy->expire);
+	centry_put_nttime(centry, policy->min_passwordage);
 
 	centry_end(centry, "PWD_POL/%s", domain->name);
 	
@@ -1735,7 +1735,7 @@
 /* get lockout policy */
 static NTSTATUS lockout_policy(struct winbindd_domain *domain,
  			       TALLOC_CTX *mem_ctx,
-			       SAM_UNK_INFO_12 *lockout_policy){
+			       SAM_UNK_INFO_12 *policy){
  	struct winbind_cache *cache = get_cache(domain);
  	struct cache_entry *centry = NULL;
  	NTSTATUS status;
@@ -1748,9 +1748,9 @@
 	if (!centry)
  		goto do_query;
  
-	lockout_policy->duration = centry_nttime(centry);
-	lockout_policy->reset_count = centry_nttime(centry);
-	lockout_policy->bad_attempt_lockout = centry_uint16(centry);
+	policy->duration = centry_nttime(centry);
+	policy->reset_count = centry_nttime(centry);
+	policy->bad_attempt_lockout = centry_uint16(centry);
  
  	status = centry->status;
  
@@ -1761,7 +1761,7 @@
  	return status;
  
 do_query:
-	ZERO_STRUCTP(lockout_policy);
+	ZERO_STRUCTP(policy);
  
 	/* Return status value returned by seq number check */
 
@@ -1771,11 +1771,11 @@
 	DEBUG(10,("lockout_policy: [Cached] - doing backend query for info for domain %s\n",
 		domain->name ));
  
-	status = domain->backend->lockout_policy(domain, mem_ctx, lockout_policy); 
+	status = domain->backend->lockout_policy(domain, mem_ctx, policy); 
  
 	/* and save it */
  	refresh_sequence_number(domain, False);
-	wcache_save_lockout_policy(domain, status, lockout_policy);
+	wcache_save_lockout_policy(domain, status, policy);
  
  	return status;
 }
@@ -1783,7 +1783,7 @@
 /* get password policy */
 static NTSTATUS password_policy(struct winbindd_domain *domain,
 				TALLOC_CTX *mem_ctx,
-				SAM_UNK_INFO_1 *password_policy)
+				SAM_UNK_INFO_1 *policy)
 {
 	struct winbind_cache *cache = get_cache(domain);
 	struct cache_entry *centry = NULL;
@@ -1797,11 +1797,11 @@
 	if (!centry)
 		goto do_query;
 
-	password_policy->min_length_password = centry_uint16(centry);
-	password_policy->password_history = centry_uint16(centry);
-	password_policy->password_properties = centry_uint32(centry);
-	password_policy->expire = centry_nttime(centry);
-	password_policy->min_passwordage = centry_nttime(centry);
+	policy->min_length_password = centry_uint16(centry);
+	policy->password_history = centry_uint16(centry);
+	policy->password_properties = centry_uint32(centry);
+	policy->expire = centry_nttime(centry);
+	policy->min_passwordage = centry_nttime(centry);
 
 	status = centry->status;
 
@@ -1812,7 +1812,7 @@
 	return status;
 
 do_query:
-	ZERO_STRUCTP(password_policy);
+	ZERO_STRUCTP(policy);
 
 	/* Return status value returned by seq number check */
 
@@ -1822,11 +1822,11 @@
 	DEBUG(10,("password_policy: [Cached] - doing backend query for info for domain %s\n",
 		domain->name ));
 
-	status = domain->backend->password_policy(domain, mem_ctx, password_policy); 
+	status = domain->backend->password_policy(domain, mem_ctx, policy); 
 
 	/* and save it */
 	refresh_sequence_number(domain, False);
-	wcache_save_password_policy(domain, status, password_policy);
+	wcache_save_password_policy(domain, status, policy);
 
 	return status;
 }

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_reconnect.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_reconnect.c	2006-04-19 03:06:50 UTC (rev 15131)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_reconnect.c	2006-04-19 13:14:14 UTC (rev 15132)
@@ -223,14 +223,14 @@
 /* find the lockout policy of a domain */
 static NTSTATUS lockout_policy(struct winbindd_domain *domain, 
 			       TALLOC_CTX *mem_ctx,
-			       SAM_UNK_INFO_12 *lockout_policy)
+			       SAM_UNK_INFO_12 *policy)
 {
 	NTSTATUS result;
 
-	result = msrpc_methods.lockout_policy(domain, mem_ctx, lockout_policy);
+	result = msrpc_methods.lockout_policy(domain, mem_ctx, policy);
 
 	if (NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL))
-		result = msrpc_methods.lockout_policy(domain, mem_ctx, lockout_policy);
+		result = msrpc_methods.lockout_policy(domain, mem_ctx, policy);
 
 	return result;
 }
@@ -238,14 +238,14 @@
 /* find the password policy of a domain */
 static NTSTATUS password_policy(struct winbindd_domain *domain, 
 				TALLOC_CTX *mem_ctx,
-				SAM_UNK_INFO_1 *password_policy)
+				SAM_UNK_INFO_1 *policy)
 {
  	NTSTATUS result;
  
-	result = msrpc_methods.password_policy(domain, mem_ctx, password_policy);
+	result = msrpc_methods.password_policy(domain, mem_ctx, policy);
 
 	if (NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL))
-		result = msrpc_methods.password_policy(domain, mem_ctx, password_policy);
+		result = msrpc_methods.password_policy(domain, mem_ctx, policy);
 	
 	return result;
 }

Modified: trunk/source/nsswitch/winbindd_cache.c
===================================================================
--- trunk/source/nsswitch/winbindd_cache.c	2006-04-19 03:06:50 UTC (rev 15131)
+++ trunk/source/nsswitch/winbindd_cache.c	2006-04-19 13:14:14 UTC (rev 15132)
@@ -774,7 +774,7 @@
 	centry_free(centry);
 }
 
-static void wcache_save_password_policy(struct winbindd_domain *domain, NTSTATUS status, SAM_UNK_INFO_1 *password_policy)
+static void wcache_save_password_policy(struct winbindd_domain *domain, NTSTATUS status, SAM_UNK_INFO_1 *policy)
 {
 	struct cache_entry *centry;
 
@@ -782,11 +782,11 @@
 	if (!centry)
 		return;
 
-	centry_put_uint16(centry, password_policy->min_length_password);
-	centry_put_uint16(centry, password_policy->password_history);
-	centry_put_uint32(centry, password_policy->password_properties);
-	centry_put_nttime(centry, password_policy->expire);
-	centry_put_nttime(centry, password_policy->min_passwordage);
+	centry_put_uint16(centry, policy->min_length_password);
+	centry_put_uint16(centry, policy->password_history);
+	centry_put_uint32(centry, policy->password_properties);
+	centry_put_nttime(centry, policy->expire);
+	centry_put_nttime(centry, policy->min_passwordage);
 
 	centry_end(centry, "PWD_POL/%s", domain->name);
 	
@@ -1857,7 +1857,7 @@
 /* get lockout policy */
 static NTSTATUS lockout_policy(struct winbindd_domain *domain,
  			       TALLOC_CTX *mem_ctx,
-			       SAM_UNK_INFO_12 *lockout_policy){
+			       SAM_UNK_INFO_12 *policy){
  	struct winbind_cache *cache = get_cache(domain);
  	struct cache_entry *centry = NULL;
  	NTSTATUS status;
@@ -1870,9 +1870,9 @@
 	if (!centry)
  		goto do_query;
  
-	lockout_policy->duration = centry_nttime(centry);
-	lockout_policy->reset_count = centry_nttime(centry);
-	lockout_policy->bad_attempt_lockout = centry_uint16(centry);
+	policy->duration = centry_nttime(centry);
+	policy->reset_count = centry_nttime(centry);
+	policy->bad_attempt_lockout = centry_uint16(centry);
  
  	status = centry->status;
  
@@ -1883,7 +1883,7 @@
  	return status;
  
 do_query:
-	ZERO_STRUCTP(lockout_policy);
+	ZERO_STRUCTP(policy);
  
 	/* Return status value returned by seq number check */
 
@@ -1893,11 +1893,11 @@
 	DEBUG(10,("lockout_policy: [Cached] - doing backend query for info for domain %s\n",
 		domain->name ));
  
-	status = domain->backend->lockout_policy(domain, mem_ctx, lockout_policy); 
+	status = domain->backend->lockout_policy(domain, mem_ctx, policy); 
  
 	/* and save it */
  	refresh_sequence_number(domain, False);
-	wcache_save_lockout_policy(domain, status, lockout_policy);
+	wcache_save_lockout_policy(domain, status, policy);
  
  	return status;
 }
@@ -1905,7 +1905,7 @@
 /* get password policy */
 static NTSTATUS password_policy(struct winbindd_domain *domain,
 				TALLOC_CTX *mem_ctx,
-				SAM_UNK_INFO_1 *password_policy)
+				SAM_UNK_INFO_1 *policy)
 {
 	struct winbind_cache *cache = get_cache(domain);
 	struct cache_entry *centry = NULL;
@@ -1919,11 +1919,11 @@
 	if (!centry)
 		goto do_query;
 
-	password_policy->min_length_password = centry_uint16(centry);
-	password_policy->password_history = centry_uint16(centry);
-	password_policy->password_properties = centry_uint32(centry);
-	password_policy->expire = centry_nttime(centry);
-	password_policy->min_passwordage = centry_nttime(centry);
+	policy->min_length_password = centry_uint16(centry);
+	policy->password_history = centry_uint16(centry);
+	policy->password_properties = centry_uint32(centry);
+	policy->expire = centry_nttime(centry);
+	policy->min_passwordage = centry_nttime(centry);
 
 	status = centry->status;
 
@@ -1934,7 +1934,7 @@
 	return status;
 
 do_query:
-	ZERO_STRUCTP(password_policy);
+	ZERO_STRUCTP(policy);
 
 	/* Return status value returned by seq number check */
 
@@ -1944,11 +1944,11 @@
 	DEBUG(10,("password_policy: [Cached] - doing backend query for info for domain %s\n",
 		domain->name ));
 
-	status = domain->backend->password_policy(domain, mem_ctx, password_policy); 
+	status = domain->backend->password_policy(domain, mem_ctx, policy); 
 
 	/* and save it */
 	refresh_sequence_number(domain, False);
-	wcache_save_password_policy(domain, status, password_policy);
+	wcache_save_password_policy(domain, status, policy);
 
 	return status;
 }

Modified: trunk/source/nsswitch/winbindd_reconnect.c
===================================================================
--- trunk/source/nsswitch/winbindd_reconnect.c	2006-04-19 03:06:50 UTC (rev 15131)
+++ trunk/source/nsswitch/winbindd_reconnect.c	2006-04-19 13:14:14 UTC (rev 15132)
@@ -247,14 +247,14 @@
 /* find the lockout policy of a domain */
 static NTSTATUS lockout_policy(struct winbindd_domain *domain, 
 			       TALLOC_CTX *mem_ctx,
-			       SAM_UNK_INFO_12 *lockout_policy)
+			       SAM_UNK_INFO_12 *policy)
 {
 	NTSTATUS result;
 
-	result = msrpc_methods.lockout_policy(domain, mem_ctx, lockout_policy);
+	result = msrpc_methods.lockout_policy(domain, mem_ctx, policy);
 
 	if (NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL))
-		result = msrpc_methods.lockout_policy(domain, mem_ctx, lockout_policy);
+		result = msrpc_methods.lockout_policy(domain, mem_ctx, policy);
 
 	return result;
 }
@@ -262,14 +262,14 @@
 /* find the password policy of a domain */
 static NTSTATUS password_policy(struct winbindd_domain *domain, 
 				TALLOC_CTX *mem_ctx,
-				SAM_UNK_INFO_1 *password_policy)
+				SAM_UNK_INFO_1 *policy)
 {
  	NTSTATUS result;
  
-	result = msrpc_methods.password_policy(domain, mem_ctx, password_policy);
+	result = msrpc_methods.password_policy(domain, mem_ctx, policy);
 
 	if (NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL))
-		result = msrpc_methods.password_policy(domain, mem_ctx, password_policy);
+		result = msrpc_methods.password_policy(domain, mem_ctx, policy);
 	
 	return result;
 }



More information about the samba-cvs mailing list