summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-06-10 21:34:23 +0200
committerGünther Deschner <gd@samba.org>2008-06-10 22:51:04 +0200
commit9883567fa7d8c3af9ef3a79f96ca8c5d4106d81a (patch)
tree9a15933ad56a4f00b56a182b001ec79f8ac26b85 /source3
parentdc45718f32f46bc4c30c25eee24c39fddc8cdbc3 (diff)
downloadsamba-9883567fa7d8c3af9ef3a79f96ca8c5d4106d81a.tar.gz
samba-9883567fa7d8c3af9ef3a79f96ca8c5d4106d81a.tar.bz2
samba-9883567fa7d8c3af9ef3a79f96ca8c5d4106d81a.zip
rpcclient: add more useful comments what sign/seal commands are doing.
Guenther (This used to be commit ec278d8bc82e86c98d24277eb50633f8cd4c7600)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/rpcclient.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index cf0533d3ca..35ff14ef2d 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -349,6 +349,8 @@ static NTSTATUS cmd_set_ss_level(void)
static NTSTATUS cmd_sign(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
+ const char *type = "NTLMSSP";
+
pipe_default_auth_level = PIPE_AUTH_LEVEL_INTEGRITY;
pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
@@ -358,25 +360,29 @@ static NTSTATUS cmd_sign(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
}
if (argc == 2) {
- if (strequal(argv[1], "NTLMSSP")) {
+ type = argv[1];
+ if (strequal(type, "NTLMSSP")) {
pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
- } else if (strequal(argv[1], "NTLMSSP_SPNEGO")) {
+ } else if (strequal(type, "NTLMSSP_SPNEGO")) {
pipe_default_auth_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
- } else if (strequal(argv[1], "SCHANNEL")) {
+ } else if (strequal(type, "SCHANNEL")) {
pipe_default_auth_type = PIPE_AUTH_TYPE_SCHANNEL;
} else {
- printf("unknown type %s\n", argv[1]);
+ printf("unknown type %s\n", type);
return NT_STATUS_INVALID_LEVEL;
}
}
- printf("debuglevel is %d\n", DEBUGLEVEL);
+ d_printf("Setting %s - sign\n", type);
+
return cmd_set_ss_level();
}
static NTSTATUS cmd_seal(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
+ const char *type = "NTLMSSP";
+
pipe_default_auth_level = PIPE_AUTH_LEVEL_PRIVACY;
pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
@@ -386,17 +392,21 @@ static NTSTATUS cmd_seal(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
}
if (argc == 2) {
- if (strequal(argv[1], "NTLMSSP")) {
+ type = argv[1];
+ if (strequal(type, "NTLMSSP")) {
pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
- } else if (strequal(argv[1], "NTLMSSP_SPNEGO")) {
+ } else if (strequal(type, "NTLMSSP_SPNEGO")) {
pipe_default_auth_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
- } else if (strequal(argv[1], "SCHANNEL")) {
+ } else if (strequal(type, "SCHANNEL")) {
pipe_default_auth_type = PIPE_AUTH_TYPE_SCHANNEL;
} else {
- printf("unknown type %s\n", argv[1]);
+ printf("unknown type %s\n", type);
return NT_STATUS_INVALID_LEVEL;
}
}
+
+ d_printf("Setting %s - sign and seal\n", type);
+
return cmd_set_ss_level();
}