diff options
author | Günther Deschner <gd@samba.org> | 2006-05-04 17:28:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:43 -0500 |
commit | 52e778e6f85c5affbcc40e5ce629792e6f16b553 (patch) | |
tree | cfdf0189bf23ff251c97557634cbf4620658c46e | |
parent | a0ff50efa79f08f538f0c341744572929ac5a298 (diff) | |
download | samba-52e778e6f85c5affbcc40e5ce629792e6f16b553.tar.gz samba-52e778e6f85c5affbcc40e5ce629792e6f16b553.tar.bz2 samba-52e778e6f85c5affbcc40e5ce629792e6f16b553.zip |
r15438: Fix samrQueryDomainInfo level 5 where we returned our netbios
name eversince instead of the domain name when we are a DC.
Yes, there are applications relying on this call to be correct.
Guenther
(This used to be commit 26dd22c9af8caf3db236984e4683ba210376ca59)
-rw-r--r-- | source3/include/rpc_samr.h | 4 | ||||
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 10 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h index 37a0ed9a3f..c33d409997 100644 --- a/source3/include/rpc_samr.h +++ b/source3/include/rpc_samr.h @@ -572,8 +572,8 @@ typedef struct sam_unknown_info_12_inf typedef struct sam_unknown_info_5_inf { - UNIHDR hdr_server; /* server name unicode header */ - UNISTR2 uni_server; /* server name unicode string */ + UNIHDR hdr_domain; /* domain name unicode header */ + UNISTR2 uni_domain; /* domain name unicode string */ } SAM_UNK_INFO_5; diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 05c75fe98a..c425b945b4 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -662,10 +662,10 @@ static BOOL sam_io_unk_info12(const char *desc, SAM_UNK_INFO_12 * u_12, inits a structure. ********************************************************************/ -void init_unk_info5(SAM_UNK_INFO_5 * u_5,const char *server) +void init_unk_info5(SAM_UNK_INFO_5 * u_5,const char *domain) { - init_unistr2(&u_5->uni_server, server, UNI_FLAGS_NONE); - init_uni_hdr(&u_5->hdr_server, &u_5->uni_server); + init_unistr2(&u_5->uni_domain, domain, UNI_FLAGS_NONE); + init_uni_hdr(&u_5->hdr_domain, &u_5->uni_domain); } /******************************************************************* @@ -681,10 +681,10 @@ static BOOL sam_io_unk_info5(const char *desc, SAM_UNK_INFO_5 * u_5, prs_debug(ps, depth, desc, "sam_io_unk_info5"); depth++; - if(!smb_io_unihdr("hdr_server", &u_5->hdr_server, ps, depth)) + if(!smb_io_unihdr("hdr_domain", &u_5->hdr_domain, ps, depth)) return False; - if(!smb_io_unistr2("uni_server", &u_5->uni_server, u_5->hdr_server.buffer, ps, depth)) + if(!smb_io_unistr2("uni_domain", &u_5->uni_domain, u_5->hdr_domain.buffer, ps, depth)) return False; return True; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index c4b3d3512c..d672ab4a5b 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -2301,7 +2301,7 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA init_unk_info3(&ctr->info.inf3, nt_logout); break; case 0x05: - init_unk_info5(&ctr->info.inf5, global_myname()); + init_unk_info5(&ctr->info.inf5, get_global_sam_name()); break; case 0x06: init_unk_info6(&ctr->info.inf6); @@ -4802,7 +4802,7 @@ NTSTATUS _samr_query_domain_info2(pipes_struct *p, init_unk_info3(&ctr->info.inf3, nt_logout); break; case 0x05: - init_unk_info5(&ctr->info.inf5, global_myname()); + init_unk_info5(&ctr->info.inf5, get_global_sam_name()); break; case 0x06: init_unk_info6(&ctr->info.inf6); |