diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-05-07 08:21:06 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-05-07 08:21:06 +0000 |
commit | 3eeb40f9b54a4a48a4860a498991fd78274b44cf (patch) | |
tree | 3e19c74445156d951e0473692c20d6e78cd7ca5a /source3/passdb/pdb_ldap.c | |
parent | f99e253e6a222e06cb412b64395c96f9bc42e551 (diff) | |
download | samba-3eeb40f9b54a4a48a4860a498991fd78274b44cf.tar.gz samba-3eeb40f9b54a4a48a4860a498991fd78274b44cf.tar.bz2 samba-3eeb40f9b54a4a48a4860a498991fd78274b44cf.zip |
Set our 'global sam name' in one place. For domain controllers, this is
lp_workgroup(), for all other server this is global_myname().
This is the name of the domain for accounts on *this* system, and getting
this wrong caused interesting bugs with 'take ownership' on member servers
and standalone servers at Snap.
(They lookup the username that they got, then convert that to a SID - but
becouse the domain out of the smbpasswd entry was wrong, we would fail the
lookup).
Andrew Bartlett
(This used to be commit 5fc78eba20411f3f5a8ccadfcba5c4ab73180dba)
Diffstat (limited to 'source3/passdb/pdb_ldap.c')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 4abc7b569c..021b2e621e 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -3144,7 +3144,7 @@ static NTSTATUS pdb_init_ldapsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_met ldap_state->uri = "ldap://localhost"; } - ldap_state->domain_name = talloc_strdup(pdb_context->mem_ctx, lp_workgroup()); + ldap_state->domain_name = talloc_strdup(pdb_context->mem_ctx, get_global_sam_name()); if (!ldap_state->domain_name) { return NT_STATUS_NO_MEMORY; } |