[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Nov 15 02:10:01 UTC 2022


The branch, master has been updated
       via  15696da0151 gp: Fix startup scripts add not always set runonce
       via  4321be515b4 gp: Fix startup scripts list not fail with empty args
       via  f04f205d273 gp: startup scripts list enclude newline in output
       via  3bee89c1cfa gp: startup scripts add clarify 'args' option
       via  096a323a8ce gp: Fix startup scripts add args
      from  fa4eba131b8 s3: smbd: Always use metadata_fsp() when processing fsctls.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 15696da01515692b5a3ce647e3049229e5b82393
Author: David Mulder <dmulder at samba.org>
Date:   Mon Nov 14 10:50:28 2022 -0700

    gp: Fix startup scripts add not always set runonce
    
    The runonce is always being set because neither
    True nor False is ever None.
    
    Signed-off-by: David Mulder <dmulder at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Nov 15 02:09:45 UTC 2022 on sn-devel-184

commit 4321be515b41ac4b129e2334f19cfd628809cf3d
Author: David Mulder <dmulder at samba.org>
Date:   Mon Nov 14 09:49:18 2022 -0700

    gp: Fix startup scripts list not fail with empty args
    
    This fixes the startup scripts list command to
    not fail when the parameters variable is empty.
    
    Signed-off-by: David Mulder <dmulder at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f04f205d273605b0c09799cc55fc218ce907c827
Author: David Mulder <dmulder at samba.org>
Date:   Mon Nov 14 09:35:31 2022 -0700

    gp: startup scripts list enclude newline in output
    
    The output for listing startup scripts wasn't
    clear because there was no newline between
    entries.
    
    Signed-off-by: David Mulder <dmulder at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 3bee89c1cfa53f76728a54536f9d33e134b952c1
Author: David Mulder <dmulder at samba.org>
Date:   Mon Nov 14 09:34:35 2022 -0700

    gp: startup scripts add clarify 'args' option
    
    Make sure it is clear how to specify args for the
    command, and that multiple args can be passed
    wrapped in quotes.
    
    Signed-off-by: David Mulder <dmulder at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 096a323a8ce57fd75f3857449d9aaf74cb10344b
Author: David Mulder <dmulder at samba.org>
Date:   Mon Nov 14 09:31:41 2022 -0700

    gp: Fix startup scripts add args
    
    The args for the command could not be parsed
    because samba-tool detects the '-' and thinks its
    part of the samba-tool command.
    
    Signed-off-by: David Mulder <dmulder at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 python/samba/netcmd/gpo.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py
index fe8afa7d9a0..eefce9d8d0e 100644
--- a/python/samba/netcmd/gpo.py
+++ b/python/samba/netcmd/gpo.py
@@ -3126,8 +3126,12 @@ samba-tool gpo manage scripts startup list {31B2F340-016D-11D2-945F-00C04FB984F9
                 run_as = run_as.text
             else:
                 run_as = 'root'
-            self.outf.write('@reboot %s %s %s' % (run_as, script_path,
-                                                  parameters.text))
+            if parameters is not None:
+                parameters = parameters.text
+            else:
+                parameters = ''
+            self.outf.write('@reboot %s %s %s\n' % (run_as, script_path,
+                                                  parameters))
 
 class cmd_add_startup(Command):
     """Adds VGP Startup Script Group Policy to the sysvol
@@ -3135,7 +3139,7 @@ class cmd_add_startup(Command):
 This command adds a startup script policy to the sysvol.
 
 Example:
-samba-tool gpo manage scripts startup add {31B2F340-016D-11D2-945F-00C04FB984F9} test_script.sh '-n'
+samba-tool gpo manage scripts startup add {31B2F340-016D-11D2-945F-00C04FB984F9} test_script.sh '\\-n \\-p all'
     """
 
     synopsis = "%prog <gpo> <script> [args] [run_as] [options]"
@@ -3215,11 +3219,11 @@ samba-tool gpo manage scripts startup add {31B2F340-016D-11D2-945F-00C04FB984F9}
         hash.text = hashlib.md5(script_data).hexdigest().upper()
         if args is not None:
             parameters = ET.SubElement(listelement, 'parameters')
-            parameters.text = args.strip('"').strip("'")
+            parameters.text = args.strip('"').strip("'").replace('\\-', '-')
         if run_as is not None:
             run_as_elm = ET.SubElement(listelement, 'run_as')
             run_as_elm.text = run_as
-        if run_once is not None:
+        if run_once:
             ET.SubElement(listelement, 'run_once')
 
         out = BytesIO()


-- 
Samba Shared Repository



More information about the samba-cvs mailing list