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

Karolin Seeger kseeger at samba.org
Mon Jun 4 12:21:03 UTC 2018


The branch, v4-7-test has been updated
       via  f156d20 lib/util: Call log_stack_trace() in smb_panic_default()
       via  0dc4806 lib/util: Move log_stack_trace() to common code
       via  67d037c lib/util: Log PANIC before calling pacic action just like s3
       via  8f9be61 s3-lib: Remove support for libexc for IRIX backtraces
       via  e322613 s3:utils: Do not segfault on error in DoDNSUpdate()
       via  e8489ae auth/ntlmssp: fix handling of GENSEC_FEATURE_LDAP_STYLE as a server
       via  7731ad2 s4:selftest: run test_ldb_simple.sh with more auth options
       via  0edc63e auth/ntlmssp: add ntlmssp_client:ldap_style_send_seal option
      from  603bc01 s3:smbd: fix interaction between chown and SD flags

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-7-test


- Log -----------------------------------------------------------------
commit f156d2039653a59d675a962495213e7417f03116
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 10 16:37:45 2018 +1200

    lib/util: Call log_stack_trace() in smb_panic_default()
    
    This matches the AD DC with the behaviour in smbd.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Apr 11 04:03:07 CEST 2018 on sn-devel-144
    
    (cherry picked from commit 462eb4a44cc51dc17aebbcd5c609c9ff7f088554)
    
    Autobuild-User(v4-7-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-7-test): Mon Jun  4 14:20:17 CEST 2018 on sn-devel-144

commit 0dc480678749484819c72533c0e00552627ab262
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 10 16:35:07 2018 +1200

    lib/util: Move log_stack_trace() to common code
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454
    (cherry picked from commit bf9551902afdb32310db4a3381964c435dd08bf0)

commit 67d037c58f93845640cfff792686d4797cb86a7c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 10 16:06:12 2018 +1200

    lib/util: Log PANIC before calling pacic action just like s3
    
    This is like the changes made in s3 by
    4fa555980070d78b39711ef21d77628d26055bc2
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454
    (cherry picked from commit 3acc00b6808d5d5ad035d9d43526204db1608c8a)

commit 8f9be615515622738fbc7175a44902679f2187d7
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 10 15:54:10 2018 +1200

    s3-lib: Remove support for libexc for IRIX backtraces
    
    IRIX is long dead, and this code needs become_root() which is not in
    the top level code.
    
    Additionally, the check for libexc never made it into waf, so this
    has been dead code since Samba 4.1.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454
    (cherry picked from commit 85dc9ee14023a8fb84b5c74555d43008bb6bb0c0)

commit e322613d518953dfe725a8d6c0c35c8cd73c8dbb
Author: Andreas Schneider <asn at samba.org>
Date:   Thu May 17 11:53:18 2018 +0200

    s3:utils: Do not segfault on error in DoDNSUpdate()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13440
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    (cherry picked from commit cdd98aa1e2116fb97e16718d115ee883fe1bc8ba)

commit e8489ae8538a06fb224e8af9e45da43fecaef316
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon May 7 14:50:27 2018 +0200

    auth/ntlmssp: fix handling of GENSEC_FEATURE_LDAP_STYLE as a server
    
    This fixes "NTLMSSP NTLM2 packet check failed due to invalid signature!"
    error messages, which were generated if the client only sends
    NTLMSSP_NEGOTIATE_SIGN without NTLMSSP_NEGOTIATE_SEAL on an LDAP
    connection.
    
    This fixes a regession in the combination of commits
    77adac8c3cd2f7419894d18db735782c9646a202 and
    3a0b835408a6efa339e8b34333906bfe3aacd6e3.
    
    We need to evaluate GENSEC_FEATURE_LDAP_STYLE at the end
    of the authentication (as a server, while we already
    do so at the beginning as a client).
    
    As a reminder I introduced GENSEC_FEATURE_LDAP_STYLE
    (as an internal flag) in order to let us work as a
    Windows using NTLMSSP for LDAP. Even if only signing is
    negotiated during the authentication the following PDUs
    will still be encrypted if NTLMSSP is used. This is exactly the
    same as if the client would have negotiated NTLMSSP_NEGOTIATE_SEAL.
    I guess it's a bug in Windows, but we have to reimplement that
    bug. Note this only applies to NTLMSSP and only to LDAP!
    Signing only works fine for LDAP with Kerberos
    or DCERPC and NTLMSSP.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13427
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed May 16 03:26:03 CEST 2018 on sn-devel-144
    
    (cherry picked from commit c7a3ce95ac4ce837d8fde36578b3b1f56c3ac2fa)

commit 7731ad2c458b5d6650797b01367f4d2aa90e830a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 9 13:33:05 2018 +0200

    s4:selftest: run test_ldb_simple.sh with more auth options
    
    This demonstrates the broken GENSEC_FEATURE_LDAP_STYLE
    handling in our LDAP server.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13427
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit fc1c5bd3be2c3f90eab2f31e43cf053f7ff13782)

commit 0edc63eb76fbc094085d8599b0b656359517affd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 9 13:30:13 2018 +0200

    auth/ntlmssp: add ntlmssp_client:ldap_style_send_seal option
    
    This will be used to similate a Windows client only
    using NTLMSSP_NEGOTIATE_SIGN without NTLMSSP_NEGOTIATE_SEAL
    on an LDAP connection, which is indicated internally by
    GENSEC_FEATURE_LDAP_STYLE.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13427
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 7f2bebf09cd8056b3f901dd9ff1fc9e9525f3e9d)

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

Summary of changes:
 auth/ntlmssp/gensec_ntlmssp_server.c |  19 -----
 auth/ntlmssp/ntlmssp_client.c        |  24 ++++--
 auth/ntlmssp/ntlmssp_server.c        |   8 ++
 lib/util/fault.c                     | 107 ++++++++++++++++++++++++++-
 lib/util/fault.h                     |   1 +
 lib/util/wscript_configure           |   1 +
 source3/include/local.h              |   3 -
 source3/include/proto.h              |   1 -
 source3/lib/util.c                   | 139 -----------------------------------
 source3/utils/net_dns.c              |   1 +
 source3/wscript                      |   2 +-
 source4/selftest/tests.py            |   7 ++
 12 files changed, 142 insertions(+), 171 deletions(-)


Changeset truncated at 500 lines:

diff --git a/auth/ntlmssp/gensec_ntlmssp_server.c b/auth/ntlmssp/gensec_ntlmssp_server.c
index 561c7cf..a8ca295 100644
--- a/auth/ntlmssp/gensec_ntlmssp_server.c
+++ b/auth/ntlmssp/gensec_ntlmssp_server.c
@@ -176,25 +176,6 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
 	ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
 	ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SEAL;
 
-	if (gensec_security->want_features & GENSEC_FEATURE_SESSION_KEY) {
-		ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
-	}
-	if (gensec_security->want_features & GENSEC_FEATURE_SIGN) {
-		ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
-
-		if (gensec_security->want_features & GENSEC_FEATURE_LDAP_STYLE) {
-			/*
-			 * We need to handle NTLMSSP_NEGOTIATE_SIGN as
-			 * NTLMSSP_NEGOTIATE_SEAL if GENSEC_FEATURE_LDAP_STYLE
-			 * is requested.
-			 */
-			ntlmssp_state->force_wrap_seal = true;
-		}
-	}
-	if (gensec_security->want_features & GENSEC_FEATURE_SEAL) {
-		ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
-		ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SEAL;
-	}
 
 	if (role == ROLE_STANDALONE) {
 		ntlmssp_state->server.is_standalone = true;
diff --git a/auth/ntlmssp/ntlmssp_client.c b/auth/ntlmssp/ntlmssp_client.c
index 5edd5f4..6e919cc 100644
--- a/auth/ntlmssp/ntlmssp_client.c
+++ b/auth/ntlmssp/ntlmssp_client.c
@@ -862,13 +862,23 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
 			 * is requested.
 			 */
 			ntlmssp_state->force_wrap_seal = true;
-			/*
-			 * We want also work against old Samba servers
-			 * which didn't had GENSEC_FEATURE_LDAP_STYLE
-			 * we negotiate SEAL too. We may remove this
-			 * in a few years. As all servers should have
-			 * GENSEC_FEATURE_LDAP_STYLE by then.
-			 */
+		}
+	}
+	if (ntlmssp_state->force_wrap_seal) {
+		bool ret;
+
+		/*
+		 * We want also work against old Samba servers
+		 * which didn't had GENSEC_FEATURE_LDAP_STYLE
+		 * we negotiate SEAL too. We may remove this
+		 * in a few years. As all servers should have
+		 * GENSEC_FEATURE_LDAP_STYLE by then.
+		 */
+		ret = gensec_setting_bool(gensec_security->settings,
+					  "ntlmssp_client",
+					  "ldap_style_send_seal",
+					  true);
+		if (ret) {
 			ntlmssp_state->required_flags |= NTLMSSP_NEGOTIATE_SEAL;
 		}
 	}
diff --git a/auth/ntlmssp/ntlmssp_server.c b/auth/ntlmssp/ntlmssp_server.c
index e17074e..42f72ff 100644
--- a/auth/ntlmssp/ntlmssp_server.c
+++ b/auth/ntlmssp/ntlmssp_server.c
@@ -976,6 +976,14 @@ static NTSTATUS ntlmssp_server_postauth(struct gensec_security *gensec_security,
 	data_blob_free(&ntlmssp_state->challenge_blob);
 
 	if (gensec_ntlmssp_have_feature(gensec_security, GENSEC_FEATURE_SIGN)) {
+		if (gensec_security->want_features & GENSEC_FEATURE_LDAP_STYLE) {
+			/*
+			 * We need to handle NTLMSSP_NEGOTIATE_SIGN as
+			 * NTLMSSP_NEGOTIATE_SEAL if GENSEC_FEATURE_LDAP_STYLE
+			 * is requested.
+			 */
+			ntlmssp_state->force_wrap_seal = true;
+		}
 		nt_status = ntlmssp_sign_init(ntlmssp_state);
 	}
 
diff --git a/lib/util/fault.c b/lib/util/fault.c
index 54d8471..1b56361 100644
--- a/lib/util/fault.c
+++ b/lib/util/fault.c
@@ -3,6 +3,7 @@
    Critical Fault handling
    Copyright (C) Andrew Tridgell 1992-1998
    Copyright (C) Tim Prouty 2009
+   Copyright (C) James Peach 2006
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -123,6 +124,10 @@ _PUBLIC_ const char *panic_action = NULL;
 static void smb_panic_default(const char *why) _NORETURN_;
 static void smb_panic_default(const char *why)
 {
+	DBG_ERR("PANIC (pid %llu): %s\n",
+		    (unsigned long long)getpid(), why);
+	log_stack_trace();
+
 #if defined(HAVE_PRCTL) && defined(PR_SET_PTRACER)
 	/*
 	 * Make sure all children can attach a debugger.
@@ -148,7 +153,6 @@ static void smb_panic_default(const char *why)
 					  WEXITSTATUS(result)));
 		}
 	}
-	DEBUG(0,("PANIC: %s\n", why));
 
 #ifdef SIGABRT
 	CatchSignal(SIGABRT, SIG_DFL);
@@ -168,3 +172,104 @@ _PUBLIC_ void smb_panic(const char *why)
 	}
 	smb_panic_default(why);
 }
+
+/*******************************************************************
+ Print a backtrace of the stack to the debug log. This function
+ DELIBERATELY LEAKS MEMORY. The expectation is that you should
+ exit shortly after calling it.
+********************************************************************/
+
+/* Buffer size to use when printing backtraces */
+#define BACKTRACE_STACK_SIZE 64
+
+
+#ifdef HAVE_LIBUNWIND_H
+#include <libunwind.h>
+#endif
+
+#ifdef HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
+
+void log_stack_trace(void)
+{
+#ifdef HAVE_LIBUNWIND
+	/* Try to use libunwind before any other technique since on ia64
+	 * libunwind correctly walks the stack in more circumstances than
+	 * backtrace.
+	 */
+	unw_cursor_t cursor;
+	unw_context_t uc;
+	unsigned i = 0;
+
+	char procname[256];
+	unw_word_t ip, sp, off;
+
+	procname[sizeof(procname) - 1] = '\0';
+
+	if (unw_getcontext(&uc) != 0) {
+		goto libunwind_failed;
+	}
+
+	if (unw_init_local(&cursor, &uc) != 0) {
+		goto libunwind_failed;
+	}
+
+	DEBUG(0, ("BACKTRACE:\n"));
+
+	do {
+	    ip = sp = 0;
+	    unw_get_reg(&cursor, UNW_REG_IP, &ip);
+	    unw_get_reg(&cursor, UNW_REG_SP, &sp);
+
+	    switch (unw_get_proc_name(&cursor,
+			procname, sizeof(procname) - 1, &off) ) {
+	    case 0:
+		    /* Name found. */
+	    case -UNW_ENOMEM:
+		    /* Name truncated. */
+		    DEBUGADD(0, (" #%u %s + %#llx [ip=%#llx] [sp=%#llx]\n",
+			    i, procname, (long long)off,
+			    (long long)ip, (long long) sp));
+		    break;
+	    default:
+	    /* case -UNW_ENOINFO: */
+	    /* case -UNW_EUNSPEC: */
+		    /* No symbol name found. */
+		    DEBUGADD(0, (" #%u %s [ip=%#llx] [sp=%#llx]\n",
+			    i, "<unknown symbol>",
+			    (long long)ip, (long long) sp));
+	    }
+	    ++i;
+	} while (unw_step(&cursor) > 0);
+
+	return;
+
+libunwind_failed:
+	DEBUG(0, ("unable to produce a stack trace with libunwind\n"));
+
+#elif HAVE_BACKTRACE_SYMBOLS
+	void *backtrace_stack[BACKTRACE_STACK_SIZE];
+	size_t backtrace_size;
+	char **backtrace_strings;
+
+	/* get the backtrace (stack frames) */
+	backtrace_size = backtrace(backtrace_stack,BACKTRACE_STACK_SIZE);
+	backtrace_strings = backtrace_symbols(backtrace_stack, backtrace_size);
+
+	DEBUG(0, ("BACKTRACE: %lu stack frames:\n",
+		  (unsigned long)backtrace_size));
+
+	if (backtrace_strings) {
+		int i;
+
+		for (i = 0; i < backtrace_size; i++)
+			DEBUGADD(0, (" #%u %s\n", i, backtrace_strings[i]));
+
+		/* Leak the backtrace_strings, rather than risk what free() might do */
+	}
+
+#else
+	DEBUG(0, ("unable to produce a stack trace on this platform\n"));
+#endif
+}
diff --git a/lib/util/fault.h b/lib/util/fault.h
index 0ac6cb9..dfa339b 100644
--- a/lib/util/fault.h
+++ b/lib/util/fault.h
@@ -53,5 +53,6 @@ void fault_setup(void);
 void fault_setup_disable(void);
 _NORETURN_ void smb_panic(const char *reason);
 
+void log_stack_trace(void);
 
 #endif /* _SAMBA_FAULT_H_ */
diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure
index 7c17633..afc06c1 100644
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
@@ -6,6 +6,7 @@ if Options.options.disable_fault_handling:
 
 # backtrace could be in libexecinfo or in libc
 conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h')
+conf.CHECK_HEADERS('execinfo.h libunwind.h')
 
 conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h')
 
diff --git a/source3/include/local.h b/source3/include/local.h
index 7f97d4e..c2be1ff 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -172,9 +172,6 @@
 /* Number in seconds for winbindd to wait for the mutex. Make this 2 * smbd wait time. */
 #define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2)
 
-/* Buffer size to use when printing backtraces */
-#define BACKTRACE_STACK_SIZE 64
-
 /* size of listen() backlog in smbd */
 #define SMBD_LISTEN_BACKLOG 50
 
diff --git a/source3/include/proto.h b/source3/include/proto.h
index b2c3a03..d01f16e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -360,7 +360,6 @@ char *gidtoname(gid_t gid);
 uid_t nametouid(const char *name);
 gid_t nametogid(const char *name);
 void smb_panic_s3(const char *why);
-void log_stack_trace(void);
 const char *readdirname(DIR *p);
 bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive);
 void set_namearray(name_compare_entry **ppname_array, const char *namelist);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index ae9fe71..5f786f9 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -839,145 +839,6 @@ void smb_panic_s3(const char *why)
 }
 
 /*******************************************************************
- Print a backtrace of the stack to the debug log. This function
- DELIBERATELY LEAKS MEMORY. The expectation is that you should
- exit shortly after calling it.
-********************************************************************/
-
-#ifdef HAVE_LIBUNWIND_H
-#include <libunwind.h>
-#endif
-
-#ifdef HAVE_EXECINFO_H
-#include <execinfo.h>
-#endif
-
-#ifdef HAVE_LIBEXC_H
-#include <libexc.h>
-#endif
-
-void log_stack_trace(void)
-{
-#ifdef HAVE_LIBUNWIND
-	/* Try to use libunwind before any other technique since on ia64
-	 * libunwind correctly walks the stack in more circumstances than
-	 * backtrace.
-	 */ 
-	unw_cursor_t cursor;
-	unw_context_t uc;
-	unsigned i = 0;
-
-	char procname[256];
-	unw_word_t ip, sp, off;
-
-	procname[sizeof(procname) - 1] = '\0';
-
-	if (unw_getcontext(&uc) != 0) {
-		goto libunwind_failed;
-	}
-
-	if (unw_init_local(&cursor, &uc) != 0) {
-		goto libunwind_failed;
-	}
-
-	DEBUG(0, ("BACKTRACE:\n"));
-
-	do {
-	    ip = sp = 0;
-	    unw_get_reg(&cursor, UNW_REG_IP, &ip);
-	    unw_get_reg(&cursor, UNW_REG_SP, &sp);
-
-	    switch (unw_get_proc_name(&cursor,
-			procname, sizeof(procname) - 1, &off) ) {
-	    case 0:
-		    /* Name found. */
-	    case -UNW_ENOMEM:
-		    /* Name truncated. */
-		    DEBUGADD(0, (" #%u %s + %#llx [ip=%#llx] [sp=%#llx]\n",
-			    i, procname, (long long)off,
-			    (long long)ip, (long long) sp));
-		    break;
-	    default:
-	    /* case -UNW_ENOINFO: */
-	    /* case -UNW_EUNSPEC: */
-		    /* No symbol name found. */
-		    DEBUGADD(0, (" #%u %s [ip=%#llx] [sp=%#llx]\n",
-			    i, "<unknown symbol>",
-			    (long long)ip, (long long) sp));
-	    }
-	    ++i;
-	} while (unw_step(&cursor) > 0);
-
-	return;
-
-libunwind_failed:
-	DEBUG(0, ("unable to produce a stack trace with libunwind\n"));
-
-#elif HAVE_BACKTRACE_SYMBOLS
-	void *backtrace_stack[BACKTRACE_STACK_SIZE];
-	size_t backtrace_size;
-	char **backtrace_strings;
-
-	/* get the backtrace (stack frames) */
-	backtrace_size = backtrace(backtrace_stack,BACKTRACE_STACK_SIZE);
-	backtrace_strings = backtrace_symbols(backtrace_stack, backtrace_size);
-
-	DEBUG(0, ("BACKTRACE: %lu stack frames:\n", 
-		  (unsigned long)backtrace_size));
-
-	if (backtrace_strings) {
-		int i;
-
-		for (i = 0; i < backtrace_size; i++)
-			DEBUGADD(0, (" #%u %s\n", i, backtrace_strings[i]));
-
-		/* Leak the backtrace_strings, rather than risk what free() might do */
-	}
-
-#elif HAVE_LIBEXC
-
-	/* The IRIX libexc library provides an API for unwinding the stack. See
-	 * libexc(3) for details. Apparantly trace_back_stack leaks memory, but
-	 * since we are about to abort anyway, it hardly matters.
-	 */
-
-#define NAMESIZE 32 /* Arbitrary */
-
-	__uint64_t	addrs[BACKTRACE_STACK_SIZE];
-	char *      	names[BACKTRACE_STACK_SIZE];
-	char		namebuf[BACKTRACE_STACK_SIZE * NAMESIZE];
-
-	int		i;
-	int		levels;
-
-	ZERO_ARRAY(addrs);
-	ZERO_ARRAY(names);
-	ZERO_ARRAY(namebuf);
-
-	/* We need to be root so we can open our /proc entry to walk
-	 * our stack. It also helps when we want to dump core.
-	 */
-	become_root();
-
-	for (i = 0; i < BACKTRACE_STACK_SIZE; i++) {
-		names[i] = namebuf + (i * NAMESIZE);
-	}
-
-	levels = trace_back_stack(0, addrs, names,
-			BACKTRACE_STACK_SIZE, NAMESIZE - 1);
-
-	DEBUG(0, ("BACKTRACE: %d stack frames:\n", levels));
-	for (i = 0; i < levels; i++) {
-		DEBUGADD(0, (" #%d 0x%llx %s\n", i, addrs[i], names[i]));
-	}
-#undef NAMESIZE
-
-#else
-	DEBUG(0, ("unable to produce a stack trace on this platform\n"));
-#endif
-}
-
-/*******************************************************************
   A readdir wrapper which just returns the file name.
  ********************************************************************/
 
diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c
index d972a5d..9ee856c 100644
--- a/source3/utils/net_dns.c
+++ b/source3/utils/net_dns.c
@@ -75,6 +75,7 @@ DNS_ERROR DoDNSUpdate(char *pszServerName,
 
 		if (!ERR_DNS_IS_OK(err)) {
 			DEBUG(3,("DoDNSUpdate: failed to probe DNS\n"));
+			goto error;
 		}
 
 		if ((dns_response_code(resp->flags) == DNS_NO_ERROR) &&
diff --git a/source3/wscript b/source3/wscript
index 611af5b..921c8bc 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -96,7 +96,7 @@ def configure(conf):
     # We crash without vfs_default
     required_static_modules.extend(TO_LIST('vfs_default'))
 
-    conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h netdb.h')
+    conf.CHECK_HEADERS('netdb.h')
     conf.CHECK_HEADERS('linux/falloc.h linux/ioctl.h')
 
     conf.CHECK_FUNCS('getcwd fchown chmod fchmod mknod')
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 012f87a..4efe963 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -116,6 +116,13 @@ for env in ["ad_dc_ntvfs", "fl2008r2dc", "fl2003dc"]:
         '--option=clientldapsaslwrapping=plain',
         '--sign',
         '--encrypt',
+        '-k yes --option=clientldapsaslwrapping=plain',
+        '-k yes --sign',
+        '-k yes --encrypt',
+        '-k no --option=clientldapsaslwrapping=plain',
+        '-k no --sign --option=ntlmssp_client:ldap_style_send_seal=no',
+        '-k no --sign',
+        '-k no --encrypt',
     ]
 
     for auth_option in auth_options:


-- 
Samba Shared Repository



More information about the samba-cvs mailing list