def run(self, car, action, objectdn, trusteedn, sddl,
            H=None, credopts=None, sambaopts=None, versionopts=None):
        lp = sambaopts.get_loadparm()
        creds = credopts.get_credentials(lp)

        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=H, session_info=system_session(),
            credentials=creds, lp=lp)
        cars = {'change-rid' : GUID_DRS_CHANGE_RID_MASTER,
                'change-pdc' : GUID_DRS_CHANGE_PDC,
                'change-infrastructure' : GUID_DRS_CHANGE_INFR_MASTER,
                'change-schema' : GUID_DRS_CHANGE_SCHEMA_MASTER,
                'change-naming' : GUID_DRS_CHANGE_DOMAIN_MASTER,
                'allocate_rids' : GUID_DRS_ALLOCATE_RIDS,
                'get-changes' : GUID_DRS_GET_CHANGES,
                'get-changes-all' : GUID_DRS_GET_ALL_CHANGES,
                'get-changes-filtered' : GUID_DRS_GET_FILTERED_ATTRIBUTES,
                'topology-manage' : GUID_DRS_MANAGE_TOPOLOGY,
                'topology-monitor' : GUID_DRS_MONITOR_TOPOLOGY,
                'repl-sync' : GUID_DRS_REPL_SYNCRONIZE,
                'ro-repl-secret-sync' : GUID_DRS_RO_REPL_SECRET_SYNC,
                }
        sid = self.find_trustee_sid(samdb, trusteedn)
        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))
        else:
            raise CommandError("Wrong argument '%s'!" % action)

        self.print_new_acl(samdb, objectdn)
        self.add_ace(samdb, objectdn, new_ace)
        self.print_new_acl(samdb, objectdn)
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/netcmd/dsacl.py/cmd_dsacl_set.run/original