summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-13 00:31:53 +0000
committerJeremy Allison <jra@samba.org>2001-03-13 00:31:53 +0000
commit9b690629eebf86b55cc0f18a84ed704dfa7ab065 (patch)
treed1d528c653654d858d7ffca6c022b44d0522be72 /source3
parentd3ec09326b27dd00b1f67a7ce48bc9817a313735 (diff)
downloadsamba-9b690629eebf86b55cc0f18a84ed704dfa7ab065.tar.gz
samba-9b690629eebf86b55cc0f18a84ed704dfa7ab065.tar.bz2
samba-9b690629eebf86b55cc0f18a84ed704dfa7ab065.zip
Ensure we return the correct names/sids on query info. AS/U showed us what
we should return here. Jeremy. (This used to be commit d22c6067032e167d4558f4954c58d87404de6d9d)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 8e1d934309..d1a7c049d8 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -366,7 +366,8 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
if (secrets_fetch_domain_sid(global_myworkgroup,
&domain_sid))
{
- name = global_myworkgroup;
+ /* I'm sure this should be myname, not myworkgroup. JRA. */
+ name = global_myname;
sid = &domain_sid;
}
default:
@@ -375,8 +376,24 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
init_dom_query(&r_u->dom.id3, name, sid);
break;
case 0x05:
- name = global_myname;
- sid = &global_sam_sid;
+ /* AS/U shows this needs to be the same as level 3. JRA. */
+ switch (lp_server_role())
+ {
+ case ROLE_DOMAIN_PDC:
+ case ROLE_DOMAIN_BDC:
+ name = global_myworkgroup;
+ sid = &global_sam_sid;
+ break;
+ case ROLE_DOMAIN_MEMBER:
+ if (secrets_fetch_domain_sid(global_myworkgroup,
+ &domain_sid))
+ {
+ name = global_myname;
+ sid = &domain_sid;
+ }
+ default:
+ break;
+ }
init_dom_query(&r_u->dom.id5, name, sid);
break;
case 0x06: