[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-961-g25b0c51

Michael Adam obnox at samba.org
Tue May 12 20:18:32 GMT 2009


The branch, v3-4-test has been updated
       via  25b0c51c8db62b5e7b12cab19b4dd2fa699ed67e (commit)
       via  2f63ee84f29f15b6173ffc20b7debad2b91eafe6 (commit)
       via  aca044014a7c20b1e4d9babc8710865b9b7610ce (commit)
       via  dd699425f80a1b1fa158b2386c2b10338b656298 (commit)
       via  b0a46b6abd265e484e89912eb7b9e1feb1b917c2 (commit)
       via  af5adfbd402a8d4fe31b7de5d13aa82287e88e57 (commit)
       via  acf13609039a0cd321fdfe7ce75e508036f91e5d (commit)
      from  d2ce16043ba7a0ee7368a611eacddc010d3935e0 (commit)

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


- Log -----------------------------------------------------------------
commit 25b0c51c8db62b5e7b12cab19b4dd2fa699ed67e
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 6 02:25:08 2009 +0200

    s3:loadparm: free the file_list at the start of loadparm
    
    This should reduce the waste of memory when using "config file"
    or "config backend". It also reduces the risk of triggering
    reloads due to some old unused files being checked.
    
    Michael
    (cherry picked from commit 6708b926a47b53a2984de6af9bb9d319ed6efe58)

commit 2f63ee84f29f15b6173ffc20b7debad2b91eafe6
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 6 02:09:56 2009 +0200

    s3:loadparm: refactor freeing of file_list out into free_file_lists()
    
    Michael
    (cherry picked from commit 6aef9bbbf7160cf9e79c50e13632bf29efaedb65)

commit aca044014a7c20b1e4d9babc8710865b9b7610ce
Author: Michael Adam <obnox at samba.org>
Date:   Sat May 9 00:10:51 2009 +0200

    s3:build: extend the support fo Debian GNU/kFooBar to kOpenSolaris
    
    As suggested by Robert Millan.
    
    Michael
    (cherry picked from commit 66dff4073d0013bfd11ac29e341765141393ea23)

commit dd699425f80a1b1fa158b2386c2b10338b656298
Author: Michael Adam <obnox at samba.org>
Date:   Thu Apr 30 21:59:07 2009 +0200

    s3:build: support non-linux gnu ports
    
    This is based on a patch by the debian package maintainers,
    adapted for the merged branch.
    
    Michael
    (cherry picked from commit 5fba1e938c59492872d026c452cbbf8d2239c95f)

commit b0a46b6abd265e484e89912eb7b9e1feb1b917c2
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 11 07:43:07 2009 +0200

    s3:proto.h: remove old param/params.c prototype
    
    Michael
    (cherry picked from commit a04bac71356139c62d786f6254d33bd247fb7692)

commit af5adfbd402a8d4fe31b7de5d13aa82287e88e57
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 8 15:13:21 2009 +0200

    s3:smbd: fix the fix for mapped IPv4 address handling in release_ip().
    
    It was too late... Thanks Metze for noticing.
    
    Michael
    (cherry picked from commit 7d6e4c7e950592112d09f7d98393c41e8097bba8)

commit acf13609039a0cd321fdfe7ce75e508036f91e5d
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 8 01:11:43 2009 +0200

    s3: make release_ip() call (ctdb) cope with IPv4 mapped addresses
    
    Michael
    (cherry picked from commit e86a534fa707b44baec87060745dd8a557622721)

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

Summary of changes:
 source3/configure.in     |   20 ++++++++++++++++----
 source3/include/proto.h  |    7 -------
 source3/param/loadparm.c |   36 +++++++++++++++++++++++-------------
 source3/smbd/process.c   |    9 ++++++++-
 4 files changed, 47 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index a869216..408340d 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -579,6 +579,15 @@ exit(1);
       fi
     ;;
 
+# Systems with LFS support.
+#
+    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
+	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
+	AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
+	AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
+	AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
+	;;
+
 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
 #
     *linux*)
@@ -1241,7 +1250,7 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[])
 #
 #
 case "$host_os" in
-    *linux*)
+    *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
        # glibc <= 2.3.2 has a broken getgrouplist
        AC_TRY_RUN([
 #include <unistd.h>
@@ -1540,7 +1549,10 @@ DSO_EXPORTS=""
 
   # and these are for particular systems
   case "$host_os" in
-		*linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
+		*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
+			case "$host_os" in *linux*)
+				AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;;
+			esac
 			BLDSHARED="true"
 			if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
 				LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined"
@@ -5388,7 +5400,7 @@ AC_ARG_WITH(sendfile-support,
 	AC_MSG_RESULT(yes);
 
 	case "$host_os" in
-	*linux*)
+	*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
 		AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[
 		AC_TRY_LINK([#include <sys/sendfile.h>],
 [\
@@ -5759,7 +5771,7 @@ NSSSONAMEVERSIONSUFFIX=""
 WINBIND_NSS_PTHREAD=""
 
 case "$host_os" in
-	*linux*)
+	*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
 		NSSSONAMEVERSIONSUFFIX=".2"
 		WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_linux.o"
 		;;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7166461..718e0a9 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4354,13 +4354,6 @@ int lp_min_receive_file_size(void);
 char* lp_perfcount_module(void);
 
 
-/* The following definitions come from param/params.c  */
-
-bool pm_process( const char *FileName,
-		bool (*sfunc)(const char *, void *),
-		bool (*pfunc)(const char *, const char *, void *),
-		void *userdata);
-
 /* The following definitions come from param/util.c  */
 
 uint32 get_int_param( const char* param );
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 991b653..08cd800 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -6943,6 +6943,26 @@ static void add_to_file_list(const char *fname, const char *subfname)
 }
 
 /**
+ * Free the file lists
+ */
+static void free_file_list(void)
+{
+	struct file_lists *f;
+	struct file_lists *next;
+
+	f = file_lists;
+	while( f ) {
+		next = f->next;
+		SAFE_FREE( f->name );
+		SAFE_FREE( f->subfname );
+		SAFE_FREE( f );
+		f = next;
+	}
+	file_lists = NULL;
+}
+
+
+/**
  * Utility function for outsiders to check if we're running on registry.
  */
 bool lp_config_backend_is_registry(void)
@@ -8928,21 +8948,9 @@ int load_usershare_shares(void)
 
 void gfree_loadparm(void)
 {
-	struct file_lists *f;
-	struct file_lists *next;
 	int i;
 
-	/* Free the file lists */
-
-	f = file_lists;
-	while( f ) {
-		next = f->next;
-		SAFE_FREE( f->name );
-		SAFE_FREE( f->subfname );
-		SAFE_FREE( f );
-		f = next;
-	}
-	file_lists = NULL;
+	free_file_list();
 
 	/* Free resources allocated to services */
 
@@ -9006,6 +9014,8 @@ bool lp_load_ex(const char *pszFname,
 	init_globals(! initialize_globals);
 	debug_init();
 
+	free_file_list();
+
 	if (save_defaults) {
 		init_locals();
 		lp_save_defaults();
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 9b7a38b..962b492 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1882,8 +1882,15 @@ received when we should release a specific IP
 static void release_ip(const char *ip, void *priv)
 {
 	char addr[INET6_ADDRSTRLEN];
+	char *p = addr;
 
-	if (strcmp(client_socket_addr(get_client_fd(),addr,sizeof(addr)), ip) == 0) {
+	client_socket_addr(get_client_fd(),addr,sizeof(addr));
+
+	if (strncmp("::ffff:", addr, 7) == 0) {
+		p = addr + 7;
+	}
+
+	if ((strcmp(p, ip) == 0) || ((p != addr) && strcmp(addr, ip) == 0)) {
 		/* we can't afford to do a clean exit - that involves
 		   database writes, which would potentially mean we
 		   are still running after the failover has finished -


-- 
Samba Shared Repository


More information about the samba-cvs mailing list