[SCM] Samba Shared Repository - branch v4-11-test updated
Karolin Seeger
kseeger at samba.org
Thu Jul 9 11:41:03 UTC 2020
The branch, v4-11-test has been updated
via 482246b997b lib/debug: set the correct default backend loglevel to MAX_DEBUG_LEVEL
via d77eb1c1670 lib/debug: assert file backend
via c557da03cfe lib:util: Fix smbclient -l basename dir
via 1e53f8a6b26 Add a test for smbclient -l basename
via 05a6a60a745 s3:winbind:idmap_ad - make failure to get attrnames for schema mode fatal
from 03eb7b7c0de lib/util: do not install "test_util_paths"
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-11-test
- Log -----------------------------------------------------------------
commit 482246b997b8a720b92df32f7261e0fa2d40282d
Author: Ralph Boehme <slow at samba.org>
Date: Tue Jun 30 17:03:05 2020 +0200
lib/debug: set the correct default backend loglevel to MAX_DEBUG_LEVEL
This fixed a regression introduced by commit
c83ce5f4f99aef94530411ec82cc03e9935b352d for bug #14345.
The backend loglevel globally restricts logging of a particular backend. If this
value is smaller then any explicitly configured logging class, logging for this
class is skipped.
Eg, given the following logging config in smb.conf:
log level = 1 auth_json_audit:3@/var/log/samba/samba_auth_audit.log
the default class loglevel of 1 (dbgc_config[DBGC_ALL].loglevel) will be
assigned to the backend loglevel.
So even though the logging class auth_json_audit is configured at level 3, this
doesn't become effective as the file backend drops all log messages with a level
below 1.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14426
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Thu Jul 2 13:25:29 UTC 2020 on sn-devel-184
(cherry picked from commit 71488b812fe737df2d3439a6ff3f95bb69b4a5bd)
Autobuild-User(v4-11-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-11-test): Thu Jul 9 11:40:15 UTC 2020 on sn-devel-184
commit d77eb1c1670ec40a4c4f757ba8cc8e13c3a976bb
Author: Ralph Boehme <slow at samba.org>
Date: Tue Jun 30 17:02:07 2020 +0200
lib/debug: assert file backend
The debug file backend is a built-in default, if it's missing we're totally
screwed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14426
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 5aeaa6959da326095e98f0369b6d91dc5667415e)
commit c557da03cfe605bd09d9c63b705944068eaa6129
Author: Amit Kumar <amitkuma at redhat.com>
Date: Wed Apr 22 06:53:42 2020 -0500
lib:util: Fix smbclient -l basename dir
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14345
Pair-Programmed-With: Andreas Schneider <asn at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
Signed-off-by: Amit Kumar <amitkuma at redhat.com>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
(cherry picked from commit c83ce5f4f99aef94530411ec82cc03e9935b352d)
commit 1e53f8a6b2698e70a5fcfce678bbeaf32ba8f9c7
Author: Amit Kumar <amitkuma at redhat.com>
Date: Wed Apr 22 06:53:33 2020 -0500
Add a test for smbclient -l basename
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14345
Signed-off-by: Amit Kumar <amitkuma at redhat.com>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
(cherry picked from commit 2a7fc40fb3f3ca994cecad3e2957433d7a411208)
commit 05a6a60a745293569a327a673d10ceb542a7c746
Author: Andrew <awalker at ixsystems.com>
Date: Tue Jun 30 06:54:06 2020 -0400
s3:winbind:idmap_ad - make failure to get attrnames for schema mode fatal
Add check for failure to resolve the OID array for the schema mode into
names.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14425
Signed-off-by: Andrew <awalker at ixsystems.com>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit b5b801026edd3a8fd8d0ba1752e891453cf675c9)
-----------------------------------------------------------------------
Summary of changes:
lib/util/debug.c | 6 ++++
.../script/tests/test_smbclient_log_basename.sh | 36 ++++++++++++++++++++++
source3/selftest/tests.py | 3 ++
source3/winbindd/idmap_ad.c | 8 +++++
4 files changed, 53 insertions(+)
create mode 100755 source3/script/tests/test_smbclient_log_basename.sh
Changeset truncated at 500 lines:
diff --git a/lib/util/debug.c b/lib/util/debug.c
index c42022ec9bb..d8427c291da 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -30,6 +30,7 @@
#include "util_strlist.h" /* LIST_SEP */
#include "blocking.h"
#include "debug.h"
+#include <assert.h>
/* define what facility to use for syslog */
#ifndef SYSLOG_FACILITY
@@ -1113,6 +1114,7 @@ static bool reopen_one_log(int *fd, const char *logfile)
*/
bool reopen_logs_internal(void)
{
+ struct debug_backend *b = NULL;
mode_t oldumask;
int new_fd = 0;
size_t i;
@@ -1141,6 +1143,10 @@ bool reopen_logs_internal(void)
return true;
case DEBUG_FILE:
+ b = debug_find_backend("file");
+ assert(b != NULL);
+
+ b->log_level = MAX_DEBUG_LEVEL;
break;
}
diff --git a/source3/script/tests/test_smbclient_log_basename.sh b/source3/script/tests/test_smbclient_log_basename.sh
new file mode 100755
index 00000000000..c721b3f5ca1
--- /dev/null
+++ b/source3/script/tests/test_smbclient_log_basename.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# this test checks whether smbclient can log into -l log-basename
+
+if [ $# -lt 2 ]; then
+cat <<EOF
+Usage: test_smbclient_log_basename.sh SERVER SMBCLIENT PREFIX <smbclient arguments>
+EOF
+exit 1;
+fi
+
+SERVER="$1"
+SMBCLIENT="$2"
+PREFIX="$3"
+shift 3
+ADDARGS="$*"
+
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
+
+failed=0
+
+LOG_DIR=$PREFIX/st_log_basename_dir
+
+test_smbclient_log_basename()
+{
+ rm -rf $LOG_DIR
+ mkdir $LOG_DIR
+ cmd='$VALGRIND $SMBCLIENT -l $LOG_DIR -d3 //$SERVER/IPC\$ $CONFIGURATION -U%badpassword -c quit $ADDARGS'
+ out=`eval $cmd 2>&1`
+ grep 'lp_load_ex: refreshing parameters' $LOG_DIR/log.smbclient
+}
+
+testit "smbclient log-basename" test_smbclient_log_basename || failed=`expr $failed + 1`
+
+testok $0 $failed
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 98f372c95e9..817fc783062 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -237,6 +237,9 @@ for env in ["nt4_dc", "nt4_member", "ad_member", "ad_dc", "ad_dc_ntvfs", "s4memb
plantestsuite("samba3.blackbox.smbclient_machine_auth.plain (%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_machine_auth.sh"), '$SERVER', smbclient3, configuration])
plantestsuite("samba3.blackbox.smbclient_ntlm.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', "never", smbclient3, configuration])
+
+plantestsuite("samba3.blackbox.smbclient_log_basename", "ad_dc", [os.path.join(samba3srcdir, "script/tests/test_smbclient_log_basename.sh"), '$SERVER', smbclient3, '$PREFIX', configuration])
+
for options in ["--option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no -mNT1", ""]:
for env in ["nt4_member", "ad_member"]:
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) %s" % (env, options), env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, options])
diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c
index a93c61f54d1..6d879cdf4d7 100644
--- a/source3/winbindd/idmap_ad.c
+++ b/source3/winbindd/idmap_ad.c
@@ -162,6 +162,14 @@ static TLDAPRC get_attrnames_by_oids(struct tldap_context *ld,
}
TALLOC_FREE(msgs);
+ for (i=0; i<num_oids; i++) {
+ if (names[i] == NULL) {
+ DBG_ERR("Failed to retrieve schema name for "
+ "oid [%s]. Schema mode is incorrect "
+ "for this domain.\n", oids[i]);
+ return TLDAP_FILTER_ERROR;
+ }
+ }
return TLDAP_SUCCESS;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list