summaryrefslogtreecommitdiff
path: root/python/samba
Commit message (Collapse)AuthorAgeFilesLines
* doc: "prune stale" and "sequence timeout" fssd parametersDavid Disseldorp2015-03-311-1/+1
| | | | | | | | This change adds smb.conf documentation for the "fss: prune stale" and "fss: sequence timeout" parameters accepted by Samba's FSRVP server. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* python: Remove ntdb referencesVolker Lendecke2015-03-172-9/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* autobuild: Remove ntdb targetVolker Lendecke2015-03-172-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Remove ntdb from scriptsVolker Lendecke2015-03-172-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* selftest: rename env dc to ad_dc_ntvfsMichael Adam2015-03-162-2/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: rename env plugin_s4_dc to ad_dcMichael Adam2015-03-162-5/+5
| | | | | | | | This is the environment that represents our supported production setup of an active directory domain controller. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool drs: Ensure we do not replicate all secrets to an RODC, even with ↵Andrew Bartlett2015-03-161-1/+4
| | | | | | | --local Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* s4.2/fsmo.py: fixed fsmo transfer exceptionSteve Howells2015-03-161-1/+0
| | | | | | | | | | | | | | | | | In transfer_role() there is an duplicate call to samdb.modify() inside the if statement where the type of role is being determined (specifically for the naming fsmo). This call is unnecessary as after the if statement their is a correct call, with a try/catch block, used by all fsmo transfers that will handle errors - such as the DC with the fsmo role being offline. The call to samdb.modify() inside the if statement for naming fsmo has been removed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10924 Signed-off-by: Steve Howells <steve.howells@moscowfirst.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: modify python.samba.test.posixacl to cope with nss_winbind activeMichael Adam2015-03-121-4/+28
| | | | | | | | | | | | | | | | | | It was observed that adding libnss_winbind (via nss_wrapper) lets the posix acl mapping come out slightly differently with respect to the owner/domain admin who is not explicitly nailed down in the original NT acl. This patch extends the test to react to the presence of nss_winbind in environment and adapts the expected results. This in particular fixes the run of the test against the (changed) plugin_s4_dc environment while keeping the possibility to successfully run it against an env without nss_winbind. Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org>
* 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
* 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>
* 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>
* 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>
* Use samba TestCase so we get all compatibility functions on Python < 2.7.Jelmer Vernooij2015-03-061-1/+1
| | | | | | 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>
* 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>
* Drop support for failfast mode, rather than adding support for it everywhere.Jelmer Vernooij2015-03-061-38/+7
| | | | | | Change-Id: I4d6070a0e3b89d5e390f84754dddba9ec17ddf21 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-061-16/+0
| | | | | | | | instead. Change-Id: I2f5053bc5a42d3dfe71f5bd027eb6ead7d1b9752 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-061-0/+5
| | | | | | Change-Id: I5d035738d244d66d33788636c8ee8b322c227a0e Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* 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>
* 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>
* 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 RemoteTestCase and RemoteError to samba.subunit.Jelmer Vernooij2015-03-061-0/+59
| | | | | | Change-Id: Ib3946cf4eae69f53270a299660f6029290d3791a Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Use Samba-only subunit module in selftest/tests/.Jelmer Vernooij2015-03-062-19/+30
| | | | | | Change-Id: I48c61f975c1fa49f6e244ad39dd720fe507db45b Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix copyright headers for python/samba/subunit.Jelmer Vernooij2015-03-062-0/+22
| | | | | | Change-Id: I5b554051f23f31d20b4f4325debcd6717ba8369e Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* subunitrun: Use new samba.subunit.run module.Jelmer Vernooij2015-03-061-10/+2
| | | | | | Change-Id: I4a4d2237ec9ef090bf95a0ea57285610047451e5 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add simple subunit runner outputting subunit v1.Jelmer Vernooij2015-03-062-0/+750
| | | | | | | | | | This is a short module (< 1k lines) that removes the need to depend on subunit, testtools, extras and mimeparse. It is based on an extract from testtools and subunit. Change-Id: I0a4f3060b25f7bde602a07ed6bef71c8196fca64 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/scripting/devel: Add tool to roll over the krbtgt passwordAndrew Bartlett2015-02-251-0/+19
| | | | | | | | This may be handy if this key is compromised, or along with chgtdcpass to isolate test copies of production domains in such a way that they cannot mix. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* group.py: Fix wrong example option, remove wrong comment lineMarc Muehlfeld2015-02-171-2/+1
| | | | | | | | | Replaced "--gid" with the correct "--gid-number" in Example 3. Additionally removed the first comment line in group.py, which was wrong in that file. Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpc_talloc: Update instructions to use standard unittest runner.Jelmer Vernooij2015-02-171-1/+1
| | | | | | | Change-Id: Id90541b01073f1156ccba562ba750245aad091c2 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* samba-tool: Create NIS enabled users and unixHomeDirectory attributeMarc Muehlfeld2015-02-032-4/+39
| | | | | | | | | | | | | | | | | | | | Allow to create NIS enabled user accounts via 'samba-tool user add'. To create NIS enabled accounts, the parameters --uid-number=, --login-shell=, --unix-home=, --gid-number= are mandatory. Because we didn't had a parameter to set unixHomeDirectory yet, this patch also adds this feature. 'unixUserPassword: ABCD!efgh12345$67890' is added by default, when you enable NIS on an account in ADUC. The same we do in samba-tool. See: https://bugzilla.samba.org/show_bug.cgi?id=10909 Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Marc Muehlfeld <mmuehlfeld@samba.org> Autobuild-Date(master): Tue Feb 3 17:18:32 CET 2015 on sn-devel-104
* s4-dsdb-test: Implement samdb_connect_env() to rely solely on environmentKamen Mazdrashki2015-02-031-0/+21
| | | | | | | | | | | | | | | | | | | this is to help me port Python tests to be more Unit test alike and remove all global handling Starting from a new test suite - tombstone_reanimation.py Andrew Bartlett rose his concerns that passing parameters through environment may make tests hard to trace for failures. However, passing parameters on command line is not Unit test alike either. After discussing this with him offline, we agreed to continue this approach, but prefix environment variables with "TEST_". So that an env var should not be used by coincidence. Change-Id: I29445c42cdcafede3897c8dd1f1529222a74afc9 Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4-dsdb: Tests for security checks on undelete operationNadezhda Ivanova2015-02-031-4/+4
| | | | | | | | | | | Implemented according to MS-ADTS 3.1.1.5.3.7.1. Unfortunately it appears LC is also necessary, and it is not granted by default to anyone but System and Administrator, so tests had to be done negatively Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Change-Id: Ic03b8fc4e222e7842ec8a9645a1bb33e7df9c438
* s4-tests: Print out what the error is in delete_force()Kamen Mazdrashki2015-02-031-2/+2
| | | | | | | Change-Id: Iaa631179dc79fa756416be8eaf8c55e3b0c1a29f Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* python/samba/tests: don't lower case path names in connect_samdb()Stefan Metzmacher2015-02-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | We should not lower case file names, because we may get a path to sam.ldb. Now we only lower case ldap urls. For a long time I got failing private autobuild like this: [1623(9233)/1718 at 1h28m9s] samba4.urgent_replication.python(dc)(dc:local) Failed to connect to ldap URL 'ldap:///memdisk/metze/w/b12985/samba/bin/ab/dc/private/sam.ldb' - LDAP client internal error: NT_STATUS_NO_MEMORY Failed to connect to 'ldap:///memdisk/metze/w/b12985/samba/bin/ab/dc/private/sam.ldb' with backend 'ldap': (null) UNEXPECTED(error): samba4.urgent_replication.python(dc).__main__.UrgentReplicationTests.test_attributeSchema_object(dc:local) REASON: _StringException: _StringException: Content-Type: text/x-traceback;charset=utf8,language=python traceback 322 The problem is that /memdisk/metze/W/ is my test directory instead of /memdisk/metze/w/. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* samba3.py: Correctly initialize cache directory for passdb testChristof Schmitt2015-01-161-0/+1
| | | | | | | | | | | | | | Running 'make test TESTS=tests.samba3' succeeds, but the log shows that it tried to open the gencache tdb in the wrong directory: Unable to create directory /usr/local/samba/var/cache for file gencache.tdb. Error was No such file or directory Fix this by correctly initializing the cache directory. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Fri Jan 16 02:36:39 CET 2015 on sn-devel-104
* dns.py: Always remove the test zone in tearDown()Andrew Bartlett2014-12-221-0/+8
| | | | | | | | | | Change-Id: Ic6d6c51579f8859b4e396179123974382c253bf7 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Mon Dec 22 08:21:22 CET 2014 on sn-devel-104
* dns.py: Test dns server reload zones from DSDB when are created or deletedSamuel Cabrero2014-12-221-0/+78
| | | | | | | Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4-tests/env_loadparm: Throw KeyError in case SMB_CONF_PATHKamen Mazdrashki2014-12-081-1/+1
| | | | | | | | | | | A bit more specific for the caller to "know" that env key is missing Change-Id: I4d4c2121af868d79f46f865f420336222bc67347 Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date(master): Mon Dec 8 05:27:34 CET 2014 on sn-devel-104
* Minor spelling correction in samba-tool domainDaniel Cotton2014-12-021-1/+1
| | | | | | | | | Signed-Off-By: Daniel Cotton <danielcotton.patches at gmail.com> Reviewed-By: Michael Adam <obnox@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Tue Dec 2 01:18:53 CET 2014 on sn-devel-104
* Reduce number of places where sys.path is (possibly) updated for external ↵Jelmer Vernooij2014-11-302-3/+3
| | | | | | | | | | | | module paths. Change-Id: I69d060f27ea090d14405e884d1ce271975358c56 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Nov 30 20:54:04 CET 2014 on sn-devel-104
* samba-tool: Fix the IP output of "samba-tool dns serverinfo <some_server>"Guenter Kukkukk2014-11-261-5/+8
| | | | | | | | | | | | | Avoid hardcoded IP-strings, use standard python IP functions to format IPv4 and IPv6 addresses correctly. I have removed the display of the port number. MS-DNSP 2.2.3.2.2.1 DNS_ADDR: (from May 15, 2014) Port Number (2bytes): Senders MUST set this to zero, and receivers MUST ignore it. Signed-off-by: Guenter Kukkukk <linux@kukkukk.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* samba-tool: Fix enum values in dns.pyGuenter Kukkukk2014-11-261-1/+1
| | | | | | | DNS_ZONE_UPDATE_SECURE was used twice, DNS_ZONE_UPDATE_UNSECURE was missing. Signed-off-by: Guenter Kukkukk <linux@kukkukk.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* sec_descriptor test: Simplify, use samba.tests.subunitrun module.Jelmer Vernooij2014-11-221-0/+0
| | | | | | Change-Id: I4ffda49cf3e209eaa28fc83f6fd9ded47f0ad7ee Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>