gpo: Apply Group Policy Monthly Scripts
authorDavid Mulder <dmulder@suse.com>
Thu, 25 Jun 2020 21:02:37 +0000 (15:02 -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 55dae86199dec118314fd668398f888cbde26b68..cf7946114a2be80b2f607501db0bc11a4807b6b6 100755 (executable)
@@ -9,8 +9,10 @@
       <string id="CAT_7D8D7DC8_5A9D_4BE1_8227_F09CDD5AFFC6">Unix Settings</string>\r
       <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_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
     </stringTable>\r
     <presentationTable>\r
       <presentation id="POL_9320E11F_AC80_4A7D_A5C8_1C0F3F727061">\r
@@ -19,6 +21,9 @@
       <presentation id="POL_825D441F_905E_4C7E_9E4B_03013697C6C1">\r
         <listBox refId="LST_1AA93D59_6372_4F1E_90BB_D4CBBBB77238">Script and arguments</listBox>\r
       </presentation>\r
+      <presentation id="POL_D298F3BD_44D9_426D_AF11_3163D31582F6">\r
+        <listBox refId="LST_8BC6757D_B1FB_4780_83B4_F85F27BF6E60">Script and arguments</listBox>\r
+      </presentation>\r
     </presentationTable>\r
   </resources>\r
 </policyDefinitionResources>\r
index 1a67bddf809882fcecaa12553c8708e5bfe0a202..f72e601e9a82921b6c16dd42f3389828a61d92d0 100755 (executable)
         <list id="LST_1AA93D59_6372_4F1E_90BB_D4CBBBB77238" key="Software\Policies\Samba\Unix Settings\Hourly Scripts" valueName="Hourly Scripts" />\r
       </elements>\r
     </policy>\r
+    <policy name="POL_D298F3BD_44D9_426D_AF11_3163D31582F6" class="Machine" displayName="$(string.POL_D298F3BD_44D9_426D_AF11_3163D31582F6)" explainText="$(string.POL_D298F3BD_44D9_426D_AF11_3163D31582F6_Help)" presentation="$(presentation.POL_D298F3BD_44D9_426D_AF11_3163D31582F6)" 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_8BC6757D_B1FB_4780_83B4_F85F27BF6E60" key="Software\Policies\Samba\Unix Settings\Monthly Scripts" valueName="Monthly Scripts" />\r
+      </elements>\r
+    </policy>\r
   </policies>\r
 </policyDefinitions>\r
index 93a5ef778cbd352e9c9e821a0a94f664728ebe9d..0babf8765a7b0c52b006c9a25f5e30d184e2c7f3 100644 (file)
@@ -36,6 +36,7 @@ class gp_scripts_ext(gp_pol_ext):
             if gpo.file_sys_path:
                 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\\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