[arch-commits] Commit in samba/trunk (PKGBUILD fix-workgroup-listing.patch)

Tobias Powalowski tpowa at archlinux.org
Sun Nov 22 04:42:24 EST 2009


    Date: Sunday, November 22, 2009 @ 04:42:24
  Author: tpowa
Revision: 59329

upgpkg: samba 3.4.3-3
    fix #17187

Added:
  samba/trunk/fix-workgroup-listing.patch
Modified:
  samba/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   11 +++++--
 fix-workgroup-listing.patch |   63 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-22 09:04:37 UTC (rev 59328)
+++ PKGBUILD	2009-11-22 09:42:24 UTC (rev 59329)
@@ -7,7 +7,7 @@
 # to append 'a','b',etc to their subsequent releases, which pamcan
 # misconstrues as alpha, beta, etc.  Bad samba!
 _realver=3.4.3
-pkgrel=2
+pkgrel=3
 arch=(i686 x86_64)
 url="http://www.samba.org"
 license=('GPL3')
@@ -17,9 +17,13 @@
         samba samba.logrotate 
         swat.xinetd 
         samba.pam 
-        samba.conf.d)
+        samba.conf.d
+        fix-workgroup-listing.patch)
 
 build() {
+  # fix https://bugzilla.samba.org/show_bug.cgi?id=6880
+  cd ${srcdir}/${pkgbase}-${_realver}
+  patch -Np1 -i ../fix-workgroup-listing.patch || return 1
   cd ${srcdir}/${pkgbase}-${_realver}/source3
   ./configure --prefix=/usr --with-configdir=/etc/samba \
               --with-lockdir=/var/cache/samba \
@@ -146,4 +150,5 @@
          '5697da77590ec092cc8a883bae06093c'
          'a4bbfa39fee95bba2e7ad6b535fae7e6'
          '96f82c38f3f540b53f3e5144900acf17'
-         'f2f2e348acd1ccb566e95fa8a561b828')
+         'f2f2e348acd1ccb566e95fa8a561b828'
+         '5afd9b6346d90e002ccd6d33f175dd9a')

Added: fix-workgroup-listing.patch
===================================================================
--- fix-workgroup-listing.patch	                        (rev 0)
+++ fix-workgroup-listing.patch	2009-11-22 09:42:24 UTC (rev 59329)
@@ -0,0 +1,63 @@
+From e33a12ef0e64a5c8798995e0ae62fe50e3c0ebd6 Mon Sep 17 00:00:00 2001
+From: Jeremy Allison <jra at samba.org>
+Date: Mon, 9 Nov 2009 10:45:50 -0800
+Subject: [PATCH] Fix bug 6880 - cannot list workgroup servers
+ reported by Alban Browaeys <prahal at yahoo.com> with fix.
+ Revert 2e989bab0764c298a2530a2d4c8690258eba210c
+ with extra comments - this broke workgroup enumeration.
+ Jeremy.
+
+---
+ source3/libsmb/libsmb_dir.c |   19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
+index 44ecfce..143c61c 100644
+--- a/source3/libsmb/libsmb_dir.c
++++ b/source3/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
+



More information about the arch-commits mailing list