[PATCH] libads: Remove "foreign" from ads_struct

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Dec 16 20:48:13 UTC 2015


Hi!

Review appreciated!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 1a02416ffc7bdf6ac52b2bba71ee54c97465c254 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 16 Dec 2015 21:44:50 +0100
Subject: [PATCH] libads: Remove "foreign" from ads_struct

AFAICS this was never actually used

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/include/ads.h       | 2 --
 source3/libads/ads_struct.c | 8 --------
 source3/libads/ndr.c        | 1 -
 3 files changed, 11 deletions(-)

diff --git a/source3/include/ads.h b/source3/include/ads.h
index daea56d..cacb25c 100644
--- a/source3/include/ads.h
+++ b/source3/include/ads.h
@@ -32,8 +32,6 @@ typedef struct ads_struct {
 		char *realm;
 		char *workgroup;
 		char *ldap_server;
-		int foreign; /* set to 1 if connecting to a foreign
-			      * realm */
 		bool gc;     /* Is this a global catalog server? */
 	} server;
 
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index 30d433e..27af4d6 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -144,14 +144,6 @@ ADS_STRUCT *ads_init(const char *realm,
 	ads->server.workgroup = workgroup ? SMB_STRDUP(workgroup) : NULL;
 	ads->server.ldap_server = ldap_server? SMB_STRDUP(ldap_server) : NULL;
 
-	/* we need to know if this is a foreign realm */
-	if (realm && *realm && !strequal(lp_realm(), realm)) {
-		ads->server.foreign = 1;
-	}
-	if (workgroup && *workgroup && !strequal(lp_workgroup(), workgroup)) {
-		ads->server.foreign = 1;
-	}
-
 	/* the caller will own the memory by default */
 	ads->is_mine = 1;
 
diff --git a/source3/libads/ndr.c b/source3/libads/ndr.c
index fd0b63e..eb48437 100644
--- a/source3/libads/ndr.c
+++ b/source3/libads/ndr.c
@@ -50,7 +50,6 @@ void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct
 	ndr_print_string(ndr, "realm", r->server.realm);
 	ndr_print_string(ndr, "workgroup", r->server.workgroup);
 	ndr_print_string(ndr, "ldap_server", r->server.ldap_server);
-	ndr_print_bool(ndr, "foreign", r->server.foreign);
 	ndr->depth--;
 	ndr_print_struct(ndr, name, "auth");
 	ndr->depth++;
-- 
1.9.1



More information about the samba-technical mailing list