1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
https://gitlab.com/samba-team/samba is the Official GitLab mirror of https://git.samba.org/samba.git -- Merge requests should be made on GitLab (not on GitHub)
Go to file
Noel Power 81043cdf0e python/samba/tests: Fix auth_log messaging problems in py3
Some tests (especially samba.tests.auth_log_netlogon_bad_creds) are
failing due to not receiving expected messages. There seems to be
some timing issue or race around the messaging bus being set up and
getting the expected events resulting from the failed netlogon.

Specifically the the order of destruction of the messaging.Messaging()
c-py objects is different under python2. Under python2 all of the
messaging.Messaging() objects are destructed *after* all the tests
are run. Note: each instance of the TestCase has it's own Messaging()
instance which is created by TestCaseXYZ.setUp, so it appears the unittest
destroys the test instances when all the tests have run whereas in
python3 we see each messaging.Messaging() instance destroyed after
each test runs.
Ok, what difference does that make ? well it seems in python3 because
each Messaging() instance is destructed after a test runs that the
associated messaging_dgm_destroy() also runs, this destroys the
global_dgm_context context which means when the next test runs the whole
messaging infrastructure needs to be built again when the next Messaging()
object is created. On the server-side this seems to result in attempts
to send messages to the listener failing first with

get_event_server: Failed to find 'auth_event' registered on the message bus to send JSON audit events to: NT_STATUS_CONNECTION_REFUSED

and subsequently with

get_event_server: Failed to find 'auth_event' registered on the message bus to send JSON audit events to: NT_STATUS_UNSUCCESSFUL

client doesn't get any more messages, test fails :-(

So, what's the difference in python2, well because the destructors for the
(4 in the case of netlogon_bad_creds) instances of Messagaging() don't run
till the end of the tests this doesn't happen and the global_dgm_context
never gets destroyed untill all the tests complete. There is some race
condition at play here, a simple sleep at the start of a failing test
fixes the problem. But... ok that isn't a possible solution here, instead
I have adjusted the base auth tests to store the Messaging() objects in a
global list forcing them to remain in scope until the tests are complete.
This ensure the behaviour is consistent across python2 & python3.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10 10:38:22 +01:00
.github Added redirect from GitHub to GitLab 2018-12-05 16:35:33 +01:00
auth auth/credentials: PY3 set_password should decode from unicode 'utf8' 2018-12-10 10:38:21 +01:00
buildtools wafsamba: add MODE_{744,_777} 2018-12-05 13:35:19 +01:00
coverity coverity: Add modeling file for Coverity scan 2017-02-23 07:11:18 +01:00
ctdb ctdb: Remove <file> parameter from pfetch usage info 2018-12-10 05:02:12 +01:00
dfs_server dsdb: Allow the disable of the Windows server site fallback 2018-05-04 06:12:10 +02:00
docs-xml docs-xml: add "smbd getinfo ask sharemode" 2018-12-06 01:43:14 +01:00
dynconfig dynconfig/wscript: update to handle waf 2.0.4 2018-09-05 06:37:22 +02:00
examples PY3: fix "TabError: inconsistent use of tabs and spaces" 2018-09-27 01:54:27 +02:00
file_server source4 smdb: Add a post fork hook to the service API 2018-11-01 23:49:24 +01:00
include
lib docs-xml: add "smbd getinfo ask sharemode" 2018-12-06 01:43:14 +01:00
libcli libcli/security: add dom_sid_lookup_is_predefined_domain() 2018-12-05 08:12:16 +01:00
libds/common libds: rename UF_MACHINE_ACCOUNT_MASK to UF_TRUST_ACCOUNT_MASK 2018-03-13 18:59:17 +01:00
libgpo libgpo: Align integer types 2018-11-27 07:13:14 +01:00
librpc librpc:ndr: Give the optimizer hints for ndr_push_bytes() 2018-12-07 15:33:38 +01:00
nsswitch nsswitch/tests: PY3 samba_tool call correct python 2018-12-10 10:38:20 +01:00
packaging packaging/wscript: update to handle waf 2.0.4 2018-09-05 06:37:23 +02:00
pidl PY3: fix string.rsplit usage (doens't exist in PY3) 2018-09-16 06:16:19 +02:00
python python/samba/tests: Fix auth_log messaging problems in py3 2018-12-10 10:38:22 +01:00
release-scripts release-scripts/build-manpages-nogit: run make realdistclean at the end 2015-08-17 17:43:36 +02:00
script traffic_replay: Add a max-members option to cap group size 2018-12-04 12:22:50 +01:00
selftest PY3: wrap filter calls with list where list is expected 2018-12-10 10:38:21 +01:00
source3 rpcclient: Use dom_sid_str_buf 2018-12-08 02:43:48 +01:00
source4 s4/torture/gpo: Use existing code to 'run' external commands 2018-12-10 10:38:22 +01:00
testdata Added smbc_SetConfiguration which lets the user set the smb.conf for libsmbclient code 2018-01-21 07:08:23 +01:00
testprogs testprogs/blackbox: make sure samba-tool is called with correct python 2018-12-10 10:38:20 +01:00
tests lib/util: rename USE_LINUX_THREAD_CREDENTIALS to HAVE_LINUX_THREAD_CREDENTIALS 2018-07-24 17:38:28 +02:00
testsuite testsuite/headers/wscript_build: update to handle waf 2.0.4 2018-09-05 06:37:24 +02:00
third_party waf: Utils package not defined 2018-12-04 18:45:38 +01:00
wintest wintest/test-s3: remove unused imports 2018-10-25 21:45:55 +02:00
.bzrignore
.gitattributes gitattributes: Ignore .SAMBABACKUP files 2018-08-16 23:42:22 +02:00
.gitignore .gitignore .agignore 2018-05-05 04:32:42 +02:00
.gitlab-ci-private.yml gitlab-ci: Run the new python3 autobuild tasks 2018-08-29 05:28:16 +02:00
.gitlab-ci.yml CI: Autobuild: Remove build_samba_ad_dc_2_py3 CI job 2018-11-14 08:20:55 +01:00
.testr.conf testr: Use waf testonly and create a custom directory for new workers. 2014-10-14 06:44:07 +02:00
.travis.yml travis-ci: Add py3 jobs to match new jobs in autobuild.py 2018-08-29 05:28:17 +02:00
.ycm_extra_conf.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
BUILD_SYSTEMS.txt doc: Modify build doc concerning missing headers 2014-01-07 04:13:27 +01:00
callcatcher-exceptions.grep
configure configure: Unload the wrappers so waf configure succeeds. 2014-10-09 19:32:16 +02:00
configure.developer lib: Change socket_wrapper to preloadable version. 2014-04-17 14:56:06 +02:00
COPYING
install_with_python.sh install_with_python: Secure Python download with sha256 checks. 2015-07-24 05:19:05 +02:00
Makefile make perftest: for performance testing 2016-08-31 07:09:26 +02:00
PFIF.txt
README.cifs-utils
README.Coding README.Coding: Approve DBG statements using dom_sid_str_buf 2018-11-22 08:22:18 +01:00
README.contributing Update mailing list references to point at lists.samba.org 2015-02-10 07:08:28 +01:00
README.md Removed dead groups link from Mail List Etiquette 2018-12-07 10:12:42 +01:00
setup.cfg PEP8: ignore rules and exclude files 2018-09-06 12:10:11 +02:00
simple-dc-steps.sh dbcheck linked attribute tests: save environment with bad links 2016-07-15 10:01:30 +02:00
VERSION VERSION: Bump version up to 4.10.0pre1... 2018-07-12 10:11:01 +02:00
WHATSNEW.txt WHATSNEW: document changes in SMB server parametric options 2018-12-06 05:14:03 +01:00
wscript waf: Utils package not defined 2018-12-04 18:45:38 +01:00
wscript_build wscript_build: update to handle waf 2.0.4 2018-09-05 06:37:25 +02:00
wscript_build_embedded_heimdal wscript_build_embedded_heimdal: update to handle waf 2.0.4 2018-09-05 06:37:25 +02:00
wscript_build_system_heimdal wscript: port build_system_heimdal to waf 2.0 2018-09-05 06:37:27 +02:00
wscript_build_system_mitkrb5 wscript: port build_system_mitkrb5 to waf 2.0 2018-09-05 06:37:27 +02:00
wscript_configure_system_mitkrb5 wscript_configure_system_mitkrb5: reject a system heimdal krb5-config 2018-12-06 16:53:33 +01:00

About Samba

Samba is the standard Windows interoperability suite of programs for Linux and Unix. Samba is Free Software licensed under the GNU General Public License and the Samba project is a member of the Software Freedom Conservancy. Since 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others. Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments. It can function both as a domain controller or as a regular domain member.

NOTE: Installation instructions may be found for the file/print server and domain member in: docs/htmldocs/Samba3-HOWTO/install.html

For the AD DC implementation a full HOWTO is provided at: https://wiki.samba.org/index.php/Samba4/HOWTO

Community guidelines can be read at: https://wiki.samba.org/index.php/How_to_do_Samba:_Nicely

This software is freely distributable under the GNU public license, a copy of which you should have received with this software (in a file called COPYING).

CONTRIBUTIONS

  1. To contribute via GitLab
  1. If you want to contribute to the development of the software then please join the mailing list. The Samba team accepts patches (preferably in "diff -u" format, see https://www.samba.org/samba/devel/ for more details) and are always glad to receive feedback or suggestions to the address samba@lists.samba.org. More information on the various Samba mailing lists can be found at https://lists.samba.org/.

You can also get the Samba sourcecode straight from the git repository - see https://wiki.samba.org/index.php/Using_Git_for_Samba_Development.

If you like a particular feature then look through the git change-log (on the web at https://gitweb.samba.org/?p=samba.git;a=summary) and see who added it, then send them an email.

Remember that free software of this kind lives or dies by the response we get. If no one tells us they like it then we'll probably move onto something else.

MORE INFO

DOCUMENTATION

There is quite a bit of documentation included with the package, including man pages, and lots of .html files with hints and useful info. This is also available from the webpage. There is a growing collection of information under docs/.

A list of Samba documentation in languages other than English is available on the webpage.

If you would like to help with the documentation, please coordinate on the samba@samba.org mailing list. See the next section for details on subscribing to samba mailing lists.

MAILING LIST

Please do NOT send subscription/unsubscription requests to the lists!

There is a mailing list for discussion of Samba. For details go to https://lists.samba.org/ or send mail to samba-subscribe@lists.samba.org

There is also an announcement mailing list where new versions are announced. To subscribe go to https://lists.samba.org/ or send mail to samba-announce-subscribe@lists.samba.org. All announcements also go to the samba list, so you only need to be on one.

For details of other Samba mailing lists and for access to archives, see https://lists.samba.org/

MAILING LIST ETIQUETTE

A few tips when submitting to this or any mailing list.

  1. Make your subject short and descriptive. Avoid the words "help" or "Samba" in the subject. The readers of this list already know that a) you need help, and b) you are writing about samba (of course, you may need to distinguish between Samba PDC and other file sharing software). Avoid phrases such as "what is" and "how do i". Some good subject lines might look like "Slow response with Excel files" or "Migrating from Samba PDC to NT PDC".

  2. If you include the original message in your reply, trim it so that only the relevant lines, enough to establish context, are included. Chances are (since this is a mailing list) we've already read the original message.

  3. Trim irrelevant headers from the original message in your reply. All we need to see is a) From, b) Date, and c) Subject. We don't even really need the Subject, if you haven't changed it. Better yet is to just preface the original message with "On [date] [someone] wrote:".

  4. Please don't reply to or argue about spam, spam filters or viruses on any Samba lists. We do have a spam filtering system that is working quite well thank you very much but occasionally unwanted messages slip through. Deal with it.

  5. Never say "Me too." It doesn't help anyone solve the problem. Instead, if you ARE having the same problem, give more information. Have you seen something that the other writer hasn't mentioned, which may be helpful?

  6. If you ask about a problem, then come up with the solution on your own or through another source, by all means post it. Someone else may have the same problem and is waiting for an answer, but never hears of it.

  7. Give as much relevant information as possible such as Samba release number, OS, kernel version, etc...

  8. RTFM. Google.

WEBSITE

A Samba website has been setup with lots of useful info. Connect to:

https://www.samba.org/

As well as general information and documentation, this also has searchable archives of the mailing list and links to other useful resources such as the wiki.