summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-0253-7489/+0
| | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104
* ntdb: switch between secrets.tdb and secrets.ntdb depending on 'use ntdb'Rusty Russell2013-02-203-5/+8
| | | | | | | | | | | Since we open with dbwrap, it auto-converts old tdbs (which it will rename to secrets.tdb.bak once it's done). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Wed Feb 20 07:09:19 CET 2013 on sn-devel-104
* selftest: add a test that demonstrates how new ACL blob code helpsChristian Ambach2013-02-041-0/+17
| | | | | | | | this test shows that a change to POSIX ACL->SD mapping behavior does not invalidate the stored SD Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:tests/samba_tool/gpo.py: fix accidential line breakMichael Adam2012-11-301-2/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:tests/samba_tool/gpo.py: add test_show_as_admin()Stefan Metzmacher2012-11-301-0/+5
| | | | | | | | This calls samba-tool gpo show as admin (which should be able to see the full nTSecurityDescriptor. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* samba-tool: Add new samba-tool gpo aclcheck and testAndrew Bartlett2012-11-161-0/+10
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* smbd: Remove NT4 compatability handling in posix -> NT ACL conversionAndrew Bartlett2012-11-131-6/+6
| | | | | | | | | | | | | | | | | NT4 is long dead, and we should not change which ACL we return based on what we think the client is. The reason we should not do this, is that if we are using vfs_acl_xattr then the hash will break if we do. Additionally, it would require that the python VFS interface set the global remote_arch to fake up being a modern client. This instead seems cleaner and removes untested code (the tests are updated to then handle the results of the modern codepath). The supporting 'acl compatability' parameter is also removed. Andrew Bartlett Reviewed by: Jeremy Allison <jra@samba.org>
* selftest: Add --tmpdir to 'samba-tool gpo create' testAndrew Bartlett2012-11-132-3/+9
| | | | | | | | | | | | | | | | This was the cause of the flakey test, and was only noticed when multiple different users ran autobuild at the same time on the same server. We use shutil.rmtree to wipe the directory before the tests finishes as required by the TestCaseInTempDir class. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Nov 13 10:50:56 CET 2012 on sn-devel-104
* selftest: Avoid returning errors (rather than failures) in gpo testAndrew Bartlett2012-11-131-2/+4
| | | | | | | | This should help find the real cause of the flakey test, if it ever returns. Andrew Bartlett Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* selftest: Avoid test cross-contamination in samba.tests.posixaclAndrew Bartlett2012-11-121-81/+59
| | | | | | | | | | | This creates a new xattr.tdb per unit test, which avoids once and for all the issue of dev/inode reuse. For test_setposixacl_dir_getntacl_smbd the file ownership also set specifically. Andrew Bartlett Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* selftest: Add tests for expected behaviour on directories as well as filesAndrew Bartlett2012-11-111-0/+197
| | | | | | | | | | | | | | | | | This is important because it covers the codepath which had the talloc error fixed by commit 60cf4cb5a630506747431ecbf00d890509baf2f3 (vfs_acl_common: In add_directory_inheritable_components allocate on psd as parent) Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Nov 11 15:48:10 CET 2012 on sn-devel-104
* pysmbd: Add SMB_ACL_EXECUTE to the mask set by make_simple_acl()Andrew Bartlett2012-11-121-2/+2
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Make samba.tests.ntacl also use TestCaseInTempDirAndrew Bartlett2012-11-121-37/+31
| | | | | | | | | | | This follows on from the successful conversion of samba.tests.posixacl. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: check that samba-tool gpo works for basic operationsAndrew Bartlett2012-11-061-0/+57
| | | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool: Add samba-tool processes subcommandAndrew Bartlett2012-10-311-0/+35
| | | | | | | | | | | This will allow administrators to inspect the process list in a similar way to what running on a platform with setproctitle might permit. --pid= returns the registered server names for a PID (eg kdc, cldap_server) --name= returns the pids registered with a particular name. Andrew Bartlett
* pymessaging: Add irpc_servers_byname() and irpc_all_servers()Andrew Bartlett2012-10-311-0/+9
| | | | | | This will allow python scripts to inspect the process list. Andrew Bartlett
* pymessaging: Use the server_id IDL structure rather than a tupleAndrew Bartlett2012-10-311-2/+2
| | | | | | | This will make it easier to pass this structure in and out. The tuple is still accepted as input. Andrew Bartlett
* TestCaseInTempDir: Use addCleanup rather than tearDown.Jelmer Vernooij2012-10-271-2/+3
|
* sefltest: use TestCaseInTempDir and setUp/tearDown for posixacl.py temp fileAndrew Bartlett2012-10-271-170/+62
| | | | | | | | | | This manages the temp file more reliably, and reduces the repeated code in each test case. Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Oct 27 04:37:58 CEST 2012 on sn-devel-104
* pysmbd: Add hook for unlink() so python scripts can remove xattr.tdb entriesAndrew Bartlett2012-10-261-20/+20
| | | | | | If we do not provide a way to remove files from xattr.tdb, we can re-use the inode. Andrew Bartlett
* selftest: Always unlink the tempf in posixacl testAndrew Bartlett2012-10-251-1/+4
|
* selftest: Cover the important non-Samba invalidation of the NT ACLAndrew Bartlett2012-10-251-0/+23
| | | | | | | This covers the case where we have a valid hash of the posix ACL (or the NT ACL from the POSIX ACL) and we notice it no longer matches. Andrew Bartlett
* selftest: Cover one more NT ACL invalidation case and improve commentsAndrew Bartlett2012-10-251-8/+7
| | | | | | | This tries to show the difference between the cases where we trap the POSIX ACL change and where we actually detect an OS-level change. Andrew Bartlett
* selftest: Add many more tests for our posix ACL handlingAndrew Bartlett2012-10-251-1/+236
| | | | | | | | | | | This tests the mapping of posix ACLs to NT ACLs, the invalidation of NT ACLs stored as an xattr and ensures this security-critical code continues to work in the long term. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Oct 25 10:05:16 CEST 2012 on sn-devel-104
* samba-tool user test: Fix expected output.Jelmer Vernooij2012-10-191-1/+1
| | | | | Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Fri Oct 19 11:37:44 CEST 2012 on sn-devel-104
* samba.tests.docs: Ignore removed parameters.Jelmer Vernooij2012-10-191-0/+2
|
* samba.tests.docs: Assume docs are generated by waf.Jelmer Vernooij2012-10-191-2/+6
|
* samba.tests.docs: Write error output from xsltproc to standard out.Jelmer Vernooij2012-10-191-1/+1
|
* samba.tests.docs: Skip tests if xsltproc is not present.Jelmer Vernooij2012-10-191-5/+24
|
* smb.conf(5): Consistent spelling of parameter names.Jelmer Vernooij2012-10-191-3/+3
| | | | This includes spacing and casing.
* samba.tests.docs: Support spaces before synonyms.Jelmer Vernooij2012-10-191-1/+1
|
* samba.tests.docs: Support synonyms.Jelmer Vernooij2012-10-191-0/+4
|
* samba.tests.docs: Distinguish between unknown and undocumened parameters.Jelmer Vernooij2012-10-191-1/+9
|
* tests: Convert find_missing_doc into a unit test.Jelmer Vernooij2012-10-191-0/+90
|
* Tests for 'samba-tool user create' with RFC2307 attributesAlexander Wuerstlein2012-10-182-8/+139
| | | | | | | | | | | | | | | | Check if attributes are correctly set and read from SamDB Test automatic creation of attributes from getpwent (NSS) Check if overriding NSS attributes works getpwent will be skipped if the current UID of the user running the tests has no passwd entry (getpwuid(geteuid())). If a user with the name of the current UID already exists in the directory, the getpwent test will fail. If that should happen, the test would need to be updated to use a nonexistent UID that is visible to the Python 'pwd' module. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* provision: No longer use the wheel group in new AD DomainsAndrew Bartlett2012-10-181-4/+4
| | | | | | | | | | | The issue here is that if we set S-1-5-32-544 (administrators) to a GID only, then users cannot force a mandetory profile to be owned by administrators (which is a requirement). There is no particularly useful reason for us to enforce this matching a system group. Andrew Bartlett
* Removed phpldapadmin inclusion for Samba 4.Ricky Nance2012-10-171-10/+0
| | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Oct 17 12:55:44 CEST 2012 on sn-devel-104
* s4 dns: Fix return code for deleted recordsKai Blin2012-09-301-3/+43
| | | | | | | | | | This fixes bug #9225. We already had a test for this scenario, but the test wasn't correct. This patch fixes the test, and also fixes the bug. Signed-off-by: Kai Blin <kai@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Sun Sep 30 13:09:14 CEST 2012 on sn-devel-104
* s4-python: Various formatting fixes.Jelmer Vernooij2012-09-2715-101/+101
| | | | | | * Trailing whitespace * use of "==" where "is" should be used * double spaces
* samba.tests.source: Check for trailing whitespace in Python files.Jelmer Vernooij2012-09-271-1/+16
|
* s4:dns.py: reproducer for (bug #9184)Stefan Metzmacher2012-09-221-0/+29
| | | | | | | metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Sep 22 06:08:05 CEST 2012 on sn-devel-104
* s4-python: Formatting fixes, break lines.Jelmer Vernooij2012-09-168-11/+23
| | | | | Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Sep 16 15:58:04 CEST 2012 on sn-devel-104
* s4 dns: Run python tests in fl2003dc envKai Blin2012-09-121-19/+19
|
* smbd-posix_acls: Use a IDL union to store the ACL entryAndrew Bartlett2012-09-121-41/+11
| | | | | | | This is a clearer, long-term-stable structure we can hash without risking it changing. Andrew Bartlett
* selftest: Add python blackbox tests for samba-tool ntacl get/setAndrew Bartlett2012-09-051-2/+67
| | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 5 15:47:55 CEST 2012 on sn-devel-104
* s4-selftest: Try a more complex ACL - this example from a GPOAndrew Bartlett2012-09-041-0/+14
| | | | | | | Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Sep 4 11:30:17 CEST 2012 on sn-devel-104
* s4-selftest: Try to make ntacl unit tests better match their namesAndrew Bartlett2012-09-041-5/+5
| | | | | | | We are trying to test combinations of setting and getting via the VFS and directly to the underlying DB. Andrew Bartlett
* s4-dsdb: Add secrets_tdb_sync - an ldb module to keep secrets.tdb in syncAndrew Bartlett2012-08-283-2/+4
| | | | | | | | | | | secrets_tdb_sync is a new ldb module designed to sync secrets.ldb entries with the secrets.tdb file. While not ideal to keep two copies of this data, this routine will assist in allowing the samba-tool domain join code to operate correctly in most cases where winbindd and smbd are used. Andrew Bartlett
* s4-selftest: Add test for samba-tool ntacl sysvolcheckAndrew Bartlett2012-08-231-0/+26
|
* s4-selftest: Add testing of samba-tool ntacl sysvolresetAndrew Bartlett2012-08-231-0/+44
|