[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Tue Aug 20 04:59:06 MDT 2013


The branch, v4-0-test has been updated
       via  16e6631 s3-winbindd: fix fallback to ncacn_np in cm_connect_lsat().
       via  232fd8b waf: replace dependency to libintl with samba_intl
       via  202f7b9 waf: consolidate libintl related checks
       via  9a19757 waf: add --without-gettext option
       via  32dbdbe waf: fix build on AIX7
       via  af09311 s3:lib/system fix build on AIX 7
       via  0d8f04a smbd: Fix async echo handler forking (Bug 10086)
       via  830eae7 Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
       via  ec6b02d docs: Fix variable list in man vfs_crossrename.
      from  ead7d80 VERSION: Bump version number up to 4.0.10...

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


- Log -----------------------------------------------------------------
commit 16e6631da9385604f98a89a662a9b2d75affcd7c
Author: Günther Deschner <gd at samba.org>
Date:   Mon Aug 12 17:23:12 2013 +0200

    s3-winbindd: fix fallback to ncacn_np in cm_connect_lsat().
    
    Fallback to lsa named-pipe connection when tcp connection has failed twice (it
    could be a trusted domain connection where we cannot setup a secure channel).
    
    Guenther
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=9615
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=9899
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Tested-by: Christof Schmitt <christof.schmitt at us.ibm.com>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue Aug 13 20:55:33 CEST 2013 on sn-devel-104
    
    Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Tue Aug 20 12:58:03 CEST 2013 on sn-devel-104

commit 232fd8ba0aa9728a3cabd6372fc1ecaaa38d416e
Author: Christian Ambach <ambi at samba.org>
Date:   Thu Aug 1 23:00:21 2013 +0200

    waf: replace dependency to libintl with samba_intl
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Christian Ambach <ambi at samba.org>
    Autobuild-Date(master): Mon Aug 12 00:46:34 CEST 2013 on sn-devel-104
    (cherry picked from commit 20b64eae75b8809d67b8c2824616996bb4722612)
    
    The last 5 patches address bug #9911 - Build Samba 4.0.x on AIX with IBM XL
    C/C++.

commit 202f7b98abc2a01708a7ee1b1871b2e37d9beeca
Author: Christian Ambach <ambi at samba.org>
Date:   Thu Aug 1 22:28:05 2013 +0200

    waf: consolidate libintl related checks
    
    consolidate the dealing with functions from libintl and the
    handling of checking if libiconv is required or not
    to a common place in lib/replace
    
    also add a new samba_intl subsystem that has dependencies
    on the appropriate set of libraries (libintl, libintl+libiconv or none)
    that can be used as a general dependency by code that depends
    on the internationalization libraries
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 07b3a048724a6b41282e1f673aea5ce2c1202a5e)

commit 9a197573e246369b36cdcddeceb26e5d139b4adf
Author: Christian Ambach <ambi at samba.org>
Date:   Tue Jun 25 18:37:35 2013 +0200

    waf: add --without-gettext option
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit a742e87b39bed97ac59f5ec8bff9bf3cedf8b68a)

commit 32dbdbe75dfe2a34cf487395d29a7b12f6872cba
Author: Christian Ambach <ambi at samba.org>
Date:   Thu Jun 20 18:26:04 2013 +0200

    waf: fix build on AIX7
    
    the same works for AIX 5,6,7 so leave away the version specifics (as autoconf build did)
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit ce8fbdf76ee2792d011d9da4d0116f04d9656886)

commit af0931120b156092a6fece5a5b8dea210c11d803
Author: Christian Ambach <ambi at samba.org>
Date:   Thu Jun 20 18:27:13 2013 +0200

    s3:lib/system fix build on AIX 7
    
    AIX uses struct stat64 with struct timespec64, so direct assignment does
    not work any more.
    
    Pair-Programmed-With: Volker Lendecke <vl at samba.org>
    Signed-off-by: Christian Ambach <ambi at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Aug  2 09:47:43 CEST 2013 on sn-devel-104
    (cherry picked from commit ba40d0d9d320e500621a6a8107a2ef0a34aeb6ba)

commit 0d8f04a0a580daf2ac27258091b4a7fd884bab1f
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Aug 14 10:46:46 2013 +0000

    smbd: Fix async echo handler forking (Bug 10086)
    
    If SMB3 is chosen via an SMB1 negprot, we forked the echo handler because
    set_Protocol is called later, after the full protocol negotiation is done.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>

commit 830eae7d911b57533687345c3f6f66c3a1f968b1
Author: Richard Sharpe <realrichardsharpe at gmail.com>
Date:   Sun Aug 18 07:34:31 2013 -0700

    Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
    
    Windows overloads the EA Length field in the DIRECTORY INFO leves of FIND FIRST/FIND NEXT.
    
    This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or
    the EA Length if it has EAs, and is the fundamental reason you cannot have both on a
    file or folder.
    
    Signed-off-by: Richard Sharpe <rsharpe at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ec6b02db1871465ff9861fe114bb4d8538c33c88
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Aug 13 11:04:50 2013 +0200

    docs: Fix variable list in man vfs_crossrename.
    
    The varlist entries need a paragraph, otherwise the list is broken and the list
    entries end with ".RE".
    
    Fix bug #10076 - varlist in man vfs_crossrename broken.
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Aug 20 04:19:42 CEST 2013 on sn-devel-104
    (cherry picked from commit 1808316b1245290fd4a4aa87a801410899e4c1e3)

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

Summary of changes:
 buildtools/wafsamba/wscript             |    5 +++-
 docs-xml/manpages/vfs_crossrename.8.xml |   20 +++++++------
 lib/replace/wscript                     |   46 ++++++++++++++++++++++++-------
 nsswitch/wscript_build                  |    2 +-
 source3/include/ntioctl.h               |    1 +
 source3/lib/system.c                    |   15 ++++++++--
 source3/smbd/dosmode.c                  |    5 +++
 source3/smbd/negprot.c                  |    9 ++++--
 source3/smbd/trans2.c                   |   19 +++++++++----
 source3/winbindd/winbindd_cm.c          |    9 +++++-
 source3/wscript                         |    9 +++---
 source3/wscript_build                   |    2 +-
 source4/heimdal_build/wscript_build     |    4 +-
 source4/heimdal_build/wscript_configure |    4 +--
 14 files changed, 104 insertions(+), 46 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 17aef27..fe2e515 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -82,6 +82,9 @@ def set_options(opt):
                    help='additional directory to search for gettext',
                    action='store', dest='gettext_location', default='/usr/local',
                    match = ['Checking for library intl', 'Checking for header libintl.h'])
+    opt.add_option('--without-gettext',
+                   help=("Disable use of gettext"),
+                   action="store_true", dest='disable_gettext', default=False)
 
     gr = opt.option_group('developer options')
 
@@ -322,7 +325,7 @@ def configure(conf):
     else:
         conf.env.HAVE_LD_VERSION_SCRIPT = False
 
-    if sys.platform == "aix5" or sys.platform == "aix6":
+    if sys.platform.startswith('aix'):
         conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True)
         # Might not be needed if ALL_SOURCE is defined
         # conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True)
diff --git a/docs-xml/manpages/vfs_crossrename.8.xml b/docs-xml/manpages/vfs_crossrename.8.xml
index 898c2b3..3913596 100644
--- a/docs-xml/manpages/vfs_crossrename.8.xml
+++ b/docs-xml/manpages/vfs_crossrename.8.xml
@@ -37,28 +37,30 @@
 	NT_STATUS_NOT_SAME_DEVICE and the client has to move the file by
 	manual copy and delete operations. If the rename by copy is done by the
 	server this can be much more efficient. vfs_crossrename tries to do
-	this server-side cross-device rename operation. There are however
-	limitations that this module currently does not solve:
+	this server-side cross-device rename operation.
+	</para>
+
+	<para>There are however	limitations that this module currently does not
+	solve:</para>
 
 	<variablelist>
 		<varlistentry>
-		the ACLs of files are not preserved
+		<para>The ACLs of files are not preserved,</para>
 		</varlistentry>
 		<varlistentry>
-		meta data in EAs are not preserved
+		<para>meta data in EAs are not preserved,</para>
 		</varlistentry>
 		<varlistentry>
-		renames of whole subdirectories cannot be done recursively,
+		<para>renames of whole subdirectories cannot be done recursively,
 		in that case we still return STATUS_NOT_SAME_DEVICE and
-		let the client decide what to do
+		let the client decide what to do,</para>
 		</varlistentry>
 		<varlistentry>
-		rename operations of huge files can cause hangs on the
+		<para>rename operations of huge files can cause hangs on the
 		client because clients expect a rename operation to
-		return fast
+		return fast.</para>
 		</varlistentry>
 	</variablelist>
-	</para>
 
 	<para>This module is stackable.</para>
 
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 951b791..e4d8b6b 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -85,7 +85,7 @@ struct foo bar = { .y = 'X', .x = 1 };
                           sys/sockio.h sys/un.h''', together=True)
     conf.CHECK_HEADERS('sys/uio.h ifaddrs.h direct.h dirent.h')
     conf.CHECK_HEADERS('windows.h winsock2.h ws2tcpip.h')
-    conf.CHECK_HEADERS('libintl.h errno.h')
+    conf.CHECK_HEADERS('errno.h')
     conf.CHECK_HEADERS('gcrypt.h getopt.h iconv.h')
     conf.CHECK_HEADERS('sys/inotify.h memory.h nss.h sasl/sasl.h')
     conf.CHECK_HEADERS('security/pam_appl.h zlib.h asm/unistd.h')
@@ -346,17 +346,41 @@ removeea setea
                         headers='netinet/in.h arpa/nameser.h resolv.h')
 
 
-    if not conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h'):
-    # Some hosts need lib iconv for linking with lib intl
-    # So we try with flags just in case it helps.
-        oldflags = conf.env['LDFLAGS_INTL']
-        conf.env['LDFLAGS_INTL'] = "-liconv"
-        if not conf.CHECK_LIB('intl'):
-            conf.env['LDFLAGS_INTL'] = oldflags
+    conf.env.intl_libs=''
+    if not Options.options.disable_gettext:
+        conf.CHECK_HEADERS('libintl.h')
+        conf.CHECK_LIB('intl')
+        # *textdomain functions are not strictly necessary
+        conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset',
+                            '', checklibc=True, headers='libintl.h')
+        # gettext and dgettext must exist
+        # on some systems (the ones with glibc, those are in libc)
+        if conf.CHECK_FUNCS_IN('dgettext gettext', '', checklibc=True, headers='libintl.h'):
+            # save for dependency definitions
+            conf.env.intl_libs=''
+        # others (e.g. FreeBSD) have seperate libintl
+        elif conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', checklibc=False, headers='libintl.h'):
+            # save for dependency definitions
+            conf.env.intl_libs='intl'
+            # recheck with libintl
+            conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset',
+                            'intl', checklibc=False, headers='libintl.h')
         else:
-            conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h')
+            # Some hosts need lib iconv for linking with lib intl
+            # So we try with flags just in case it helps.
+            oldflags = conf.env['EXTRA_LDFLAGS'];
+            conf.env['EXTRA_LDFLAGS'].extend("-liconv")
+            conf.CHECK_FUNCS_IN('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset',
+                                'intl', checklibc=False, headers='libintl.h')
+            conf.env['EXTRA_LDFLAGS'] = oldflags
+            if conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DGETTEXT']:
+                # save for dependency definitions
+                conf.env.intl_libs='iconv intl'
+            else:
+                conf.fatal('library gettext not found, try specifying the path to ' +
+                           'it with --with-gettext=</path/to/gettext> or ' +
+                           '--without-gettext to build without''')
 
-    conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h')
     conf.CHECK_FUNCS_IN('pthread_create', 'pthread', checklibc=True, headers='pthread.h')
 
     conf.CHECK_FUNCS_IN('crypt', 'crypt', checklibc=True)
@@ -622,6 +646,8 @@ def build(bld):
                         target='stdbool.h',
                         enabled = not bld.CONFIG_SET('HAVE_STDBOOL_H'))
 
+    bld.SAMBA_SUBSYSTEM('samba_intl', source='', use_global_deps=False,deps=bld.env.intl_libs)
+
 def dist():
     '''makes a tarball for distribution'''
     samba_dist.dist()
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index a7d6489..55ba776 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -81,7 +81,7 @@ elif (host_os.rfind('aix') > -1):
 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
 	bld.SAMBA_LIBRARY('pamwinbind',
 		source='pam_winbind.c',
-		deps='intl talloc wbclient winbind-client iniparser pam',
+		deps='talloc wbclient winbind-client iniparser pam samba_intl',
 		cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
 		realname='pam_winbind.so',
 		install_path='${PAMMODULESDIR}'
diff --git a/source3/include/ntioctl.h b/source3/include/ntioctl.h
index e09e1c8..65bed64 100644
--- a/source3/include/ntioctl.h
+++ b/source3/include/ntioctl.h
@@ -26,6 +26,7 @@
 #define IO_REPARSE_TAG_MOUNT_POINT   0xA0000003
 #define IO_REPARSE_TAG_HSM           0xC0000004
 #define IO_REPARSE_TAG_SIS           0x80000007
+#define IO_REPARSE_TAG_DFS	     0x8000000A
 
 
 /* For FSCTL_GET_SHADOW_COPY_DATA ...*/
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 8dbf7dc..8252e4f 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -228,7 +228,10 @@ static struct timespec get_atimespec(const struct stat *pst)
 	return ret;
 #else
 #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
-	return pst->st_atim;
+	struct timespec ret;
+	ret.tv_sec = pst->st_atim.tv_sec;
+	ret.tv_nsec = pst->st_atim.tv_nsec;
+	return ret;
 #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
 	struct timespec ret;
 	ret.tv_sec = pst->st_atime;
@@ -263,7 +266,10 @@ static struct timespec get_mtimespec(const struct stat *pst)
 	return ret;
 #else
 #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
-	return pst->st_mtim;
+	struct timespec ret;
+	ret.tv_sec = pst->st_mtim.tv_sec;
+	ret.tv_nsec = pst->st_mtim.tv_nsec;
+	return ret;
 #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
 	struct timespec ret;
 	ret.tv_sec = pst->st_mtime;
@@ -298,7 +304,10 @@ static struct timespec get_ctimespec(const struct stat *pst)
 	return ret;
 #else
 #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
-	return pst->st_ctim;
+	struct timespec ret;
+	ret.tv_sec = pst->st_ctim.tv_sec;
+	ret.tv_nsec = pst->st_ctim.tv_nsec;
+	return ret;
 #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
 	struct timespec ret;
 	ret.tv_sec = pst->st_ctime;
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 3152631..677b18c 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -495,6 +495,11 @@ uint32 dos_mode_msdfs(connection_struct *conn,
 
 	result = filter_mode_by_protocol(result);
 
+	/*
+	 * Add in that it is a reparse point
+	 */
+	result |= FILE_ATTRIBUTE_REPARSE_POINT;
+
 	DEBUG(8,("dos_mode_msdfs returning "));
 
 	if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h"));
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index cfe0983..315bd89 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -497,6 +497,7 @@ static const struct {
 void reply_negprot(struct smb_request *req)
 {
 	int choice= -1;
+	int chosen_level = -1;
 	int protocol;
 	const char *p;
 	int arch = ARCH_ALL;
@@ -653,8 +654,10 @@ void reply_negprot(struct smb_request *req)
 		if ((supported_protocols[protocol].protocol_level <= lp_srv_maxprotocol()) &&
 				(supported_protocols[protocol].protocol_level >= lp_srv_minprotocol()))
 			while (i < num_cliprotos) {
-				if (strequal(cliprotos[i],supported_protocols[protocol].proto_name))
+				if (strequal(cliprotos[i],supported_protocols[protocol].proto_name)) {
 					choice = i;
+					chosen_level = supported_protocols[protocol].protocol_level;
+				}
 				i++;
 			}
 		if(choice != -1)
@@ -675,14 +678,14 @@ void reply_negprot(struct smb_request *req)
 	DEBUG( 5, ( "negprot index=%d\n", choice ) );
 
 	if ((lp_server_signing() == SMB_SIGNING_REQUIRED)
-	    && (get_Protocol() < PROTOCOL_NT1)) {
+	    && (chosen_level < PROTOCOL_NT1)) {
 		exit_server_cleanly("SMB signing is required and "
 			"client negotiated a downlevel protocol");
 	}
 
 	TALLOC_FREE(cliprotos);
 
-	if (lp_async_smb_echo_handler() && (get_Protocol() < PROTOCOL_SMB2_02) &&
+	if (lp_async_smb_echo_handler() && (chosen_level < PROTOCOL_SMB2_02) &&
 	    !fork_echo_handler(sconn)) {
 		exit_server("Failed to fork echo handler");
 	}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 6500040..5031442 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -24,6 +24,7 @@
 */
 
 #include "includes.h"
+#include "ntioctl.h"
 #include "system/filesys.h"
 #include "version.h"
 #include "smbd/smbd.h"
@@ -1876,12 +1877,14 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
 		SOFF_T(p,0,allocation_size); p += 8;
 		SIVAL(p,0,mode); p += 4;
 		q = p; p += 4; /* q is placeholder for name length. */
-		{
+		if (mode & FILE_ATTRIBUTE_REPARSE_POINT) {
+			SIVAL(p, 0, IO_REPARSE_TAG_DFS);
+		} else {
 			unsigned int ea_size = estimate_ea_size(conn, NULL,
 								smb_fname);
 			SIVAL(p,0,ea_size); /* Extended attributes */
-			p += 4;
 		}
+		p += 4;
 		/* Clear the short name buffer. This is
 		 * IMPORTANT as not doing so will trigger
 		 * a Win2k client bug. JRA.
@@ -2053,12 +2056,14 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
 		SOFF_T(p,0,allocation_size); p += 8;
 		SIVAL(p,0,mode); p += 4;
 		q = p; p += 4; /* q is placeholder for name length. */
-		{
+		if (mode & FILE_ATTRIBUTE_REPARSE_POINT) {
+			SIVAL(p, 0, IO_REPARSE_TAG_DFS);
+		} else {
 			unsigned int ea_size = estimate_ea_size(conn, NULL,
 								smb_fname);
 			SIVAL(p,0,ea_size); /* Extended attributes */
-			p +=4;
 		}
+		p += 4;
 		SIVAL(p,0,0); p += 4; /* Unknown - reserved ? */
 		SBVAL(p,0,file_index); p += 8;
 		len = srvstr_push(base_data, flags2, p,
@@ -2099,12 +2104,14 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
 		SOFF_T(p,0,allocation_size); p += 8;
 		SIVAL(p,0,mode); p += 4;
 		q = p; p += 4; /* q is placeholder for name length */
-		{
+		if (mode & FILE_ATTRIBUTE_REPARSE_POINT) {
+			SIVAL(p, 0, IO_REPARSE_TAG_DFS);
+		} else {
 			unsigned int ea_size = estimate_ea_size(conn, NULL,
 								smb_fname);
 			SIVAL(p,0,ea_size); /* Extended attributes */
-			p +=4;
 		}
+		p += 4;
 		/* Clear the short name buffer. This is
 		 * IMPORTANT as not doing so will trigger
 		 * a Win2k client bug. JRA.
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 38c2f7d..e7b0d93 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -2586,11 +2586,16 @@ NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
 			invalidate_cm_connection(&domain->conn);
 			status = cm_connect_lsa_tcp(domain, mem_ctx, cli);
 		}
-		if (!NT_STATUS_IS_OK(status)) {
+		if (NT_STATUS_IS_OK(status)) {
 			return status;
 		}
 
-		return NT_STATUS_OK;
+		/*
+		 * we tried twice to connect via ncan_ip_tcp and schannel and
+		 * failed - maybe it is a trusted domain we can't connect to ?
+		 * do not try tcp next time - gd
+		 */
+		domain->can_do_ncacn_ip_tcp = false;
 	}
 
 	status = cm_connect_lsa(domain, mem_ctx, cli, lsa_policy);
diff --git a/source3/wscript b/source3/wscript
index 00432c4..1a862d2 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -94,7 +94,6 @@ def configure(conf):
     conf.CHECK_FUNCS('memalign posix_memalign hstrerror')
     conf.CHECK_FUNCS('shmget')
     conf.CHECK_FUNCS_IN('shm_open', 'rt', checklibc=True)
-    conf.CHECK_FUNCS('gettext dgettext bindtextdomain textdomain bind_textdomain_codeset')
     #FIXME: for some reason this one still fails
     conf.CHECK_FUNCS_IN('yp_get_default_domain', 'nsl')
     conf.CHECK_FUNCS_IN('dn_expand _dn_expand __dn_expand', 'resolv')
@@ -327,8 +326,8 @@ if (0) {
 
     conf.CHECK_FUNCS('''
 _acl __acl atexit 
-bindtextdomain _chdir __chdir chflags chmod _close __close _closedir
-__closedir crypt16 devnm dgettext dirfd
+ _chdir __chdir chflags chmod _close __close _closedir
+__closedir crypt16 devnm dirfd
 DNSServiceRegister _dup __dup _dup2 __dup2 endmntent execl
 _facl __facl _fchdir
 __fchdir fchmod fchown _fcntl __fcntl fcvt fcvtl fdatasync
@@ -337,7 +336,7 @@ fsetxattr _fstat __fstat fsync
 futimens futimes __fxstat getauthuid
 getcwd _getcwd __getcwd getdents __getdents getdirentries
 getgrent getgrnam getgrouplist getgrset getmntent getpagesize
-getpwanam getpwent_r getrlimit gettext
+getpwanam getpwent_r getrlimit
 glob grantpt hstrerror initgroups innetgr
 llseek _llseek __llseek _lseek __lseek
 _lstat __lstat lutimes
@@ -353,7 +352,7 @@ setmntent setpgid setpriv setsid setuidx
 shmget shm_open sigaction sigblock sigprocmask sigset
 _stat __stat statvfs
 strcasecmp strchr strpbrk strsignal strtol strupr sysconf sysctl sysctlbyname
-__sys_llseek syslog _telldir __telldir textdomain timegm
+__sys_llseek syslog _telldir __telldir timegm
 utimensat vsyslog _write __write __xstat
 ''')
 
diff --git a/source3/wscript_build b/source3/wscript_build
index 9997194..924bde7 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1287,7 +1287,7 @@ bld.SAMBA3_BINARY('net',
                  talloc
                  netapi
                  addns
-                 intl
+                 samba_intl
                  popt_samba3
                  pdb
                  libsmb
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index d9fc9e3..082b1d0 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -670,7 +670,7 @@ if not bld.CONFIG_SET("USING_SYSTEM_KRB5"):
     HEIMDAL_LIBRARY('krb5', KRB5_SOURCE,
         version_script='lib/krb5/version-script.map',
                         includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
-                deps='roken wind asn1 hx509 hcrypto intl com_err HEIMDAL_CONFIG heimbase execinfo',
+                deps='roken wind asn1 hx509 hcrypto com_err HEIMDAL_CONFIG heimbase execinfo samba_intl',
                 vnum='26.0.0',
                         )
     KRB5_PROTO_SOURCE = KRB5_SOURCE + ['lib/krb5/expand_path.c', 'lib/krb5/plugin.c', 'lib/krb5/context.c']
@@ -894,7 +894,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_COM_ERR'):
     HEIMDAL_LIBRARY('com_err',
         'lib/com_err/com_err.c lib/com_err/error.c',
         includes='../heimdal/lib/com_err',
-        deps='roken intl',
+        deps='roken samba_intl',
         vnum='0.25',
         version_script='lib/com_err/version-script.map',
         )
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 2bb465a..bed63d6 100755
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -19,7 +19,7 @@ conf.CHECK_HEADERS('ifaddrs.h')
 conf.CHECK_HEADERS('''crypt.h errno.h inttypes.h netdb.h signal.h sys/bswap.h
                   sys/file.h sys/stropts.h sys/timeb.h sys/times.h sys/uio.h sys/un.h
               sys/utsname.h time.h timezone.h ttyname.h netinet/in.h
-              netinet/in6.h netinet6/in6.h libintl.h''')
+              netinet/in6.h netinet6/in6.h''')
 
 conf.CHECK_HEADERS('curses.h term.h termcap.h', together=True)
 
@@ -42,8 +42,6 @@ conf.CHECK_FUNCS_IN('''getnameinfo sendmsg socket getipnodebyname gethostent get
                     'socket nsl',
                     checklibc=True)
 
-conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h')
-
 conf.CHECK_FUNCS('iruserok')
 
 conf.CHECK_FUNCS('bswap16')


-- 
Samba Shared Repository


More information about the samba-cvs mailing list