From: Kacper Boström Date: Tue, 10 Sep 2024 16:40:24 +0000 (+0200) Subject: samba-tool: Fix for inability to delete GPOs containing GPWL policies X-Git-Tag: tdb-1.4.13~1153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb12f19e4fe100029c32bdab92aa6515be7e71f6;p=thirdparty%2Fsamba.git samba-tool: Fix for inability to delete GPOs containing GPWL policies GPOs containing GPWL (Wireless/Wired Protocol Extension) policies could not be deleted with samba-tool as those policies were stored as subentries of the GPO and only the main root was deleted. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15387 RN: Fix for inability to delete GPOs containing GPWL policies using samba-tool Signed-off-by: Kacper Boström Reviewed-by: David Mulder Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Sep 24 17:11:53 UTC 2024 on atb-devel-224 --- diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py index ba55b2ec7a7..96fce917f0f 100644 --- a/python/samba/netcmd/gpo.py +++ b/python/samba/netcmd/gpo.py @@ -1770,8 +1770,8 @@ class cmd_del(GPOCommand): # Remove LDAP entries gpo_dn = get_gpo_dn(self.samdb, gpo) - self.samdb.delete(ldb.Dn(self.samdb, "CN=User,%s" % str(gpo_dn))) - self.samdb.delete(ldb.Dn(self.samdb, "CN=Machine,%s" % str(gpo_dn))) + self.samdb.delete(ldb.Dn(self.samdb, "CN=User,%s" % str(gpo_dn)), ["tree_delete:1"]) + self.samdb.delete(ldb.Dn(self.samdb, "CN=Machine,%s" % str(gpo_dn)), ["tree_delete:1"]) self.samdb.delete(gpo_dn) # Remove GPO files