diff options
author | Volker Lendecke <vl@samba.org> | 2009-06-29 22:28:19 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-07-04 12:54:22 +0200 |
commit | 98fb2a18f9d805a16514f24a5a0d87aa4a3573ff (patch) | |
tree | 3e60ab228ec41e9ee3cd9b9702f7ad5fbbe0ed67 /source3 | |
parent | bc1e93cc80874dd89ade863e38effda80a99fd47 (diff) | |
download | samba-98fb2a18f9d805a16514f24a5a0d87aa4a3573ff.tar.gz samba-98fb2a18f9d805a16514f24a5a0d87aa4a3573ff.tar.bz2 samba-98fb2a18f9d805a16514f24a5a0d87aa4a3573ff.zip |
pdb_ads: Fetch the domain GUID
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))); /* |