summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-21 00:44:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:47 -0500
commita828b56884a1385823cdb1d186860a1e1466fca7 (patch)
tree7c8e8bada654eb6aeddfad74a741c6a58e55a992 /source3/client
parent071db6fdbff694681fa1793ee678a9a0af3e266a (diff)
downloadsamba-a828b56884a1385823cdb1d186860a1e1466fca7.tar.gz
samba-a828b56884a1385823cdb1d186860a1e1466fca7.tar.bz2
samba-a828b56884a1385823cdb1d186860a1e1466fca7.zip
r21898: Added test command, fixed first valgrind bugs.
Now to investigate why it doesn't work :-). Jeremy. (This used to be commit 73f7c6cef8371ad63eb1dc3e79bfc78503dbd7a4)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 8e35cfbf0f..38023abec2 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1787,6 +1787,48 @@ static int cmd_open(void)
/****************************************************************************
****************************************************************************/
+static int cmd_posix_encrypt(void)
+{
+ fstring buf;
+ fstring domain;
+ fstring user;
+ fstring password;
+ NTSTATUS status;
+
+ if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+ d_printf("posix_encrypt domain user password\n");
+ return 1;
+ }
+ fstrcat(domain,buf);
+ if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+ d_printf("posix_encrypt domain user password\n");
+ return 1;
+ }
+ fstrcat(user,buf);
+
+ if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+ d_printf("posix_encrypt domain user password\n");
+ return 1;
+ }
+ fstrcat(password,buf);
+
+ status = cli_raw_ntlm_smb_encryption_start(cli,
+ user,
+ password,
+ domain);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ d_printf("posix_encrypt failed with error %s\n", nt_errstr(status));
+ } else {
+ d_printf("encryption on\n");
+ }
+
+ return 0;
+}
+
+/****************************************************************************
+****************************************************************************/
+
static int cmd_posix_open(void)
{
pstring mask;
@@ -3227,6 +3269,7 @@ static struct
{"newer",cmd_newer,"<file> only mget files newer than the specified local file",{COMPL_LOCAL,COMPL_NONE}},
{"open",cmd_open,"<mask> open a file",{COMPL_REMOTE,COMPL_NONE}},
{"posix", cmd_posix, "turn on all POSIX capabilities", {COMPL_REMOTE,COMPL_NONE}},
+ {"posix_encrypt",cmd_posix_encrypt,"<domain> <user> <password> start up transport encryption",{COMPL_REMOTE,COMPL_NONE}},
{"posix_open",cmd_posix_open,"<name> 0<mode> open_flags mode open a file using POSIX interface",{COMPL_REMOTE,COMPL_NONE}},
{"posix_mkdir",cmd_posix_mkdir,"<name> 0<mode> creates a directory using POSIX interface",{COMPL_REMOTE,COMPL_NONE}},
{"posix_rmdir",cmd_posix_rmdir,"<name> removes a directory using POSIX interface",{COMPL_REMOTE,COMPL_NONE}},