diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-22 07:45:16 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-22 07:45:16 +0000 |
commit | c2e997d6a754945284687c99c0ef67acb94c4a37 (patch) | |
tree | 2de89af1734caf45973a60e7f4cf213290437dd6 /source3/rpc_server | |
parent | cf86f85b088be7c6ddb8d060e93a7f3040efe342 (diff) | |
download | samba-c2e997d6a754945284687c99c0ef67acb94c4a37.tar.gz samba-c2e997d6a754945284687c99c0ef67acb94c4a37.tar.bz2 samba-c2e997d6a754945284687c99c0ef67acb94c4a37.zip |
Merge from 3.0 - try harder to get our real DNS domain name, and send this
to the client when it asks for our DNS name and forest name.
(needed for win2k to trust us as a trusted domain).
Andrew Bartlett
(This used to be commit 2a1015eb57da7b69caafd1221b871b6bff1af2fb)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index fb6538db39..3581be0181 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1222,6 +1222,7 @@ NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_I char *forest_name = NULL; DOM_SID *sid = NULL; GUID guid; + fstring dnsdomname; ZERO_STRUCT(guid); r_u->status = NT_STATUS_OK; @@ -1241,8 +1242,15 @@ NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_I case ROLE_DOMAIN_BDC: nb_name = lp_workgroup(); /* ugly temp hack for these next two */ - dns_name = lp_realm(); - forest_name = lp_realm(); + + /* This should be a 'netbios domain -> DNS domain' mapping */ + dnsdomname[0] = '\0'; + get_mydomname(dnsdomname); + strlower(dnsdomname); + + dns_name = dnsdomname; + forest_name = dnsdomname; + sid = get_global_sam_sid(); secrets_fetch_domain_guid(lp_workgroup(), &guid); break; |