summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 58a7d8dde9..5ccb5a665b 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -332,6 +332,7 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
{
LSA_INFO_UNION *info = &r_u->dom;
DOM_SID domain_sid;
+ fstring dos_domain;
char *name = NULL;
DOM_SID *sid = NULL;
@@ -340,6 +341,9 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
return NT_STATUS_INVALID_HANDLE;
+ fstrcpy(dos_domain, global_myworkgroup);
+ unix_to_dos(dos_domain, True);
+
switch (q_u->info_class) {
case 0x02:
{
@@ -359,20 +363,20 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
switch (lp_server_role()) {
case ROLE_DOMAIN_PDC:
case ROLE_DOMAIN_BDC:
- name = global_myworkgroup;
+ name = dos_domain;
sid = &global_sam_sid;
break;
case ROLE_DOMAIN_MEMBER:
- name = global_myworkgroup;
+ name = dos_domain;
/* We need to return the Domain SID here. */
- if (secrets_fetch_domain_sid(global_myworkgroup,
- &domain_sid))
- sid = &domain_sid;
+ if (secrets_fetch_domain_sid(dos_domain,
+ &domain_sid))
+ sid = &domain_sid;
else
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
break;
case ROLE_STANDALONE:
- name = global_myname;
+ name = dos_domain;
sid = NULL; /* Tell it we're not in a domain. */
break;
default:
@@ -385,15 +389,15 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
switch (lp_server_role()) {
case ROLE_DOMAIN_PDC:
case ROLE_DOMAIN_BDC:
- name = global_myworkgroup;
+ name = dos_domain;
sid = &global_sam_sid;
break;
case ROLE_DOMAIN_MEMBER:
- name = global_myname;
+ name = dos_domain;
sid = &global_sam_sid;
break;
case ROLE_STANDALONE:
- name = global_myname;
+ name = dos_domain;
sid = &global_sam_sid;
break;
default: