Rev 5372: merge from upstream in	http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/ At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/ ------------------------------------------------------------ revno: 5372 revision-id: ma@sernet.de-20070418202137-d18e314f5670f77b parent: ma@sernet.de-20070418201624-44864fb7d8f026fb parent: jerry@samba.org-20070418170336-xa1273iy55qd0ptu committer: Michael Adam  branch nick: SAMBA_3_0-registry.bzr timestamp: Wed 2007-04-18 22:21:37 +0200 message:   merge from upstream modified:   REVISION                       REVISION-20060530022625-68239662668b41c3   make-tarball.sh                maketarball.sh-20060530022625-59649e9787ac3704   source/nsswitch/idmap_ldap.c   idmap_ldap.c-20061212152804-ho38ifnk7se3gdfx-1     ------------------------------------------------------------     merged: jerry@samba.org-20070418170336-xa1273iy55qd0ptu     parent: obnox@samba.org-20070418170155-rf9du1t9lbross32     committer: jerry@samba.org     branch nick: SAMBA_3_0.bzr     timestamp: Wed 2007-04-18 12:03:36 -0500     message:       jerry@samba.org (r22340)  2007-04-18 11:45:00 -0500 (Wed, 18 Apr 2007)                      Fix another segfault in idmap_ldap.c caused by setting the iterator           LDAPMessage * to NULL on each loop rotation.                           ------------------------------------------------------------     merged: obnox@samba.org-20070418170155-rf9du1t9lbross32     parent: jra@samba.org-20070418050155-9pwpbark0woks5q6     committer: obnox@samba.org     branch nick: SAMBA_3_0.bzr     timestamp: Wed 2007-04-18 12:01:55 -0500     message:       obnox@samba.org (r22330)  2007-04-18 06:12:31 -0500 (Wed, 18 Apr 2007)                      For my own convenience (changes discussed some weeks ago with           Jerry, who basically didn't care - now I can commit them myself;-):                      - Add a call to mkversion.sh to ensure sane version number even           from a plain checkout.           - Add a "nodocs" switch to allow for calling make-tarball.sh without           the need of having samba-docs and using-samba around.                       === modified file 'REVISION' --- a/REVISION	2007-04-18 05:01:55 +0000 +++ b/REVISION	2007-04-18 17:03:36 +0000 @@ -2,9 +2,9 @@  URL: svn+ssh://svn.samba.org/home/svn/samba/branches/SAMBA_3_0  Repository Root: svn+ssh://svn.samba.org/home/svn/samba  Repository UUID: 0c0555d6-39d7-0310-84fc-f1cc0bd64818 -Revision: 22327 +Revision: 22340  Node Kind: directory -Last Changed Author: jra -Last Changed Rev: 22327 -Last Changed Date: 2007-04-17 19:34:10 -0500 (Tue, 17 Apr 2007) +Last Changed Author: jerry +Last Changed Rev: 22340 +Last Changed Date: 2007-04-18 11:45:00 -0500 (Wed, 18 Apr 2007)   === modified file 'make-tarball.sh' --- a/make-tarball.sh	2006-05-30 02:26:57 +0000 +++ b/make-tarball.sh	2007-04-18 17:01:55 +0000 @@ -4,35 +4,43 @@  ## You either need to include the using_samba cvs module in the  ## parent directory or tell the script where to find it   ## -## Usgae:  ./make-tarball.sh +## Usgae:  ./make-tarball.sh [nodocs] + +NODOCS=0 +if [ x"$1" = x"nodocs" ] ; then +	NODOCS=1 +	echo Not including docs. +fi    DOCSDIR=../samba-docs/  USING_SAMBA=../using_samba/  SRCDIR=`pwd`   -if [ ! -d $USING_SAMBA ]; then - -	echo Cannot find "Using Samba" directory \\(assuming $USING_SAMBA\\).   -	echo Please set the USING_SAMBA variable in this script to the correct -	echo location.  The html files are available in the using_samba CVS  -	echo module on cvs.samba.org.  See http://cvs/samba.org/ for details  -	echo about anonymous CVS access.  Exiting now.... - -	exit 1 - -fi - -if [ ! -d $DOCSDIR ]; then - -	echo Cannot find samba-docs \\(assuming $DOCSDIR\\). -	echo Please set the DOCSDIR variable in this script  -	echo to the correct path. - -	exit 1 - -fi - - +if [ $NODOCS -eq 0 ]; then +	if [ ! -d $USING_SAMBA ]; then +	 +		echo Cannot find "Using Samba" directory \\(assuming $USING_SAMBA\\).   +		echo Please set the USING_SAMBA variable in this script to the correct +		echo location.  The html files are available in the using_samba CVS  +		echo module on cvs.samba.org.  See http://cvs.samba.org/ for details  +		echo about anonymous CVS access.  Exiting now.... +	 +		exit 1 +	 +	fi +	 +	if [ ! -d $DOCSDIR ]; then +	 +		echo Cannot find samba-docs \\(assuming $DOCSDIR\\). +		echo Please set the DOCSDIR variable in this script  +		echo to the correct path. +	 +		exit 1 +	 +	fi +fi + +( cd source ; sh script/mkversion.sh )  VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING source/include/version.h | cut -d\\" -f2 | sed 's/ /_/g'`  TARBALLDIR=/tmp/samba-$VERSION   @@ -44,8 +52,10 @@  mkdir $TARBALLDIR  rsync -aC ./ $TARBALLDIR  /bin/rm -rf $TARBALLDIR/docs/* -rsync -aC $DOCSDIR/ $TARBALLDIR/docs/  -rsync -aC $USING_SAMBA $TARBALLDIR/docs/htmldocs/ +if [ $NODOCS -eq 0 ]; then +	rsync -aC $DOCSDIR/ $TARBALLDIR/docs/  +	rsync -aC $USING_SAMBA $TARBALLDIR/docs/htmldocs/ +fi    echo Creating packaging scripts...  ( cd $TARBALLDIR/packaging; sh bin/update-pkginfo $VERSION 1 ) === modified file 'source/nsswitch/idmap_ldap.c' --- a/source/nsswitch/idmap_ldap.c	2007-03-11 17:02:04 +0000 +++ b/source/nsswitch/idmap_ldap.c	2007-04-18 17:03:36 +0000 @@ -1028,6 +1028,7 @@    static NTSTATUS idmap_ldap_sids_to_unixids(struct idmap_domain *dom, struct id_map **ids)  { +       	LDAPMessage *entry = NULL;  	NTSTATUS ret;  	TALLOC_CTX *memctx;  	struct idmap_ldap_context *ctx; @@ -1108,7 +1109,6 @@  	}    	for (i = 0; i < count; i++) { -		LDAPMessage *entry = NULL;  		char *sidstr = NULL;  		char *tmp = NULL;  		enum id_type type;