summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorGiampaolo Lauria <lauria2@yahoo.com>2011-09-02 13:10:05 -0400
committerAndrew Bartlett <abartlet@samba.org>2011-09-09 15:24:02 +1000
commit8a6f3fc3b428ad77bc116816584323bdcef55b35 (patch)
treef42b125a083d2b53ea3018b0f6664e6d8ee33bdb /source4/scripting/python
parent10812515161d53e582974381dddaacdb7f5a8461 (diff)
downloadsamba-8a6f3fc3b428ad77bc116816584323bdcef55b35.tar.gz
samba-8a6f3fc3b428ad77bc116816584323bdcef55b35.tar.bz2
samba-8a6f3fc3b428ad77bc116816584323bdcef55b35.zip
samba-tool: Fixed "delegation" command syntax
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/delegation.py31
1 files changed, 24 insertions, 7 deletions
diff --git a/source4/scripting/python/samba/netcmd/delegation.py b/source4/scripting/python/samba/netcmd/delegation.py
index 48ec7ca25b..19a64d5f1e 100644
--- a/source4/scripting/python/samba/netcmd/delegation.py
+++ b/source4/scripting/python/samba/netcmd/delegation.py
@@ -56,9 +56,12 @@ def _get_user_realm_domain(user):
realm = m.group(2)
return (baseuser.lower(), domain, realm.upper())
+
+
class cmd_delegation_show(Command):
"""Show the delegation setting of an account."""
- synopsis = "%prog delegation show <accountname>"
+
+ synopsis = "%prog delegation show <accountname> [options]"
takes_args = ["accountname"]
@@ -97,9 +100,12 @@ class cmd_delegation_show(Command):
for a in allowed:
print "msDS-AllowedToDelegateTo: %s" % (str(a))
+
+
class cmd_delegation_for_any_service(Command):
"""Set/unset UF_TRUSTED_FOR_DELEGATION for an account."""
- synopsis = "%prog delegation for-any-service <accountname> on|off"
+
+ synopsis = "%prog delegation for-any-service <accountname> [(on|off)] [options]"
takes_args = ["accountname", "onoff"]
@@ -129,9 +135,12 @@ class cmd_delegation_for_any_service(Command):
except Exception, err:
raise CommandError(err)
+
+
class cmd_delegation_for_any_protocol(Command):
"""Set/unset UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION (S4U2Proxy) for an account."""
- synopsis = "%prog delegation for-any-protocol <accountname> on|off"
+
+ synopsis = "%prog delegation for-any-protocol <accountname> [(on|off)] [options]"
takes_args = ["accountname", "onoff"]
@@ -161,9 +170,12 @@ class cmd_delegation_for_any_protocol(Command):
except Exception, err:
raise CommandError(err)
+
+
class cmd_delegation_add_service(Command):
"""Add a service principal as msDS-AllowedToDelegateTo"""
- synopsis = "%prog delegation add-service <accountname> <principal>"
+
+ synopsis = "%prog delegation add-service <accountname> <principal> [options]"
takes_args = ["accountname", "principal"]
@@ -194,9 +206,12 @@ class cmd_delegation_add_service(Command):
except Exception, err:
raise CommandError(err)
+
+
class cmd_delegation_del_service(Command):
- """Add a service principal as msDS-AllowedToDelegateTo"""
- synopsis = "%prog delegation del-service <accountname> <principal>"
+ """Delete a service principal as msDS-AllowedToDelegateTo"""
+
+ synopsis = "%prog delegation del-service <accountname> <principal> [options]"
takes_args = ["accountname", "principal"]
@@ -227,8 +242,10 @@ class cmd_delegation_del_service(Command):
except Exception, err:
raise CommandError(err)
+
+
class cmd_delegation(SuperCommand):
- """Delegation management *"""
+ """Delegation management"""
subcommands = {}
subcommands["show"] = cmd_delegation_show()