summaryrefslogtreecommitdiff
path: root/python/samba/descriptor.py
AgeCommit message (Collapse)AuthorFilesLines
2023-10-16CVE-2018-14628: python:descriptor: let samba-tool dbcheck fix the ↵Stefan Metzmacher1-1/+14
nTSecurityDescriptor on CN=Deleted Objects containers BUG: https://bugzilla.samba.org/show_bug.cgi?id=13595 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-16CVE-2018-14628: python:descriptor: add get_deletedobjects_descriptor()Stefan Metzmacher1-0/+10
samba-tool drs clone-dc-database was quite useful to find the true value of nTSecurityDescriptor of the CN=Delete Objects containers. Only the auto inherited SACL is available via a ldap search. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13595 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-23python:samba: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jun 23 14:51:14 UTC 2023 on atb-devel-224
2023-05-05python:descriptor: add missing schema 2019 aces in builtin and dns partitionStefan Metzmacher1-0/+8
Note 'samba-tool domain functionalprep' won't fix them in the database, while a fresh provision will add these. This is needed in order that 'samba-tool dbcheck --reset-well-known-acls' won't reset them after a modern provision and will fix them on an old domain. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-22python/samba: let get_domain_descriptor() include adprep 2016 ACEsStefan Metzmacher1-0/+7
We need to make sure a new provision as well as dbcheck --reset-well-known-acls include acls used by adprep 2016, otherwise we would undo the adprep result. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-02-23python: fix mutable default argumentsRob van der Linde1-21/+84
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 23 23:33:46 UTC 2023 on atb-devel-224
2022-03-17python: Restore SDDL abbreviations for SIDsJoseph Sutton1-5/+5
This time we use the correct values. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-03-17python: Use explicit SIDs instead of SDDL abbreviationsJoseph Sutton1-8/+8
This is to prepare for changing the SDDL string values. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+24
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>
2018-08-24PEP8: fix E251: unexpected spaces around keyword / parameter equalsJoe Guo1-1/+1
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>
2018-08-24PEP8: fix E225: missing whitespace around operatorJoe Guo1-2/+2
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>
2018-08-24PEP8: fix E122: continuation line missing indentation or outdentedJoe Guo1-235/+235
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>
2018-08-17descriptor: add missing backslash for long sddl strJoe Guo1-2/+2
Find this bug while doing PEP8. We are lucky this code was not used yet. 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>
2018-04-30python: Bulk conversion callers of ldb.Dn second paramNoel Power1-2/+2
Convert second param passed to ldb.Dn to be unicode so py2 & py3 code will work Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-04-05selftest: enable py3 for samba.tests.upgradeprovisionJoe Guo1-8/+8
1. `has_key` was removed from dict in Python 3, use `in` instead. 2. `cmp` was removed in Python 3, define it ourselves. 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>
2017-12-202008R2: Missing operation (75, 76) for ActiveDirectoryUpdate version 5 (FL)Garming Sam1-0/+11
Operation 75 {5e1574f6-55df-493e-a6-71-aa-ef-fc-a6-a1-00} - Create the CN=Managed Service Accounts object Operation 76 {d262aae8-41f7-48ed-9f-35-56-bb-b6-77-57-3d} - Add otherWellKnownObject link for CN=Managed Service Accounts Referenced in the page 'Windows Server 2008R2: Domain-Wide Updates': https://technet.microsoft.com/en-us/library/dd378973(v=ws.10).aspx Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-09-02join.py: Set NT ACL on crossRef object for new partitionAndrew Bartlett1-1/+7
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
2013-03-25scripting: Modify samba.descriptor.get_diff_sds() to cope with a missing ↵Andrew Bartlett1-2/+2
reference owner This allows the reference SD not to have an owner specified, and still have the comparison with a database SD that does have an owner pass. (And the same for owning group). Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Move get_diff_sds from samba.upgradehelpers to samba.descriptorAndrew Bartlett1-0/+154
This helps avoid a dependency loop when we use get_diff_sds in dbcheck. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Modify samba.descriptor.get_wellknown_sds() use samdb calls onlyAndrew Bartlett1-49/+58
We need this routine not to use the names context as this is tied to provision, and we end up in a circular dependency if we use that in dbcheck. Andrew Bartlett
2013-03-25scripting: Move samba.provision.descriptor to samba.descriptorAndrew Bartlett1-0/+418
This will allow dbcheck to import it, without a cirucular dependency via samba.provision importing dbcheck. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>