1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-19 12:23:49 +03:00

samba-tool: Test gpo manage access add command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
David Mulder
2021-03-01 10:31:54 -07:00
committed by Jeremy Allison
parent 3f3c2b5b33
commit 996a0bd2e4
3 changed files with 84 additions and 0 deletions

View File

@@ -3752,10 +3752,40 @@ samba-tool gpo manage access list {31B2F340-016D-11D2-945F-00C04FB984F9}
domain = adobject.find('domain')
self.outf.write('-:%s\\%s:ALL\n' % (domain.text, name.text))
class cmd_add_access(Command):
"""Adds a VGP Host Access Group Policy to the sysvol
This command adds a host access setting to the sysvol for applying to winbind
clients.
Example:
samba-tool gpo manage access add {31B2F340-016D-11D2-945F-00C04FB984F9} allow goodguy example.com
"""
synopsis = "%prog <gpo> <allow/deny> <cn> <domain> [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"versionopts": options.VersionOptions,
"credopts": options.CredentialsOptions,
}
takes_options = [
Option("-H", "--URL", help="LDB URL for database or target server", type=str,
metavar="URL", dest="H"),
]
takes_args = ["gpo", "etype", "cn", "domain"]
def run(self, gpo, etype, cn, domain, H=None, sambaopts=None,
credopts=None, versionopts=None):
pass
class cmd_access(SuperCommand):
"""Manage Host Access Group Policy Objects"""
subcommands = {}
subcommands["list"] = cmd_list_access()
subcommands["add"] = cmd_add_access()
class cmd_manage(SuperCommand):
"""Manage Group Policy Objects"""