summaryrefslogtreecommitdiff
path: root/python/samba/tests/ntacls.py
AgeCommit message (Collapse)AuthorFilesLines
2025-03-19pytest:ntacls: test dsacl2fsacl() with a few stringsDouglas Bagnall1-1/+74
The fsacl should end up without object ACEs, and with some flags set and mask changes. We are so far only testing with allow, deny, and object ACEs. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14927 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-05-10tests/ntacls: unblock failing gitlab pipelines because test_setntacl_forcenativeStefan Metzmacher1-1/+1
This expects PermissionError: [Errno 1] Operation not permitted, but it seems that setxattr() for security.NTACL works on gitlab runners without being root. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-30python: tests: update all super calls to python 3 style in testsRob van der Linde1-2/+2
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> [abartlet@samba.org Some python2 style super() calls remain due to being an actual, even if reasonable, behaviour change]
2023-04-28s3/utils: when encoding ace string use "FA", "FR", "FW", "FX" string rightsNoel Power1-1/+1
prior to this patch rights matching "FA", "FR", "FW", "FX" were outputted as the hex string representing the bit value. While outputting the hex string is perfectly fine, it makes it harder to compare icacls output (which always uses the special string values) Additionally adjust various tests to deal with use of shortcut access masks as sddl format now uses FA, FR, FW & FX strings (like icalcs does) instead of hex representation of the bit mask. adjust samba4.blackbox.samba-tool_ntacl samba3.blackbox.large_acl samba.tests.samba_tool.ntacl samba.tests.ntacls samba.tests.posixacl so various string comparisons of the sddl format now pass Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> [abartlet@samba.org Adapted to new stricter SDDL behaviour around leading zeros in hex numbers, eg 0x001]
2023-04-28pytest:ntacls: adapt for canonical flag formatDouglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-07pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall1-2/+2
TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2019-12-20pysmbd: make "session_info" arg to py_smbd_get_nt_acl() mandatoryRalph Boehme1-2/+2
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-12-20pysmbd: make "session_info" arg to py_smbd_set_nt_acl() mandatoryRalph Boehme1-5/+7
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-06-28tests/ntacls: fix pep8 warningsJoe Guo1-22/+27
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Jun 28 12:14:59 CEST 2018 on sn-devel-144
2018-06-28tests/ntacls: use global vars to make code DRYJoe Guo1-14/+12
Move acl and dommain_sid to global vars so we don't repeat them in every test. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2015-03-06Rename TestSkipped to Skiptest, consistent with Python 2.7.Jelmer Vernooij1-4/+3
Change-Id: I023df54363328333f1cb6c3ae3c1a406befa8f7b Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij1-0/+83
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