The Samba-Bugzilla – Attachment 15957 Details for
Bug 14345
Can't get 'log events generated from smbclient'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.12 and 4.11
v4-12.patch (text/plain), 4.81 KB, created by
Andreas Schneider
on 2020-05-07 11:39:56 UTC
(
hide
)
Description:
patch for 4.12 and 4.11
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2020-05-07 11:39:56 UTC
Size:
4.81 KB
patch
obsolete
>From b313f378bfd9b602d88bde0c07b2b66a9a2cd6d2 Mon Sep 17 00:00:00 2001 >From: Amit Kumar <amitkuma@redhat.com> >Date: Wed, 22 Apr 2020 06:53:33 -0500 >Subject: [PATCH 1/2] Add a test for smbclient -l basename > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14345 > >Signed-off-by: Amit Kumar <amitkuma@redhat.com> >Reviewed-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Alexander Bokovoy <ab@samba.org> >(cherry picked from commit 2a7fc40fb3f3ca994cecad3e2957433d7a411208) >--- > selftest/knownfail.d/smbclog | 1 + > .../tests/test_smbclient_log_basename.sh | 36 +++++++++++++++++++ > source3/selftest/tests.py | 3 ++ > 3 files changed, 40 insertions(+) > create mode 100644 selftest/knownfail.d/smbclog > create mode 100755 source3/script/tests/test_smbclient_log_basename.sh > >diff --git a/selftest/knownfail.d/smbclog b/selftest/knownfail.d/smbclog >new file mode 100644 >index 00000000000..bfe1bfeda7c >--- /dev/null >+++ b/selftest/knownfail.d/smbclog >@@ -0,0 +1 @@ >+ ^samba3.blackbox.smbclient_log_basename >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 68ca1eac6e8..c00e69f61cc 100755 >--- a/source3/selftest/tests.py >+++ b/source3/selftest/tests.py >@@ -253,6 +253,9 @@ for env in ["nt4_dc", "nt4_member", "ad_member", "ad_dc", "ad_dc_ntvfs", "s4memb > plantestsuite("samba3.blackbox.smbclient_ntlm.plain NT1", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', "never", smbclient3, "NT1", configuration]) > plantestsuite("samba3.blackbox.smbclient_ntlm.plain SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', "never", smbclient3, "SMB3", 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" % (options), env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, options]) >-- >2.26.2 > > >From 317ca4507516f89cac30a7f1799ed9c89f573985 Mon Sep 17 00:00:00 2001 >From: Amit Kumar <amitkuma@redhat.com> >Date: Wed, 22 Apr 2020 06:53:42 -0500 >Subject: [PATCH 2/2] lib:util: Fix smbclient -l basename dir > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14345 > >Pair-Programmed-With: Andreas Schneider <asn@samba.org> >Signed-off-by: Andreas Schneider <asn@samba.org> >Signed-off-by: Amit Kumar <amitkuma@redhat.com> >Reviewed-by: Alexander Bokovoy <ab@samba.org> >(cherry picked from commit c83ce5f4f99aef94530411ec82cc03e9935b352d) >--- > lib/util/debug.c | 8 +++++++- > selftest/knownfail.d/smbclog | 1 - > 2 files changed, 7 insertions(+), 2 deletions(-) > delete mode 100644 selftest/knownfail.d/smbclog > >diff --git a/lib/util/debug.c b/lib/util/debug.c >index 6f081d45110..d990a6bf2b0 100644 >--- a/lib/util/debug.c >+++ b/lib/util/debug.c >@@ -1140,9 +1140,15 @@ bool reopen_logs_internal(void) > dbgc_config[DBGC_ALL].fd = 2; > return true; > >- case DEBUG_FILE: >+ case DEBUG_FILE: { >+ struct debug_backend *b = debug_find_backend("file"); >+ >+ if (b != NULL) { >+ b->log_level = dbgc_config[DBGC_ALL].loglevel; >+ } > break; > } >+ } > > oldumask = umask( 022 ); > >diff --git a/selftest/knownfail.d/smbclog b/selftest/knownfail.d/smbclog >deleted file mode 100644 >index bfe1bfeda7c..00000000000 >--- a/selftest/knownfail.d/smbclog >+++ /dev/null >@@ -1 +0,0 @@ >- ^samba3.blackbox.smbclient_log_basename >-- >2.26.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ab
:
review+
Actions:
View
Attachments on
bug 14345
: 15957 |
15973
|
15974