summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-11-03 15:47:03 +0000
committerLuke Leighton <lkcl@samba.org>1997-11-03 15:47:03 +0000
commit4039df6d4b28064a6e72fbdbcf34cce6f961c4c4 (patch)
tree5da5b4f52901c4eea7bc6cb4b8bb5ce7838e7762 /source3/client
parent083a3be7d7170e92d6985be00c4c02c8215b80c2 (diff)
downloadsamba-4039df6d4b28064a6e72fbdbcf34cce6f961c4c4.tar.gz
samba-4039df6d4b28064a6e72fbdbcf34cce6f961c4c4.tar.bz2
samba-4039df6d4b28064a6e72fbdbcf34cce6f961c4c4.zip
added code that _uses_ arcfour. arcfour itself, or anything remotely
like it, has *not* been added. this is the client and server side of the SAM Logon NT and LM OWF password obfuscation (rc4 with the long-term session key). (This used to be commit 4cf4dd696714492f8e51661cab4736d66ab2916b)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/clientutil.c5
-rw-r--r--source3/client/ntclient.c23
2 files changed, 24 insertions, 4 deletions
diff --git a/source3/client/clientutil.c b/source3/client/clientutil.c
index 1794615cd0..4064dbecd7 100644
--- a/source3/client/clientutil.c
+++ b/source3/client/clientutil.c
@@ -33,6 +33,7 @@ pstring service="";
pstring desthost="";
extern pstring myname;
pstring password = "";
+pstring smb_login_passwd = "";
pstring username="";
pstring workgroup=WORKGROUP;
BOOL got_pass = False;
@@ -425,7 +426,7 @@ static struct {
/****************************************************************************
-send a login command
+send a login command.
****************************************************************************/
BOOL cli_send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setup)
{
@@ -578,6 +579,8 @@ BOOL cli_send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setup)
else
pass = (char *)getpass("Password: ");
+ pstrcpy(smb_login_passwd, pass);
+
/* use a blank username for the 2nd try with a blank password */
if (tries++ && !*pass)
*username = 0;
diff --git a/source3/client/ntclient.c b/source3/client/ntclient.c
index bf6531440e..7e360981c0 100644
--- a/source3/client/ntclient.c
+++ b/source3/client/ntclient.c
@@ -28,6 +28,7 @@
extern int DEBUGLEVEL;
extern pstring username;
+extern pstring smb_login_passwd;
extern pstring workgroup;
#define CLIENT_TIMEOUT (30*1000)
@@ -278,11 +279,27 @@ BOOL do_nt_login(char *desthost, char *myhostname,
/*********************** SAM Info ***********************/
- /* this is used in both the SAM Logon and the SAM Logoff */
- make_id_info1(&id1, workgroup, 0,
+ {
+ char lm_owf_user_pwd[16];
+ char nt_owf_user_pwd[16];
+ nt_lm_owf_gen(smb_login_passwd, nt_owf_user_pwd, lm_owf_user_pwd);
+
+#ifdef DEBUG_PASSWORD
+
+ DEBUG(100,("nt owf of user password: "));
+ dump_data(100, lm_owf_user_pwd, 16);
+
+ DEBUG(100,("nt owf of user password: "));
+ dump_data(100, nt_owf_user_pwd, 16);
+
+#endif
+
+ /* this is used in both the SAM Logon and the SAM Logoff */
+ make_id_info1(&id1, workgroup, 0,
getuid(), 0,
username, myhostname,
- NULL, NULL);
+ sess_key, lm_owf_user_pwd, nt_owf_user_pwd);
+ }
/*********************** SAM Logon **********************/