svn commit: samba r6755 - in branches/SAMBA_3_0/source/nsswitch: .

jerry at samba.org jerry at samba.org
Thu May 12 13:09:34 GMT 2005


Author: jerry
Date: 2005-05-12 13:09:33 +0000 (Thu, 12 May 2005)
New Revision: 6755

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

Log:
removing domain_sid() since it is not referenced anymore
Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd.h
   branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_passdb.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.h
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd.h	2005-05-12 12:56:18 UTC (rev 6754)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd.h	2005-05-12 13:09:33 UTC (rev 6755)
@@ -210,10 +210,6 @@
 				    char ***alt_names,
 				    DOM_SID **dom_sids);
 
-	/* find the domain sid */
-	NTSTATUS (*domain_sid)(struct winbindd_domain *domain,
-			       DOM_SID *sid);
-
 	/* setup the list of alternate names for the domain, if any */
 	NTSTATUS (*alternate_name)(struct winbindd_domain *domain);
 };

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c	2005-05-12 12:56:18 UTC (rev 6754)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c	2005-05-12 13:09:33 UTC (rev 6755)
@@ -892,36 +892,6 @@
 	return result;
 }
 
-/* find the domain sid for a domain */
-static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
-{
-	ADS_STRUCT *ads;
-	ADS_STATUS rc;
-
-	DEBUG(3,("ads: domain_sid\n"));
-
-	ads = ads_cached_connection(domain);
-
-	if (!ads) {
-		domain->last_status = NT_STATUS_SERVER_DISABLED;
-		return NT_STATUS_UNSUCCESSFUL;
-	}
-
-	rc = ads_domain_sid(ads, sid);
-
-	if (!ADS_ERR_OK(rc)) {
-	
-		/* its a dead connection; don't destroy it though
-		   since that has already been done indirectly 
-		   by ads_domain_sid() */
-
-		domain->private = NULL;
-	}
-
-	return ads_ntstatus(rc);
-}
-
-
 /* find alternate names list for the domain - for ADS this is the
    netbios name */
 static NTSTATUS alternate_name(struct winbindd_domain *domain)
@@ -972,7 +942,6 @@
 	lookup_groupmem,
 	sequence_number,
 	trusted_domains,
-	domain_sid,
 	alternate_name
 };
 

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2005-05-12 12:56:18 UTC (rev 6754)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2005-05-12 13:09:33 UTC (rev 6755)
@@ -1398,18 +1398,6 @@
 					       names, alt_names, dom_sids);
 }
 
-/* find the domain sid */
-static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
-{
-	get_cache(domain);
-
-	DEBUG(10,("domain_sid: [Cached] - doing backend query for info for domain %s\n",
-		domain->name ));
-
-	/* we don't cache this call */
-	return domain->backend->domain_sid(domain, sid);
-}
-
 /* find the alternate names for the domain, if any */
 static NTSTATUS alternate_name(struct winbindd_domain *domain)
 {
@@ -1476,6 +1464,5 @@
 	lookup_groupmem,
 	sequence_number,
 	trusted_domains,
-	domain_sid,
 	alternate_name
 };

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_passdb.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_passdb.c	2005-05-12 12:56:18 UTC (rev 6754)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_passdb.c	2005-05-12 13:09:33 UTC (rev 6755)
@@ -373,13 +373,6 @@
 	return nt_status;
 }
 
-/* find the domain sid for a domain */
-static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
-{
-	sid_copy(sid, &domain->sid);
-	return NT_STATUS_OK;
-}
-
 /* find alternate names list for the domain 
  * should we look for netbios aliases?? 
 				SSS	*/
@@ -405,6 +398,5 @@
 	lookup_groupmem,
 	sequence_number,
 	trusted_domains,
-	domain_sid,
 	alternate_name
 };

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c	2005-05-12 12:56:18 UTC (rev 6754)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c	2005-05-12 13:09:33 UTC (rev 6755)
@@ -1021,44 +1021,6 @@
 	return result;
 }
 
-/* find the domain sid for a domain */
-static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
-{
-	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-	TALLOC_CTX *mem_ctx;
-	CLI_POLICY_HND *hnd;
-	char *level5_dom;
-	DOM_SID *alloc_sid;
-	int retry;
-
-	DEBUG(3,("rpc: domain_sid\n"));
-
-	if (!(mem_ctx = talloc_init("domain_sid[rpc]")))
-		return NT_STATUS_NO_MEMORY;
-
-	retry = 0;
-	do {
-		/* Get lsa handle */
-		if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain, &hnd)))
-			goto done;
-
-		result = cli_lsa_query_info_policy(hnd->cli, mem_ctx,
-					   &hnd->pol, 0x05, &level5_dom, &alloc_sid);
-	} while (!NT_STATUS_IS_OK(result) && (retry++ < 1) &&  hnd && hnd->cli && hnd->cli->fd == -1);
-
-	if (NT_STATUS_IS_OK(result)) {
-		if (alloc_sid) {
-			sid_copy(sid, alloc_sid);
-		} else {
-			result = NT_STATUS_NO_MEMORY;
-		}
-	}
-
-done:
-	talloc_destroy(mem_ctx);
-	return result;
-}
-
 /* find alternate names list for the domain - none for rpc */
 static NTSTATUS alternate_name(struct winbindd_domain *domain)
 {
@@ -1080,6 +1042,5 @@
 	lookup_groupmem,
 	sequence_number,
 	trusted_domains,
-	domain_sid,
 	alternate_name
 };



More information about the samba-cvs mailing list