The Samba-Bugzilla – Attachment 8966 Details for
Bug 9947
Can not contact fileserver shares via netbios name alias due to dfs_samba4 vfs module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch, cherry-picked from master
fix-bug-9947.patch (text/plain), 2.44 KB, created by
Björn Baumbach
on 2013-06-13 08:33:10 UTC
(
hide
)
Description:
proposed patch, cherry-picked from master
Filename:
MIME Type:
Creator:
Björn Baumbach
Created:
2013-06-13 08:33:10 UTC
Size:
2.44 KB
patch
obsolete
>From 1a45d72eb4f9a869976df2caccccaaa6f8a4fc6c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb@sernet.de> >Date: Wed, 5 Jun 2013 15:01:14 +0200 >Subject: [PATCH] s4-dfs_server: check for netbios aliases in ad_get_referrals > (bug #9947) >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Without this patch ad_get_referrals checks for netbios, dns names >and ip, but not for netbios aliases set by netbios aliases option, >whether the requested name is our dns name. > >Pair-programmed-with: Stefan Metzmacher <metze@samba.org> > >Signed-off-by: Björn Baumbach <bb@sernet.de> >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Michael Adam <obnox@samba.org> > >Autobuild-User(master): Michael Adam <obnox@samba.org> >Autobuild-Date(master): Tue Jun 11 01:12:08 CEST 2013 on sn-devel-104 >(cherry picked from commit 424a990e34278fae4888b00affb530ed1fbcb354) >--- > dfs_server/dfs_server_ad.c | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > >diff --git a/dfs_server/dfs_server_ad.c b/dfs_server/dfs_server_ad.c >index ceabe05..8fa143d 100644 >--- a/dfs_server/dfs_server_ad.c >+++ b/dfs_server/dfs_server_ad.c >@@ -751,6 +751,7 @@ NTSTATUS dfs_server_ad_get_referrals(struct loadparm_context *lp_ctx, > const char *dns_domain; > const char *netbios_name; > const char *dns_name; >+ const char **netbios_aliases; > > if (!lpcfg_host_msdfs(lp_ctx)) { > return NT_STATUS_FS_DRIVER_REQUIRED; >@@ -827,6 +828,40 @@ NTSTATUS dfs_server_ad_get_referrals(struct loadparm_context *lp_ctx, > return NT_STATUS_NOT_FOUND; > } > >+ netbios_aliases = lpcfg_netbios_aliases(lp_ctx); >+ while (netbios_aliases && *netbios_aliases) { >+ const char *netbios_alias = *netbios_aliases; >+ char *dns_alias; >+ int cmp; >+ >+ cmp = strcasecmp_m(server_name, netbios_alias); >+ if (cmp == 0) { >+ /* >+ * If it is not domain related do not >+ * handle it here. >+ */ >+ return NT_STATUS_NOT_FOUND; >+ } >+ >+ dns_alias = talloc_asprintf(r, "%s.%s", >+ netbios_alias, >+ dns_domain); >+ if (dns_alias == NULL) { >+ return NT_STATUS_NO_MEMORY; >+ } >+ >+ cmp = strcasecmp_m(server_name, dns_alias); >+ talloc_free(dns_alias); >+ if (cmp == 0) { >+ /* >+ * If it is not domain related do not >+ * handle it here. >+ */ >+ return NT_STATUS_NOT_FOUND; >+ } >+ netbios_aliases++; >+ } >+ > if ((strcasecmp_m(server_name, netbios_domain) != 0) && > (strcasecmp_m(server_name, dns_domain) != 0)) { > /* >-- >1.8.1.5 >
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
Flags:
metze
:
review+
obnox
:
review+
Actions:
View
Attachments on
bug 9947
: 8966