diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/pdb_ads.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 1f3788c94f..2063a554f5 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -23,6 +23,7 @@ struct pdb_ads_state { struct sockaddr_un socket_address; struct tldap_context *ld; struct dom_sid domainsid; + struct GUID domainguid; char *domaindn; char *configdn; char *netbiosname; @@ -2135,7 +2136,7 @@ static NTSTATUS pdb_ads_connect(struct pdb_ads_state *state, { const char *rootdse_attrs[2] = { "defaultNamingContext", "configurationNamingContext" }; - const char *domain_attrs[1] = { "objectSid" }; + const char *domain_attrs[2] = { "objectSid", "objectGUID" }; const char *ncname_attrs[1] = { "netbiosname" }; struct tldap_message **rootdse, **domain, **ncname; TALLOC_CTX *frame = talloc_stackframe(); @@ -2206,6 +2207,11 @@ static NTSTATUS pdb_ads_connect(struct pdb_ads_state *state, status = NT_STATUS_INTERNAL_DB_CORRUPTION; goto done; } + if (!tldap_pull_guid(domain[0], "objectGUID", &state->domainguid)) { + DEBUG(10, ("Could not retrieve domain GUID\n")); + status = NT_STATUS_INTERNAL_DB_CORRUPTION; + goto done; + } DEBUG(10, ("Domain SID: %s\n", sid_string_dbg(&state->domainsid))); /* |