gpo: Apply Group Policy Weekly Scripts
authorDavid Mulder <dmulder@suse.com>
Thu, 25 Jun 2020 21:23:14 +0000 (15:23 -0600)
committerDavid Mulder <dmulder@samba.org>
Thu, 6 Aug 2020 16:38:35 +0000 (16:38 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
libgpo/admx/en-US/samba.adml
libgpo/admx/samba.admx
python/samba/gp_scripts_ext.py
selftest/knownfail.d/gpo [deleted file]

index cf7946114a2be80b2f607501db0bc11a4807b6b6..4a534265cfa1a1beab650e3e6d194e2c5249dade 100755 (executable)
       <string id="POL_9320E11F_AC80_4A7D_A5C8_1C0F3F727061">Daily Scripts</string>\r
       <string id="POL_825D441F_905E_4C7E_9E4B_03013697C6C1">Hourly Scripts</string>\r
       <string id="POL_D298F3BD_44D9_426D_AF11_3163D31582F6">Monthly Scripts</string>\r
+      <string id="POL_3ACC7ECD_8086_4F4A_96DF_85B8FDE2F674">Weekly Scripts</string>\r
       <string id="POL_9320E11F_AC80_4A7D_A5C8_1C0F3F727061_Help">This policy setting allows you to execute commands, either local or on remote storage, daily.</string>\r
       <string id="POL_825D441F_905E_4C7E_9E4B_03013697C6C1_Help">This policy setting allows you to execute commands, either local or on remote storage, hourly.</string>\r
       <string id="POL_D298F3BD_44D9_426D_AF11_3163D31582F6_Help">This policy setting allows you to execute commands, either local or on remote storage, monthly.</string>\r
+      <string id="POL_3ACC7ECD_8086_4F4A_96DF_85B8FDE2F674_Help">This policy setting allows you to execute commands, either local or on remote storage, weekly.</string>\r
     </stringTable>\r
     <presentationTable>\r
       <presentation id="POL_9320E11F_AC80_4A7D_A5C8_1C0F3F727061">\r
@@ -24,6 +26,9 @@
       <presentation id="POL_D298F3BD_44D9_426D_AF11_3163D31582F6">\r
         <listBox refId="LST_8BC6757D_B1FB_4780_83B4_F85F27BF6E60">Script and arguments</listBox>\r
       </presentation>\r
+      <presentation id="POL_3ACC7ECD_8086_4F4A_96DF_85B8FDE2F674">\r
+        <listBox refId="LST_1E7198A6_7850_4CAB_B656_BC18752564FC">Script and arguments</listBox>\r
+      </presentation>\r
     </presentationTable>\r
   </resources>\r
 </policyDefinitionResources>\r
index f72e601e9a82921b6c16dd42f3389828a61d92d0..43ce62961d337b543c96738f4f1e5889e955ce9c 100755 (executable)
         <list id="LST_8BC6757D_B1FB_4780_83B4_F85F27BF6E60" key="Software\Policies\Samba\Unix Settings\Monthly Scripts" valueName="Monthly Scripts" />\r
       </elements>\r
     </policy>\r
+    <policy name="POL_3ACC7ECD_8086_4F4A_96DF_85B8FDE2F674" class="Machine" displayName="$(string.POL_3ACC7ECD_8086_4F4A_96DF_85B8FDE2F674)" explainText="$(string.POL_3ACC7ECD_8086_4F4A_96DF_85B8FDE2F674_Help)" presentation="$(presentation.POL_3ACC7ECD_8086_4F4A_96DF_85B8FDE2F674)" key="Software\Policies\Samba\Unix Settings">\r
+      <parentCategory ref="CAT_7D8D7DC8_5A9D_4BE1_8227_F09CDD5AFFC6" />\r
+      <supportedOn ref="windows:SUPPORTED_WindowsVista" />\r
+      <elements>\r
+        <list id="LST_1E7198A6_7850_4CAB_B656_BC18752564FC" key="Software\Policies\Samba\Unix Settings\Weekly Scripts" valueName="Weekly Scripts" />\r
+      </elements>\r
+    </policy>\r
   </policies>\r
 </policyDefinitions>\r
index 0babf8765a7b0c52b006c9a25f5e30d184e2c7f3..ac812f844ca4aea99add38d0151160cf7e4b048a 100644 (file)
@@ -37,6 +37,7 @@ class gp_scripts_ext(gp_pol_ext):
                 reg_key = 'Software\\Policies\\Samba\\Unix Settings'
                 sections = { '%s\\Daily Scripts' % reg_key : '/etc/cron.daily',
                              '%s\\Monthly Scripts' % reg_key : '/etc/cron.monthly',
+                             '%s\\Weekly Scripts' % reg_key : '/etc/cron.weekly',
                              '%s\\Hourly Scripts' % reg_key : '/etc/cron.hourly' }
                 self.gp_db.set_guid(gpo.name)
                 pol_file = 'MACHINE/Registry.pol'
diff --git a/selftest/knownfail.d/gpo b/selftest/knownfail.d/gpo
deleted file mode 100644 (file)
index 27f3459..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba.tests.gpo.samba.tests.gpo.GPOTests.test_gp_scripts