7071751 Problem with utility/samba
authorJiri Sasek <Jiri.Sasek@Sun.COM>
Mon, 01 Aug 2011 12:07:26 -0700
changeset 446 ba4f3a6be7f7
parent 445 f383012adc1a
child 447 7ca7b95abd2f
7071751 Problem with utility/samba 7071749 Update to samba 3.5.10 7072131 Samba can not join Active Directory domain vhen run on i86 ARCH. 7061626 Upgrade to KB2536276 users are unable to connect to samba from WindowsXP using unencrypted passwords
components/samba/samba/Makefile
components/samba/samba/patches/0001-s3-Fix-bug-8238-KB2536276-prevents-access-to-sha.patch
components/samba/samba/samba-license
--- a/components/samba/samba/Makefile	Mon Aug 01 10:13:00 2011 -0700
+++ b/components/samba/samba/Makefile	Mon Aug 01 12:07:26 2011 -0700
@@ -25,12 +25,12 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		samba
-COMPONENT_VERSION=	3.5.8
+COMPONENT_VERSION=	3.5.10
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_PROJECT_URL=	http://www.samba.org/
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
-COMPONENT_ARCHIVE_HASH=	sha1:ffb71de38442eee14aafb44f819671354dc5cce9
-COMPONENT_ARCHIVE_URL=	http://www.samba.org/samba/ftp/stable/$(COMPONENT_ARCHIVE)
+COMPONENT_ARCHIVE_HASH=	sha1:de63b1a7e2fa6bcae91dbf7d2cbdfb38d0f97c00
+COMPONENT_ARCHIVE_URL=	http://us1.samba.org/samba/ftp/stable/$(COMPONENT_ARCHIVE)
 
 COMPONENT_NAME_1=		docbook-xsl
 COMPONENT_VERSION_1=		1.76.1
@@ -43,6 +43,14 @@
 COMPONENT_ARCHIVE_HASH_2=	sha1:58871eebb9ebfe57a3db0490616786972cb858fe
 COMPONENT_ARCHIVE_URL_2=	http://hub.opensolaris.org/bin/download/Project+samqfs/files/libsam%2DLGPL.tar
 
+# Samba does not work properly on i86 when built by studio.
+# Samba on SPARC has serious performance drop when built by gcc.
+ifeq ($(MACH), sparc)
+COMPILER = studio
+else
+COMPILER = gcc
+endif
+
 include ../../../make-rules/prep.mk
 
 SRC_OFFSET =	source3
@@ -106,11 +114,12 @@
 		-o $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so
 	cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
 
-CFLAGS +=	$(CC_BITS)
-CFLAGS +=	$(studio_C99_ENABLE)
-CFLAGS +=	$(CFLAGS.studio)
+CFLAGS.studio	+=	$(studio_C99_ENABLE)
+CFLAGS.gcc	+=	-std=c99
 
-CPPFLAGS +=	-I$(PROTOINCDIR)/samba -I$(PROTOINCDIR)/samba/ldap6
+CPPFLAGS +=	$(CPP_LARGEFILES)
+CPPFLAGS +=	$(CPP_XPG6MODE)
+CPPFLAGS +=	-I$(PROTOUSRINCDIR)/samba -I$(PROTOUSRINCDIR)/samba/ldap6 -I$(BUILD_DIR_$(BITS))/include
 
 LIBS +=		-lrt -lsocket -lnsl
 # libavahi is not for 64bits but we do not need it
@@ -125,7 +134,11 @@
 LDFLAGS.64 +=	-L $(PROTOUSRLIBDIR)/samba/$(MACH64) -R/usr/lib/samba/$(MACH64)
 LDFLAGS.64 +=	$(LIBS)
 
+ifeq ($(COMPILER), studio)
 LDFLAGS +=	$(LDFLAGS.$(BITS)) $(LD_OPTIONS)
+else
+LDFLAGS +=      $(LDFLAGS.$(BITS)) $(LD_OPTIONS:%=-Xlinker %)
+endif
 
 CONFIGURE_LIBDIR.32 = /usr/lib/samba
 CONFIGURE_LIBDIR.64 = /usr/lib/samba/$(MACH64)
@@ -144,6 +157,7 @@
 CONFIGURE_OPTIONS.32 += --with-shared-modules=vfs_zfsacl,vfs_samfs,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex
 CONFIGURE_OPTIONS.64 += --with-shared-modules=
 CONFIGURE_OPTIONS += --with-readline
+CONFIGURE_OPTIONS += --enable-cups
 CONFIGURE_OPTIONS += --with-aio-support
 CONFIGURE_OPTIONS += --with-acl-support
 CONFIGURE_OPTIONS += --with-ads
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/samba/samba/patches/0001-s3-Fix-bug-8238-KB2536276-prevents-access-to-sha.patch	Mon Aug 01 12:07:26 2011 -0700
@@ -0,0 +1,26 @@
+From 0b0c5596034a007b71785a0f36aaf40cf74b234d Mon Sep 17 00:00:00 2001
+From: Volker Lendecke <[email protected]>
+Date: Thu, 16 Jun 2011 22:20:49 +0200
+Subject: [PATCH] s3: Fix bug 8238 -- KB2536276 prevents access to shares
+
+Without this we were not sending the workgroup name in the negprot reply if
+plain text passwords are used.
+---
+ source3/smbd/negprot.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
+index 81d29d9..51ad80d 100644
+--- source3/smbd/negprot.c
++++ source3/smbd/negprot.c
+@@ -382,6 +382,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
+ 			reply_nterror(req, NT_STATUS_NO_MEMORY);
+ 			return;
+ 		}
++		p += ret;
+ 		DEBUG(3,("not using SPNEGO\n"));
+ 	} else {
+ 		DATA_BLOB spnego_blob = negprot_spnego();
+-- 
+1.5.6.5
+
--- a/components/samba/samba/samba-license	Mon Aug 01 10:13:00 2011 -0700
+++ b/components/samba/samba/samba-license	Mon Aug 01 12:07:26 2011 -0700
@@ -1,10 +1,10 @@
-For the avoidance of doubt, except that if any license choice other than
-GPL or LGPL is available it will apply instead, Oracle elects to use
-only the General Public License version 3 (GPLv3) at this time for any
-software where a choice of GPL license versions is made available with
-the language indicating that GPLv3 or any later version may be used.
-
-================================================================================
+Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+
+This package may include technology which may be subject to one or more
+of the following additional notices:
+
+Samba 3.5.10
+Oracle Internal Tracking Number 5789
 
                         GNU GENERAL PUBLIC LICENSE
                           Version 3, 29 June 2007