samba-tool gpo: Fix unintended string concatenations
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 5 May 2022 09:08:06 +0000 (21:08 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 10 May 2022 05:19:34 +0000 (05:19 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
python/samba/netcmd/gpo.py
selftest/knownfail.d/gpo [deleted file]

index 5d936e0e646267a889de67b59333deea877b498a..71664e662120d0c599f41e36a7cfd75fb094fd91 100644 (file)
@@ -3702,7 +3702,7 @@ samba-tool gpo manage access list {31B2F340-016D-11D2-945F-00C04FB984F9}
 
         realm = self.lp.get('realm')
         vgp_xml = '\\'.join([realm.lower(), 'Policies', gpo,
-                             'MACHINE\\VGP\\VTLA\\VAS'
+                             'MACHINE\\VGP\\VTLA\\VAS',
                              'HostAccessControl\\Allow\\manifest.xml'])
         try:
             allow = ET.fromstring(conn.loadfile(vgp_xml))
@@ -3727,7 +3727,7 @@ samba-tool gpo manage access list {31B2F340-016D-11D2-945F-00C04FB984F9}
                 self.outf.write('+:%s\\%s:ALL\n' % (domain.text, name.text))
 
         vgp_xml = '\\'.join([realm.lower(), 'Policies', gpo,
-                             'MACHINE\\VGP\\VTLA\\VAS'
+                             'MACHINE\\VGP\\VTLA\\VAS',
                              'HostAccessControl\\Deny\\manifest.xml'])
         try:
             deny = ET.fromstring(conn.loadfile(vgp_xml))
@@ -3798,11 +3798,11 @@ samba-tool gpo manage access add {31B2F340-016D-11D2-945F-00C04FB984F9} allow go
         realm = self.lp.get('realm')
         if etype == 'allow':
             vgp_dir = '\\'.join([realm.lower(), 'Policies', gpo,
-                                 'MACHINE\\VGP\\VTLA\\VAS'
+                                 'MACHINE\\VGP\\VTLA\\VAS',
                                  'HostAccessControl\\Allow'])
         elif etype == 'deny':
             vgp_dir = '\\'.join([realm.lower(), 'Policies', gpo,
-                                 'MACHINE\\VGP\\VTLA\\VAS'
+                                 'MACHINE\\VGP\\VTLA\\VAS',
                                  'HostAccessControl\\Deny'])
         else:
             raise CommandError("The entry type must be either 'allow' or "
@@ -3930,11 +3930,11 @@ samba-tool gpo manage access remove {31B2F340-016D-11D2-945F-00C04FB984F9} allow
         realm = self.lp.get('realm')
         if etype == 'allow':
             vgp_dir = '\\'.join([realm.lower(), 'Policies', gpo,
-                                 'MACHINE\\VGP\\VTLA\\VAS'
+                                 'MACHINE\\VGP\\VTLA\\VAS',
                                  'HostAccessControl\\Allow'])
         elif etype == 'deny':
             vgp_dir = '\\'.join([realm.lower(), 'Policies', gpo,
-                                 'MACHINE\\VGP\\VTLA\\VAS'
+                                 'MACHINE\\VGP\\VTLA\\VAS',
                                  'HostAccessControl\\Deny'])
         else:
             raise CommandError("The entry type must be either 'allow' or "
diff --git a/selftest/knownfail.d/gpo b/selftest/knownfail.d/gpo
deleted file mode 100644 (file)
index 837f9c7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba.tests.samba_tool.gpo_exts.samba.tests.samba_tool.gpo_exts.GpoCmdTestCase.test_vgp_access_list