summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-02-08 05:31:01 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-02-08 05:31:01 +0000
commita69cb9c9639dc06a0be16958cbc29867b71f584e (patch)
tree6055a4bb3e57efbeb6b67c775dd4f46e43e3f80e /source3
parentfac5f989d3e7ca34ceac692a1d2a5de9e4ac4f23 (diff)
downloadsamba-a69cb9c9639dc06a0be16958cbc29867b71f584e.tar.gz
samba-a69cb9c9639dc06a0be16958cbc29867b71f584e.tar.bz2
samba-a69cb9c9639dc06a0be16958cbc29867b71f584e.zip
Remove more unused portions of the 'password cache'.
Andrew Bartlett (This used to be commit 318e11748a86d92bfc6ebf0e58f3c8360cbf4b69)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb.h13
-rw-r--r--source3/libsmb/pwd_cache.c42
2 files changed, 6 insertions, 49 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 1024452e91..24cdde30d1 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1508,22 +1508,9 @@ struct pwd_info
{
BOOL null_pwd;
BOOL cleartext;
- BOOL crypted;
fstring password;
- uchar smb_lm_pwd[16];
- uchar smb_nt_pwd[16];
-
- uchar smb_lm_owf[24];
- uchar smb_nt_owf[128];
- size_t nt_owf_len;
-
- uchar lm_cli_chal[8];
- uchar nt_cli_chal[128];
- size_t nt_cli_chal_len;
-
- uchar sess_key[16];
};
typedef struct user_struct
diff --git a/source3/libsmb/pwd_cache.c b/source3/libsmb/pwd_cache.c
index 27ca4ddf57..e010f226a0 100644
--- a/source3/libsmb/pwd_cache.c
+++ b/source3/libsmb/pwd_cache.c
@@ -27,43 +27,24 @@
static void pwd_init(struct pwd_info *pwd)
{
memset((char *)pwd->password , '\0', sizeof(pwd->password ));
- memset((char *)pwd->smb_lm_pwd, '\0', sizeof(pwd->smb_lm_pwd));
- memset((char *)pwd->smb_nt_pwd, '\0', sizeof(pwd->smb_nt_pwd));
- memset((char *)pwd->smb_lm_owf, '\0', sizeof(pwd->smb_lm_owf));
- memset((char *)pwd->smb_nt_owf, '\0', sizeof(pwd->smb_nt_owf));
pwd->null_pwd = True; /* safest option... */
- pwd->cleartext = False;
- pwd->crypted = False;
}
/****************************************************************************
- Makes lm and nt hashed passwords.
+ Stores a cleartext password.
****************************************************************************/
-static void pwd_make_lm_nt_16(struct pwd_info *pwd, const char *clr)
+void pwd_set_cleartext(struct pwd_info *pwd, const char *clr)
{
pwd_init(pwd);
-
- if (!clr) {
- ZERO_STRUCT(pwd->smb_nt_pwd);
- ZERO_STRUCT(pwd->smb_lm_pwd);
- pwd->null_pwd = True;
+ if (clr) {
+ fstrcpy(pwd->password, clr);
+ pwd->null_pwd = False;
} else {
- nt_lm_owf_gen(clr, pwd->smb_nt_pwd, pwd->smb_lm_pwd);
- pwd->null_pwd = False;
+ pwd->null_pwd = True;
}
- pwd->crypted = False;
-}
-
-/****************************************************************************
- Stores a cleartext password.
-****************************************************************************/
-void pwd_set_cleartext(struct pwd_info *pwd, const char *clr)
-{
- pwd_make_lm_nt_16(pwd, clr);
- fstrcpy(pwd->password, clr);
pwd->cleartext = True;
}
@@ -80,14 +61,3 @@ void pwd_get_cleartext(struct pwd_info *pwd, fstring clr)
}
-/****************************************************************************
- Gets lm and nt crypts.
-****************************************************************************/
-
-void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24])
-{
- if (lm_owf != NULL)
- memcpy(lm_owf, pwd->smb_lm_owf, 24);
- if (nt_owf != NULL)
- memcpy(nt_owf, pwd->smb_nt_owf, 24);
-}