summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-25 10:36:58 +0200
committerVolker Lendecke <vl@samba.org>2010-04-25 10:55:19 +0200
commitd41836fb62e3059e042bf72d4392c2e85b55c582 (patch)
tree61786fa0533bd92a6be4cad896ecefeb72d0fe35 /source3/winbindd
parent13cdaf9417ab08425d9b7e244a6830d34147b889 (diff)
downloadsamba-d41836fb62e3059e042bf72d4392c2e85b55c582.tar.gz
samba-d41836fb62e3059e042bf72d4392c2e85b55c582.tar.bz2
samba-d41836fb62e3059e042bf72d4392c2e85b55c582.zip
s3: Simplify trustdom_state
Don't store information explicitly as boolean flags that can be easily retrieved from the domain when it's actually needed.
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_util.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 3f2920ae7a..83cc36b350 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -237,8 +237,7 @@ bool domain_is_forest_root(const struct winbindd_domain *domain)
********************************************************************/
struct trustdom_state {
- bool primary;
- bool forest_root;
+ struct winbindd_domain *domain;
struct winbindd_response *response;
};
@@ -267,11 +266,7 @@ static void add_trusted_domains( struct winbindd_domain *domain )
return;
}
state->response = response;
-
- /* Flags used to know how to continue the forest trust search */
-
- state->primary = domain->primary;
- state->forest_root = domain_is_forest_root(domain);
+ state->domain = domain;
request->length = sizeof(*request);
request->cmd = WINBINDD_LIST_TRUSTDOM;
@@ -363,16 +358,16 @@ static void trustdom_recv(void *private_data, bool success)
&& !forest_root)
*/
- if ( state->primary ) {
+ if (state->domain->primary) {
/* If this is our primary domain and we are not in the
forest root, we have to scan the root trusts first */
- if ( !state->forest_root )
+ if (!domain_is_forest_root(state->domain))
rescan_forest_root_trusts();
else
rescan_forest_trusts();
- } else if ( state->forest_root ) {
+ } else if (domain_is_forest_root(state->domain)) {
/* Once we have done root forest trust search, we can
go on to search the trusted forests */