diff options
author | Günther Deschner <gd@samba.org> | 2006-05-04 19:01:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:44 -0500 |
commit | 0fe21ac5609940be815148a2f73e1e456b7c3cce (patch) | |
tree | 85a765da983a40c7c5ab93a166afec1b11e3dca7 /source3/rpc_server | |
parent | 46c35b17a32d479f5780ca6a24e4e9c3b9cc2403 (diff) | |
download | samba-0fe21ac5609940be815148a2f73e1e456b7c3cce.tar.gz samba-0fe21ac5609940be815148a2f73e1e456b7c3cce.tar.bz2 samba-0fe21ac5609940be815148a2f73e1e456b7c3cce.zip |
r15442: Add some more client rpc for the querydominfo calls (from samba4 idl).
Also return the hostname for the level 6 call (to be consistent with the
server name in level 2).
Guenther
(This used to be commit 41b72e77ae70c96de4659af6b4b6bd842dd67981)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index d672ab4a5b..035f838048 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -2304,7 +2304,10 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA init_unk_info5(&ctr->info.inf5, get_global_sam_name()); break; case 0x06: - init_unk_info6(&ctr->info.inf6); + /* NT returns its own name when a PDC. win2k and later + * only the name of the PDC if itself is a BDC (samba4 + * idl) */ + init_unk_info6(&ctr->info.inf6, global_myname()); break; case 0x07: server_role = ROLE_DOMAIN_PDC; @@ -4712,8 +4715,8 @@ NTSTATUS _samr_remove_sid_foreign_domain(pipes_struct *p, ********************************************************************/ NTSTATUS _samr_query_domain_info2(pipes_struct *p, - SAMR_Q_QUERY_DOMAIN_INFO2 *q_u, - SAMR_R_QUERY_DOMAIN_INFO2 *r_u) + SAMR_Q_QUERY_DOMAIN_INFO2 *q_u, + SAMR_R_QUERY_DOMAIN_INFO2 *r_u) { struct samr_info *info = NULL; SAM_UNK_CTR *ctr; @@ -4805,7 +4808,10 @@ NTSTATUS _samr_query_domain_info2(pipes_struct *p, init_unk_info5(&ctr->info.inf5, get_global_sam_name()); break; case 0x06: - init_unk_info6(&ctr->info.inf6); + /* NT returns its own name when a PDC. win2k and later + * only the name of the PDC if itself is a BDC (samba4 + * idl) */ + init_unk_info6(&ctr->info.inf6, global_myname()); break; case 0x07: server_role = ROLE_DOMAIN_PDC; @@ -4849,7 +4855,7 @@ NTSTATUS _samr_query_domain_info2(pipes_struct *p, } /******************************************************************* - _samr_ + _samr_set_dom_info ********************************************************************/ NTSTATUS _samr_set_dom_info(pipes_struct *p, SAMR_Q_SET_DOMAIN_INFO *q_u, SAMR_R_SET_DOMAIN_INFO *r_u) |