The Samba-Bugzilla – Attachment 4935 Details for
Bug 6880
cannot list workgroup servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am format patch for 3.3.10.
0001-Fix-bug-6880-cannot-list-workgroup-servers.patch (text/plain), 2.25 KB, created by
Jeremy Allison
on 2009-11-09 14:42:38 UTC
(
hide
)
Description:
git-am format patch for 3.3.10.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-11-09 14:42:38 UTC
Size:
2.25 KB
patch
obsolete
>From 335c4fe0da007bf769f3679e0aeb1868f645da0d Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 9 Nov 2009 12:41:13 -0800 >Subject: [PATCH] Fix bug 6880 - cannot list workgroup servers > reported by Alban Browaeys <prahal@yahoo.com> with fix. > Revert 2e989bab0764c298a2530a2d4c8690258eba210c > with extra comments - this broke workgroup enumeration. > Jeremy. > >--- > source/libsmb/libsmb_dir.c | 19 ++++++++++++++----- > 1 files changed, 14 insertions(+), 5 deletions(-) > >diff --git a/source/libsmb/libsmb_dir.c b/source/libsmb/libsmb_dir.c >index d238ab9..b370f4b 100644 >--- a/source/libsmb/libsmb_dir.c >+++ b/source/libsmb/libsmb_dir.c >@@ -617,7 +617,11 @@ SMBC_opendir_ctx(SMBCCTX *context, > !is_ipaddress(server) && > (resolve_name(server, &rem_ss, 0x1d) || /* LMB */ > resolve_name(server, &rem_ss, 0x1b) )) { /* DMB */ >- >+ /* >+ * "server" is actually a workgroup name, >+ * not a server. Make this clear. >+ */ >+ char *wgroup = server; > fstring buserver; > > dir->dir_type = SMBC_SERVER; >@@ -625,12 +629,17 @@ SMBC_opendir_ctx(SMBCCTX *context, > /* > * Get the backup list ... > */ >- if (!name_status_find(server, 0x20, 0x20, >+ if (!name_status_find(wgroup, 0, 0, > &rem_ss, buserver)) { >+ char addr[INET6_ADDRSTRLEN]; > >+ print_sockaddr(addr, sizeof(addr), &rem_ss); > DEBUG(0,("Could not get name of " >- "local/domain master browser " >- "for server %s\n", server)); >+ "local/domain master browser " >+ "for workgroup %s fro m" >+ "address %s\n", >+ wgroup, >+ addr)); > if (dir) { > SAFE_FREE(dir->fname); > SAFE_FREE(dir); >@@ -663,7 +672,7 @@ SMBC_opendir_ctx(SMBCCTX *context, > dir->srv = srv; > > /* Now, list the servers ... */ >- if (!cli_NetServerEnum(srv->cli, server, >+ if (!cli_NetServerEnum(srv->cli, wgroup, > 0x0000FFFE, list_fn, > (void *)dir)) { > >-- >1.5.4.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 6880
:
4933
| 4935