summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* winbind: Make wb_sids2xids_recv work on an arrayVolker Lendecke2015-03-078-21/+27
| | | | | | | | | | | | | | | | | | The trigger for this is that Coverity got confused by the dual use of &xid as an array with the implicit length equality between wb_sids2xids_send and the array passed in to wb_sids2xids_recv for the result. I don't want to start doing things just for the Coverity scan, but this makes the code clearer to me by removing this implicit expected array length equality. Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Mar 7 15:28:59 CET 2015 on sn-devel-104
* vfs_fruit: Fix CID 1273290 Uninitialized scalar variableVolker Lendecke2015-03-061-1/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Mar 6 23:56:36 CET 2015 on sn-devel-104
* provision: Give a more helpful message when find_provision_key_parameters() ↵Andrew Bartlett2015-03-061-2/+5
| | | | | | | | | | fails Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Mar 6 20:11:52 CET 2015 on sn-devel-104
* selftest: Improve renamedcs testAndrew Bartlett2015-03-061-0/+10
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-lib/cmdline: Fix help for -P / --machine-pass: this no longer implies -kAndrew Bartlett2015-03-061-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool: Add -P to options.CredentialsOptionsAndrew Bartlett2015-03-061-5/+21
| | | | | | | This matches our other binaries, and allows samba-tool commands to run with the machine account. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* heimdal: Fix CID 1273430 Double freeVolker Lendecke2015-03-061-1/+0
| | | | | | | | | | | | | I think Coverity is right here: Before the preceding call to krb5_make_principal we already krb5_free_principal(ctx, tmp_creds.server) without wiping out tmp_creds.server. The call to krb5_make_principal only stores something fresh when it also returns 0 a.k.a. success. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Mar 6 17:38:09 CET 2015 on sn-devel-104
* script/autobuild.py: build the samba target with --with-profiling-dataStefan Metzmacher2015-03-061-1/+1
| | | | | | | | | | | | In future we may get also runtime tests for profiling... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Dec 15 16:20:14 CET 2014 on sn-devel-104 (cherry picked from commit 4958fcdfa30fd9d8dc51ceafaab35721e61e72c7)
* s3:smbprofile: profile the system and user space cpu timeStefan Metzmacher2015-03-063-0/+25
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:smbprofile: Replace sysv shmem with tdbVolker Lendecke2015-03-067-110/+446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What? This patch gets rid of the central shared memory segment referenced by "profile_p". Instead, every smbd gets a static profile_area where it collects profiling data. Once a second, every smbd writes this profiling data into a record of its own in a "smbprofile.tdb". smbstatus -P does a tdb_traverse on this database and sums up what it finds. Why? At least in my perception sysv IPC has not the best reputation on earth. The code before this patch uses shmat(). Samba ages ago has developed a good abstraction of shared memory: It's called tdb. The main reason why I started this is that I have a request to become more flexible with profiling data. Samba should be able to collect data per share or per user, something which is almost impossible to do with a fixed structure. My idea is to for example install a profile area per share and every second marshall this into one tdb record indexed by share name. smbstatus -P would then also collect the data and either aggregate them or put them into individual per-share statistics. This flexibility in the data model is not really possible with one fixed structure. But isn't it slow? Well, I don't think so. I can't really prove it, but I do believe that on large boxes atomically incrementing a shared memory value for every SMB does show up due to NUMA effects. With this patch the hot code path is completely process-local. Once a second every smbd writes into a central tdb, this of course does atomic operations. But it's once a second, not on every SMB2 read. There's two places where I would like to improve things: With the current code all smbds wake up once a second. With 10,000 potentially idle smbds this will become noticable. That's why the current only starts the timer when something has changed. The second place is the tdb traverse: Right now traverse is blocking in the sense that when it has to switch hash chains it will block. With mutexes, this means a syscall. I have a traverse light in mind that works as follows: It assumes a locked hash chain and then walks the complete chain in one run without unlocking in between. This way the caller can do nonblocking locks in the first round and only do blocking locks in a second round. Also, a lot of syscall overhead will vanish. This way smbstatus -P will have almost zero impact on normal operations. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:smbprofile: specify SMBPROFILE_STATS_SECTION_START() with name vs. ↵Stefan Metzmacher2015-03-062-12/+12
| | | | | | | | display[name] Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* Implement TestCase.assertIsNotNone for python < 2.7.Jelmer Vernooij2015-03-061-6/+9
| | | | | | | | | Change-Id: Ieaefdc77495e27bad791075d985a70908e9be1ad Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Mar 6 07:11:43 CET 2015 on sn-devel-104
* Implement TestCase.assertIn for older versions of Python.Jelmer Vernooij2015-03-061-0/+3
| | | | | | Change-Id: I17d855166b439c0bd9344a17a454ea5bc6e057aa Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Implement assertIsNone for Python < 2.7.Jelmer Vernooij2015-03-061-0/+3
| | | | | | Change-Id: I3937acb16ca0c5430b70f0af305997878da53c37 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Handle skips when running on python2.6.Jelmer Vernooij2015-03-061-9/+57
| | | | | | Change-Id: I8b0a15760a72f41800d23150232c2b0e59e32c32 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove another call to addUnexpectedSuccess with too many arguments.Jelmer Vernooij2015-03-061-1/+1
| | | | | | Change-Id: I5f1917e74ffd57b5ae228231c27fbdf70de2992f Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Run cleanup after tearDown, for consistency with Python >= 2.7.Jelmer Vernooij2015-03-061-2/+3
| | | | | | Change-Id: Ic3ce975e3b2e4b30e07643efb4496ebf36a93284 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* TestCase.addUnexpectedSuccess doesn't take an error.Jelmer Vernooij2015-03-061-3/+3
| | | | | | Change-Id: I90f7dd225d9ed3cbc515292de9a37a816ac0639f Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Use samba TestCase so we get all compatibility functions on Python < 2.7.Jelmer Vernooij2015-03-064-4/+4
| | | | | | Change-Id: Iba87e3c8fa9331c4d5438ab60a8385379da634d7 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Provide TestCase.assertIsInstance for python < 2.7.Jelmer Vernooij2015-03-061-0/+4
| | | | | | Change-Id: Id6d3c8a7dc56cb560eccc3db897a83c638dec7a6 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Use Samba TestCase class, as the python 2.6 one doesn't have assertIs, ↵Jelmer Vernooij2015-03-062-2/+2
| | | | | | | | assertIsInstance or addCleanup. Change-Id: I3daeffade0dac9795f61f91ee0da35fee0143a38 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add replacement addCleanup.Jelmer Vernooij2015-03-061-0/+11
| | | | | | Change-Id: Ie85756effde344fc4cc9b693c4a28611ea091677 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add custom implementations of TestCase.assertIs and TestCase.assertIsNot, ↵Jelmer Vernooij2015-03-061-0/+8
| | | | | | | | for Python2.6. Change-Id: I3b806abdaf9540b7c39c961c179c2d2b15d327fe Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix use of TestCase.skipTest on python2.6 now that we no longer use testtools.Jelmer Vernooij2015-03-062-3/+7
| | | | | | Change-Id: I630e4073bf1553dfc77e9fe7e843ee8b71907683 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Build python-ntdb bindings if ntdb was found but python-ntdb was not.Jelmer Vernooij2015-03-061-7/+7
| | | | | | Change-Id: I54c248effa63fe65e2bef0d41535d8eec0ef28c0 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Drop support for failfast mode, rather than adding support for it everywhere.Jelmer Vernooij2015-03-062-42/+7
| | | | | | Change-Id: I4d6070a0e3b89d5e390f84754dddba9ec17ddf21 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix use of iso8601.Utc.Jelmer Vernooij2015-03-061-1/+2
| | | | | | Change-Id: Id592571a173eff36e2fb9b395f61a6fb53d580e6 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Set failfast property for test reporters that need it.Jelmer Vernooij2015-03-061-0/+4
| | | | | | Change-Id: Ibd632b9f569c23e60bcd13bcff805e367dd2e71c Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove 'external' python module support code - use the third_party directory ↵Jelmer Vernooij2015-03-062-40/+0
| | | | | | | | instead. Change-Id: I2f5053bc5a42d3dfe71f5bd027eb6ead7d1b9752 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove bundled but unused mimeparse.Jelmer Vernooij2015-03-066-291/+0
| | | | | | Change-Id: I245607c0d27dbeae638f2f50c3b4d560eb9b70f8 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove unused bundled python-extras module.Jelmer Vernooij2015-03-0614-554/+0
| | | | | | Change-Id: I6df0561ff4059c827d545d60a0865e17e9fefcf0 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove bundled testtools.Jelmer Vernooij2015-03-0681-19182/+0
| | | | | | Change-Id: Ic6ddb352e403c9591cbe4ad3fd36758ffcc2ddb9 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove bundled subunit.Jelmer Vernooij2015-03-0667-9783/+0
| | | | | | Change-Id: I18e19c3817de6f97fe2a9fb1b7faa4f8a0d27649 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove unnecessary python path updates for bundled subunit/testtools.Jelmer Vernooij2015-03-061-3/+2
| | | | | | Change-Id: Idb40fcb564455f16608ea991b086e41e22ae51e3 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Support using third party iso8601 module if system doesn't provide one.Jelmer Vernooij2015-03-062-1/+6
| | | | | | Change-Id: I5d035738d244d66d33788636c8ee8b322c227a0e Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Bundle pyiso8601 for iso8601 time/date manipulation.Jelmer Vernooij2015-03-0617-0/+1337
| | | | | | | | | (corrected lib/update-external.sh by Andrew Bartlett) Change-Id: I0f992b949b1717635ff26fa0db6073675cce4ad7 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* Import UTC definition from utc8601 module.Jelmer Vernooij2015-03-062-24/+3
| | | | | | Change-Id: I3ccd81090c4721b161aff272100aa71bc2f17055 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* subunithelper: Fix progress support.Jelmer Vernooij2015-03-061-1/+8
| | | | | | Change-Id: I5dd2ca0f3bc02821d5c9e1dc878bba577667d162 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Rename TestSkipped to Skiptest, consistent with Python 2.7.Jelmer Vernooij2015-03-064-13/+11
| | | | | | Change-Id: I023df54363328333f1cb6c3ae3c1a406befa8f7b Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Avoid importing TestCase and TestSkipped from testtools.Jelmer Vernooij2015-03-061-11/+8
| | | | | | Change-Id: I34488ddf253decd336a67a8634e7039096bdd160 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Use iso8601 from the system, rather than the one bundled with subunit.Jelmer Vernooij2015-03-061-1/+1
| | | | | | Change-Id: I681bf79eb9ebe45b6972b3783c8e799eb612400b Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* format-subunit: Remove import of unnecessary third party modules testtools ↵Jelmer Vernooij2015-03-061-6/+1
| | | | | | | | and subunit. Change-Id: I3403ceacf8bbdf075c1c540081f7c3e82f4751bc Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* filter-subunit: Remove import of unnecessary third party modules testtools ↵Jelmer Vernooij2015-03-061-5/+0
| | | | | | | | and subunit. Change-Id: I6ed0c560c18b4001c7adb9af6f67535640a1b374 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tests/sam: Remove unnecessary calls for third party module imports.Jelmer Vernooij2015-03-061-2/+0
| | | | | | Change-Id: Iaa1af59005eaee7ea79f3260b250a2c948e07532 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* show_test_time: Use system subunit.Jelmer Vernooij2015-03-061-8/+1
| | | | | | Change-Id: I7d799b5f9d6066d988aa2e101e0fe7b6efe74aea Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* test_samba3dump: Use Samba subunit emitter.Jelmer Vernooij2015-03-061-1/+1
| | | | | | Change-Id: Ie9a115d131624bfc68e6f40822acade70d145735 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* test_duplicate_symbol: Use Samba subunit emitter.Jelmer Vernooij2015-03-061-1/+1
| | | | | | Change-Id: I280495706ff460674244183103306ca717c419a8 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Set default testRunner rather than requiring the user pass it in.Jelmer Vernooij2015-03-061-2/+3
| | | | | | Change-Id: I8b5a5925030049975a83b090e5c7b76d5245c07d Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add basic tap2subunit converter, rather than relying on the one from ↵Jelmer Vernooij2015-03-062-23/+133
| | | | | | | | subunit-tools. Change-Id: I39ec5ec68c7c3c9d329d8f1a8ce01445b85c7ab8 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Inline outputting of subunit in libtorture.Jelmer Vernooij2015-03-066-27/+24
| | | | | | Change-Id: I2c7045c530183a6961cb253540579312c2767330 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>