summaryrefslogtreecommitdiffstats
path: root/python/samba
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Move option handling into samba.tests.subunitrun.Jelmer Vernooij2014-11-221-3/+8
| | | | | | Change-Id: I65a73b74854af636413f4f284147f3bcf28b6f82 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Move option parsing to samba.tests.subunitrun.Jelmer Vernooij2014-11-221-8/+19
| | | | | | Change-Id: I2939c1b6ebb9739530efa9bc4667668cff7a7aeb Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add convenience class for old-style Samba subunit python tests.Jelmer Vernooij2014-11-221-0/+59
| | | | | | Change-Id: I84a97cc71cfa99c14e0c93ec19ff9eea6149bb5a Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add samba.ensure_third_party_module() function, loading external python ↵Jelmer Vernooij2014-11-121-5/+30
| | | | | | | modules from third_party/ if the system doesn't provide them. Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-dns: Add support for BIND 9.10Amitay Isaacs2014-10-251-1/+5
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Sat Oct 25 05:42:19 CEST 2014 on sn-devel-104
* s4-dns: Update template variables, change BIND98 --> BIND9_8Amitay Isaacs2014-10-251-6/+6
| | | | | | | This makes it easier to add suport for BIND 9.10. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Matthieu Patou <mat@matws.net>
* samba-tool group add: Add option --nis-domain and --gidMarc Muehlfeld2014-10-232-3/+25
| | | | | | | | | | This allows creating RFC2307 enabled groups via samba-tool Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Oct 23 18:19:35 CEST 2014 on sn-devel-104
* samba-tool: Add exception when trying to add/remove none existent users from ↵Marc Muehlfeld2014-10-231-1/+1
| | | | | | | | | | | | | a group. This allows a better scripting around samba-tool for adding/removing users to/from groups. Before the output and the return code had indicated that everything was successul. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10871 Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Add missing parameters to drs_Replicate in rodc.pyMichael Brown2014-10-231-1/+3
| | | | | | | | | | | | | * rodc.py: destination_dsa_guid parameter was neglected in drs_Replicate call * rodc.py: cancel the local_samdb transaction on error Change-Id: I962315a26ec48dc8774bb41db760387a3469c919 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Thu Oct 23 03:05:00 CEST 2014 on sn-devel-104
* tests: Allow "max open files" to differ from the documentationAndrew Bartlett2014-10-171-1/+2
| | | | | | | | | | It is system-dependent. Andrew Bartlett Change-Id: Icf21476c00295a428ad808bc56ab8153f109627f Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* urgent_replication: Use subunit reporting, remove allow_empty_output.Jelmer Vernooij2014-10-141-2/+5
| | | | | | Change-Id: I6d479b218eff6c4292fbb99e4760bbd62ce1f380 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba.tests.unicodenames: Fix docstring formatting so pydoctor understands it.Jelmer Vernooij2014-10-141-3/+2
| | | | | | Change-Id: I8983cd4483c380fd0c9e4da843eb70750450a0fa Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_tool_drs: Fix docstring formatting so pydoctor groks it.Jelmer Vernooij2014-10-141-23/+28
| | | | | | Change-Id: I827044ef876118935b0f91e318d3c815326a2f01 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba.tests.source: Fix lint.Jelmer Vernooij2014-10-141-2/+2
| | | | | | Change-Id: I3dc614c34aa2c4fca6f2ca68196e71b9129b5b76 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove obsolete pep8 test.Jelmer Vernooij2014-10-141-54/+0
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Change-Id: I7f6634a035e9c93820cd4eef0261ecd5dd3865ab
* Fix more pep8 issues in code I touched recently.Jelmer Vernooij2014-10-146-27/+41
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Change-Id: I35f3204bdf5d00b3280d703427ded2fa2163a6f7
* Remove last instances of pep8 error E602 (old style exceptions).Jelmer Vernooij2014-10-141-3/+3
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Change-Id: If709757643e6eed8cffa8950170c337f51edb9d9
* Remove last instance of pep8 error E701 (more statements on one line).Jelmer Vernooij2014-10-141-1/+2
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Change-Id: I419f0536b43d98ce6bb52c5907413a02ea1a6937
* Remove remaining instance of pep8 E211 (too many spaces before operator).Jelmer Vernooij2014-10-144-19/+19
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Change-Id: I9af3bf582bba8fc1094addb12cd0a5ce04406b5b
* tests: Pass the test context as lp_ctx for messaging testsMatthieu Patou2014-10-081-1/+2
| | | | | Change-Id: I1acf5c42b21465a8c45549039f0054414b8f31d1 Signed-off-by: Matthieu Patou <mat@matws.net>
* provision: Change the default functional level of new Samba domains to 2008R2.Andrew Bartlett2014-09-302-3/+3
| | | | | | | Windows 2003 is going out of support shortly, and we want users to have AES by default Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* provision: explain why this is requiredAndrew Bartlett2014-09-271-0/+8
| | | | | | Change-Id: Iaf8b13010b52e03db2eefe1ad565d7ca768ffb48 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool: fix reply when zero day pwd expiry is setBjörn Jacke2014-09-081-4/+4
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10318 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Mon Sep 8 14:15:51 CEST 2014 on sn-devel-104
* join.py: Set NT ACL on crossRef object for new partitionAndrew Bartlett2014-09-022-4/+14
| | | | | | | | | | Change-Id: Icb1b00697cc5641481370ded26f2f0551a5b2a97 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 2 14:15:54 CEST 2014 on sn-devel-104
* samba-tool/ldapcmp: update the list of non replicated attributesStefan Metzmacher2014-09-021-13/+49
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10788 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Sep 2 03:49:49 CEST 2014 on sn-devel-104
* join.py: Ensure to fill in samAccountName so we get the domain$ accountAndrew Bartlett2014-09-011-1/+2
| | | | | | | | | | Otherwise, we get a random samAccountName Andrew Bartlett Change-Id: I87ea532fe22c1b2d2effd52859da3b357f692b5a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* provision: Only create hard links for ForestDnsZones if it exists on this DCAndrew Bartlett2014-09-011-4/+8
| | | | | | | | | | We might be a subdomain, and not host this partition. Andrew Bartlett Change-Id: I9aa32c5692cd9fd0a6bced8bea37cd8593b31906 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* join.py: Ensure we set the SID of the parent domain on the trust recordAndrew Bartlett2014-09-011-1/+2
| | | | | | | Change-Id: Ifaf3f2d1240d983a48ee1874fdc9c266354f6754 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* python: Use the security.dom_sid type for ctx.domsid in join.py and provisionAndrew Bartlett2014-09-015-9/+11
| | | | | | | Change-Id: I1266f77184d68aae6a39a73bac8a432fdd707b2e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* provision: Use names.domainsid and names.domainguidAndrew Bartlett2014-09-013-46/+55
| | | | | | | | | | | | | This is better than passing around parameters to functions all over the provision stack and makes it easier to pass in a seperate forest SID when we start to support subdomains. Change-Id: I3787f4f3433ca04628f888135c7c0c8195379542 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* provision: Only calculate ForestDNSZone GUID if we need itAndrew Bartlett2014-09-011-5/+4
| | | | | | | Change-Id: Ie33812627ce7ececda681c2d784b1ca97b1b73c4 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* join.py: Reinstate full_nc_list and make creation of NTDS-DSA object commonAndrew Bartlett2014-09-011-32/+34
| | | | | | | | | | | | The new function join_ntdsdsa_obj() returns the object, to be added over LDAP or DsAddEntry(). Andrew Bartlett Change-Id: I41ac256fb3d4edffc617af4ae580acd941b4de83 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* samba.netcmd.domain: desactivating -> deactivating.Jelmer Vernooij2014-08-311-1/+1
| | | | | | Change-Id: I463823589049e81bcd4032f3e7bc6b5f2fb0d28d Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* samba.netcmd.domain: Fix incorrect variable names, causing NameErrors.Jelmer Vernooij2014-08-311-4/+4
| | | | | | Change-Id: I1c78f07f942a8b03ac88de98b18ac636b7124e22 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* samba.netcmd.domain: Remove unused import.Jelmer Vernooij2014-08-311-1/+0
| | | | | | Change-Id: I33f3ba55540be01fd15bfc3d75ebb73cbf5ead9e Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* samba.netcmd.domain: Just catch ImportError, not any parsing errors in ↵Jelmer Vernooij2014-08-311-2/+3
| | | | | | | | cmd_domain_export_keytab. Change-Id: If5710565c74e87fe218a83f31cddcf64605e522e Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* python/join: use lowercase for the dnshostname.Stefan Metzmacher2014-08-261-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Redescribe --userou usageMarc Muehlfeld2014-08-061-2/+2
| | | | | Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* tests: dnsserver: Remove duplicate empty test functionAmitay Isaacs2014-07-301-4/+0
| | | | | | | | | | This test function is defined further in the file. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jul 30 07:00:57 CEST 2014 on sn-devel-104
* tests: dnsserver: Add a update test with name set to '.'Amitay Isaacs2014-07-291-1/+40
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 29 19:33:19 CEST 2014 on sn-devel-104
* dbcheck: Add check and test for various invalid userParameters valuesAndrew Bartlett2014-07-091-0/+90
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077 Change-Id: I6f2f4169856ce78c62e3a7e74b48520cca9cb9ae Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* param: Amend docs.py test to check dumping of flagged parametersGarming Sam2014-07-081-1/+70
| | | | | | | | | | | | | | | | | This test uses an empty smb.conf file to check if the resulting output from testparm is empty. It also sets a parameter as default in an smb.conf file and then sets the option on the command line to ensure they are displayed correctly. Change-Id: I48f05b6e3c9e5cd856e89b196e00ae35eb93bf9f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jul 8 01:57:59 CEST 2014 on sn-devel-104
* param: remove idmap parameters as special cases in docs.pyGarming Sam2014-07-071-3/+0
| | | | | | | Change-Id: Ie2395ddbe9e055b9972fd859615a022d9f675014 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: handle smb_ports as a special handlerGarming Sam2014-07-071-2/+4
| | | | | | | | | | Avoids some problems with using str_list_make and str_list_make_v3 and tries to verify if the ports assignment is reasonable Change-Id: I441c4cca605c7548a5023b65994004fbac57d2df Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* samba-tool domain: remove duplicate check if site is setBjörn Baumbach2014-06-181-3/+0
| | | | | | Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>