The Samba-Bugzilla – Attachment 4498 Details for
Bug 6596
GetDomainInfo return domainname instead of full dns hostname of the workstation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch proposal in order to fix the pb
0001-Make-GetDomainInfo-returns-the-full-dns-name-of-the.patch (text/plain), 2.25 KB, created by
Matthieu Patou
on 2009-08-01 05:46:46 UTC
(
hide
)
Description:
Patch proposal in order to fix the pb
Filename:
MIME Type:
Creator:
Matthieu Patou
Created:
2009-08-01 05:46:46 UTC
Size:
2.25 KB
patch
obsolete
>From 0fe7c80ec849154198d78c37648f21f931f47835 Mon Sep 17 00:00:00 2001 >From: Matthieu Patou <mat@matws.net> >Date: Sat, 1 Aug 2009 14:39:09 +0400 >Subject: [PATCH] Make GetDomainInfo returns the full dns name of the workstation as required instead of just its domain > >--- > source4/rpc_server/netlogon/dcerpc_netlogon.c | 16 ++++++++++++---- > 1 files changed, 12 insertions(+), 4 deletions(-) > >diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c >index dc2d078..cb9f46f 100644 >--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c >+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c >@@ -1122,10 +1122,12 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal > const char * const attrs[] = { "objectSid", > "objectGUID", "flatName", "securityIdentifier", > "trustPartner", NULL }; >+ const char * const attrs2[] = {"dNSHostName",NULL}; > struct ldb_context *sam_ctx; >- struct ldb_message **res1, **res2; >+ struct ldb_message **res1, **res2, **res3; >+ const char* dnshostname; > struct netr_DomainInfo1 *info1; >- int ret1, ret2, i; >+ int ret1, ret2, ret3, i; > NTSTATUS status; > > const char *local_domain; >@@ -1164,6 +1166,11 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal > return NT_STATUS_INTERNAL_DB_CORRUPTION; > } > >+ ret3 = gendb_search(sam_ctx, mem_ctx, NULL, &res3, attrs2, "(&(objectClass=computer)(name=%s))",r->in.computer_name); >+ if (ret3 == -1) { >+ return NT_STATUS_INTERNAL_DB_CORRUPTION; >+ } >+ > info1 = talloc(mem_ctx, struct netr_DomainInfo1); > NT_STATUS_HAVE_NO_MEMORY(info1); > >@@ -1187,8 +1194,9 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal > status = fill_domain_trust_info(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, sam_ctx, res1[0], &info1->trusts[i], > true, true); > NT_STATUS_NOT_OK_RETURN(status); >- >- info1->dns_hostname.string = lp_realm(dce_call->conn->dce_ctx->lp_ctx); >+ >+ dnshostname = ldb_msg_find_attr_as_string(res3[0], "dNSHostName", NULL); >+ info1->dns_hostname.string = talloc_strdup(mem_ctx,dnshostname); > info1->workstation_flags = > NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS | NETR_WS_FLAG_HANDLES_SPN_UPDATE; > info1->supported_enc_types = 0; /* w2008 gives this 0 */ >-- >1.5.6.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6596
: 4498