[SCM] Samba Shared Repository - branch master updated

Nadezhda Ivanova nivanova at samba.org
Thu Feb 10 07:29:01 MST 2011


The branch, master has been updated
       via  a38d04a s4-tools: Added --sddl option, which allows the user to add an ACE to an object's security descriptor in SDDL format
      from  6d3625d libwbclient: doxygen: mark wbcSetGidHwm deprecated

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


- Log -----------------------------------------------------------------
commit a38d04a7a863d628f23b2bae95ee184eecb502f0
Author: Nadezhda Ivanova <nivanova at samba.org>
Date:   Thu Feb 10 15:04:23 2011 +0200

    s4-tools: Added --sddl option, which allows the user to add an ACE to an object's security descriptor in SDDL format
    
    Useful for testing purposes.
    
    Autobuild-User: Nadezhda Ivanova <nivanova at samba.org>
    Autobuild-Date: Thu Feb 10 15:28:04 CET 2011 on sn-devel-104

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

Summary of changes:
 source4/scripting/python/samba/netcmd/dsacl.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/dsacl.py b/source4/scripting/python/samba/netcmd/dsacl.py
index 2d74145..58a3552 100644
--- a/source4/scripting/python/samba/netcmd/dsacl.py
+++ b/source4/scripting/python/samba/netcmd/dsacl.py
@@ -79,6 +79,8 @@ class cmd_ds_acl_set(Command):
             type="string"),
         Option("--trusteedn", help="DN of the entity that gets access",
             type="string"),
+        Option("--sddl", help="An ACE or group of ACEs to be added on the object",
+            type="string"),
         ]
 
     def find_trustee_sid(self, samdb, trusteedn):
@@ -133,13 +135,13 @@ class cmd_ds_acl_set(Command):
         print "new descriptor for %s:" % object_dn
         print desc_sddl
 
-    def run(self, car, action, objectdn, trusteedn,
+    def run(self, car, action, objectdn, trusteedn, sddl,
             host=None, credopts=None, sambaopts=None, versionopts=None):
         lp = sambaopts.get_loadparm()
         creds = credopts.get_credentials(lp)
 
-        if (car is None or action is None or objectdn is None or 
-            trusteedn is None):
+        if sddl is None and (car is None or action is None
+                             or objectdn is None or trusteedn is None):
             return self.usage()
 
         samdb = SamDB(url=host, session_info=system_session(),
@@ -159,7 +161,9 @@ class cmd_ds_acl_set(Command):
                 'ro-repl-secret-sync' : GUID_DRS_RO_REPL_SECRET_SYNC,
                 }
         sid = self.find_trustee_sid(samdb, trusteedn)
-        if action == "allow":
+        if sddl:
+            new_ace = sddl
+        elif action == "allow":
             new_ace = "(OA;;CR;%s;;%s)" % (cars[car], str(sid))
         elif action == "deny":
             new_ace = "(OD;;CR;%s;;%s)" % (cars[car], str(sid))


-- 
Samba Shared Repository


More information about the samba-cvs mailing list