[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-526-gdb2acaf

Stefan Metzmacher metze at samba.org
Sun Sep 14 18:19:27 GMT 2008


The branch, v4-0-test has been updated
       via  db2acaf46fdc38078b6b28b68909e289f6c9e0ec (commit)
       via  8fd54bb55f0c23bd025d1719abcbe75c6a2ea8ac (commit)
       via  1d85e0647e287d269b3f6b534da88f497d6f76c3 (commit)
       via  ad7ed33f786124e4afbba4330201a3a6463c6f73 (commit)
       via  34ab9e5a23458c9f9845d1ff808c142cb2f1f2a4 (commit)
       via  d89b8fee5210c7b4d8fad24edea34f9732aec708 (commit)
       via  0d2fb0e280e497094a4c95f8dca1383ee1cfa982 (commit)
       via  661f8e166118d257ab32a30392cd616db097bc4c (commit)
       via  4d92e6d582a5b2094b2aaa9008a54b37ccfcc2d7 (commit)
       via  46c3fc67e91bbdb820e4bddd085933a8570e504c (commit)
       via  d61a86b8cdb4dd474611baadc61a0c37db0f8e62 (commit)
      from  2e3629719790e7631d9de383b565dc8a0997bcfb (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit db2acaf46fdc38078b6b28b68909e289f6c9e0ec
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 5 15:32:22 2008 -0700

    Remove unecessary msync.
    Jeremy.
    (cherry picked from commit 0bae1ef3de8fda5e1e2d641b14a408e627396912)

commit 8fd54bb55f0c23bd025d1719abcbe75c6a2ea8ac
Author: Simo Sorce <idra at samba.org>
Date:   Wed Sep 3 10:44:09 2008 -0400

    The msync manpage reports that msync *must* be called before munmap. Failure to do so may result in lost data. Fix an ifdef check, I really think we meant to check HAVE_MMAP here.
    (cherry picked from commit 74c8575b3f3b90ea21ae6aa7ccd95947838af956)

commit 1d85e0647e287d269b3f6b534da88f497d6f76c3
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 12 22:31:52 2008 +0200

    Attempt to fix bug 5684
    
    With the ctdb checkin dde9f3f006 tdb optimized out write lock checks for
    write-enabled transaction. Sadly, this also removed the possibility to ever
    remove dead records left over from tdb_delete calls within a transaction.
    
    Tridge, please check this! Did dde9f3f006 have any reason beyond performance
    optimizations?
    
    Thanks,
    
    Volker
    (cherry picked from commit 3f884c4ae36f3260e63626bdd4989d9258ae6497)

commit ad7ed33f786124e4afbba4330201a3a6463c6f73
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Sep 14 18:50:13 2008 +0200

    Fix warnings on SuSE 9.0.
    
    The macros "[un]likely" are already defined on SuSE 9.0.
    Patch from Volker.
    
    (partialy cherry-picked 30d181c92463aecd6e649330d3645d86d5a17e43)
    metze

commit 34ab9e5a23458c9f9845d1ff808c142cb2f1f2a4
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 19 16:56:44 2008 +0200

    Fix bug 5400
    
    Thanks to Jason Mader!
    
    Volker
    (cherry picked from commit 87d8a63ce4e6dd91ea3193d0a2574520a5857be2)

commit d89b8fee5210c7b4d8fad24edea34f9732aec708
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Sep 14 18:46:34 2008 +0200

    Fix out of tree build.  Remove the embedded srcdir path from talloc and tdb.
    (partialy cherry picked from commit 359921acd436684a0b4cf76ba15f82a224d2c337)
    metze

commit 0d2fb0e280e497094a4c95f8dca1383ee1cfa982
Author: Yannick Bergeron <yaberger at ca.ibm.com>
Date:   Fri Aug 8 13:32:15 2008 -0400

    using NGROUPS_MAX instead of 32 for the max group value in rep_initgroups() subroutine in lib/replace/replace.c
    (cherry picked from commit 13b1a232d2fe05ae3e924ea2503d05ff5084146e)

commit 661f8e166118d257ab32a30392cd616db097bc4c
Author: Yannick Bergeron <yaberger at ca.ibm.com>
Date:   Wed Aug 6 13:23:00 2008 -0400

    Solve an IBM XL C/C++ compiler error encountered in get_exit_code() auth_errors array initialization in client/smbspool.c
    (cherry picked from commit b45e7fabc64e699e4fa013ef15f98a004dae3f32)

commit 4d92e6d582a5b2094b2aaa9008a54b37ccfcc2d7
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Jul 14 16:40:36 2008 +0200

    Fix typo.
    
    retieve -> retrieve
    
    Karolin
    (partialy cherry-picked from 37c64130701ab13b6f34998ac17fec2d128c2e08)
    metze

commit 46c3fc67e91bbdb820e4bddd085933a8570e504c
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 10 16:14:30 2008 +0200

    Correctly find a [u]int32_t replacement
    (cherry picked from commit 346375cda557a675f8f882ca2ae8edffec725a72)
    (cherry picked from commit 15a53945c9563b4517bd8b69a9bb0554eef5edff)

commit d61a86b8cdb4dd474611baadc61a0c37db0f8e62
Author: Jeremy Allison <jra at samba.org>
Date:   Fri May 9 14:51:45 2008 -0700

    Fix replacement getpass. If we ^C at the prompt echo was left off.
    Jeremy.
    (cherry picked from commit e54c71954ae484fe4a4e195db33440490e78e256)

-----------------------------------------------------------------------

Summary of changes:
 source/lib/ldb/common/ldb_parse.c   |    2 +-
 source/lib/replace/getpass.c        |    7 ++-----
 source/lib/replace/libreplace_cc.m4 |   24 +++++++++++++++++-------
 source/lib/replace/replace.c        |    2 +-
 source/lib/replace/snprintf.c       |    2 +-
 source/lib/talloc/libtalloc.m4      |    8 ++++----
 source/lib/talloc/talloc.c          |   12 ++++++++++--
 source/lib/tdb/common/io.c          |    4 +++-
 source/lib/tdb/common/tdb.c         |    2 +-
 source/lib/tdb/common/transaction.c |    2 +-
 10 files changed, 41 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/ldb/common/ldb_parse.c b/source/lib/ldb/common/ldb_parse.c
index 8c970a4..b233975 100644
--- a/source/lib/ldb/common/ldb_parse.c
+++ b/source/lib/ldb/common/ldb_parse.c
@@ -323,7 +323,7 @@ static enum ldb_parse_op ldb_parse_filtertype(void *mem_ctx, char **type, char *
 
 	while (isspace((unsigned char)*p)) p++;
 
-	/* retieve value */
+	/* retrieve value */
 	t = p;
 
 	while (*p && ((*p != ')') || ((*p == ')') && (*(p - 1) == '\\')))) p++;
diff --git a/source/lib/replace/getpass.c b/source/lib/replace/getpass.c
index 73333b9..0be618f 100644
--- a/source/lib/replace/getpass.c
+++ b/source/lib/replace/getpass.c
@@ -187,10 +187,6 @@ char *rep_getpass(const char *prompt)
 		in_fd = fileno(in);
 		if (fgets(buf, bufsize, in) == NULL) {
 			buf[0] = 0;
-			if (in && in != stdin) {
-				fclose(in);
-			}
-			return buf;
 		}
 	}
 	nread = strlen(buf);
@@ -201,8 +197,9 @@ char *rep_getpass(const char *prompt)
 
 	/* Restore echoing.  */
 	if (echo_off) {
-		if (gotintr && in_fd == -1)
+		if (gotintr && in_fd == -1) {
 			in = fopen ("/dev/tty", "w+");
+		}
 		if (in != NULL)
 			tcsetattr (fileno (in), TCSANOW, &t);
 	}
diff --git a/source/lib/replace/libreplace_cc.m4 b/source/lib/replace/libreplace_cc.m4
index 0ce0958..30c63f2 100644
--- a/source/lib/replace/libreplace_cc.m4
+++ b/source/lib/replace/libreplace_cc.m4
@@ -109,25 +109,34 @@ AC_CHECK_HEADERS([standards.h])
 # Solaris needs HAVE_LONG_LONG defined
 AC_CHECK_TYPES(long long)
 
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(char)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+
 AC_CHECK_TYPE(uint_t, unsigned int)
 AC_CHECK_TYPE(int8_t, char)
 AC_CHECK_TYPE(uint8_t, unsigned char)
 AC_CHECK_TYPE(int16_t, short)
 AC_CHECK_TYPE(uint16_t, unsigned short)
+
+if test $ac_cv_sizeof_int -eq 4 ; then
+AC_CHECK_TYPE(int32_t, int)
+AC_CHECK_TYPE(uint32_t, unsigned int)
+elif test $ac_cv_size_long -eq 4 ; then
 AC_CHECK_TYPE(int32_t, long)
 AC_CHECK_TYPE(uint32_t, unsigned long)
+else
+AC_MSG_ERROR([LIBREPLACE no 32-bit type found])
+fi
+
 AC_CHECK_TYPE(int64_t, long long)
 AC_CHECK_TYPE(uint64_t, unsigned long long)
 
 AC_CHECK_TYPE(size_t, unsigned int)
 AC_CHECK_TYPE(ssize_t, int)
 
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(char)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(long long)
-
 AC_CHECK_SIZEOF(off_t)
 AC_CHECK_SIZEOF(size_t)
 AC_CHECK_SIZEOF(ssize_t)
@@ -158,7 +167,8 @@ AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[
 			FOOBAR y; 
 		} f2[] = {
 			{FOO_ONE}
-		};   
+		};
+		static const FOOBAR f3[] = {FOO_ONE};
 	],
 	libreplace_cv_immediate_structures=yes,
 	libreplace_cv_immediate_structures=no,
diff --git a/source/lib/replace/replace.c b/source/lib/replace/replace.c
index 106c9df..98d799b 100644
--- a/source/lib/replace/replace.c
+++ b/source/lib/replace/replace.c
@@ -170,7 +170,7 @@ int rep_initgroups(char *name, gid_t id)
 #include <grp.h>
 
 	gid_t *grouplst = NULL;
-	int max_gr = 32;
+	int max_gr = NGROUPS_MAX;
 	int ret;
 	int    i,j;
 	struct group *g;
diff --git a/source/lib/replace/snprintf.c b/source/lib/replace/snprintf.c
index a174dcf..c54d721 100644
--- a/source/lib/replace/snprintf.c
+++ b/source/lib/replace/snprintf.c
@@ -526,7 +526,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in
 		}
 	}
 
-	/* retieve the format arguments */
+	/* retrieve the format arguments */
 	for (pnum = 0; pnum < max_pos; pnum++) {
 		int i;
 
diff --git a/source/lib/talloc/libtalloc.m4 b/source/lib/talloc/libtalloc.m4
index d2e8eba..fd2b4b2 100644
--- a/source/lib/talloc/libtalloc.m4
+++ b/source/lib/talloc/libtalloc.m4
@@ -1,10 +1,10 @@
 dnl find the talloc sources. This is meant to work both for 
 dnl talloc standalone builds, and builds of packages using talloc
 tallocdir=""
-tallocpaths="$srcdir $srcdir/lib/talloc $srcdir/talloc $srcdir/../talloc"
+tallocpaths=". lib/talloc talloc ../talloc"
 for d in $tallocpaths; do
-	if test -f "$d/talloc.c"; then
-		tallocdir="$d"		
+	if test -f "$srcdir/$d/talloc.c"; then
+		tallocdir="$d"
 		AC_SUBST(tallocdir)
 		break;
 	fi
@@ -15,7 +15,7 @@ fi
 TALLOC_OBJ="talloc.o"
 AC_SUBST(TALLOC_OBJ)
 
-TALLOC_CFLAGS="-I$tallocdir"
+TALLOC_CFLAGS="-I$srcdir/$tallocdir"
 AC_SUBST(TALLOC_CFLAGS)
 
 TALLOC_LIBS=""
diff --git a/source/lib/talloc/talloc.c b/source/lib/talloc/talloc.c
index 12b85f5..1f7e524 100644
--- a/source/lib/talloc/talloc.c
+++ b/source/lib/talloc/talloc.c
@@ -82,11 +82,19 @@
 #if (__GNUC__ >= 3)
 /* the strange !! is to ensure that __builtin_expect() takes either 0 or 1
    as its first argument */
+#ifndef likely
 #define likely(x)   __builtin_expect(!!(x), 1)
+#endif
+#ifndef unlikely
 #define unlikely(x) __builtin_expect(!!(x), 0)
+#endif
 #else
-#define likely(x) x
-#define unlikely(x) x
+#ifndef likely
+#define likely(x) (x)
+#endif
+#ifndef unlikely
+#define unlikely(x) (x)
+#endif
 #endif
 
 /* this null_context is only used if talloc_enable_leak_report() or
diff --git a/source/lib/tdb/common/io.c b/source/lib/tdb/common/io.c
index 172ab69..661f761 100644
--- a/source/lib/tdb/common/io.c
+++ b/source/lib/tdb/common/io.c
@@ -189,7 +189,9 @@ int tdb_munmap(struct tdb_context *tdb)
 
 #ifdef HAVE_MMAP
 	if (tdb->map_ptr) {
-		int ret = munmap(tdb->map_ptr, tdb->map_size);
+		int ret;
+
+		ret = munmap(tdb->map_ptr, tdb->map_size);
 		if (ret != 0)
 			return ret;
 	}
diff --git a/source/lib/tdb/common/tdb.c b/source/lib/tdb/common/tdb.c
index 767452c..c7cec29 100644
--- a/source/lib/tdb/common/tdb.c
+++ b/source/lib/tdb/common/tdb.c
@@ -243,7 +243,7 @@ int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct
 
 	if (tdb->read_only || tdb->traverse_read) return -1;
 
-	if (tdb->traverse_write != 0 || 
+	if (((tdb->traverse_write != 0) && (!TDB_DEAD(rec))) ||
 	    tdb_write_lock_record(tdb, rec_ptr) == -1) {
 		/* Someone traversing here: mark it as dead */
 		rec->magic = TDB_DEAD_MAGIC;
diff --git a/source/lib/tdb/common/transaction.c b/source/lib/tdb/common/transaction.c
index 4e2127b..7acda64 100644
--- a/source/lib/tdb/common/transaction.c
+++ b/source/lib/tdb/common/transaction.c
@@ -563,7 +563,7 @@ static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t
 		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction: fsync failed\n"));
 		return -1;
 	}
-#ifdef MS_SYNC
+#ifdef HAVE_MMAP
 	if (tdb->map_ptr) {
 		tdb_off_t moffset = offset & ~(tdb->page_size-1);
 		if (msync(moffset + (char *)tdb->map_ptr, 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list