diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clilist.c | 2 | ||||
-rw-r--r-- | source3/libsmb/pwd_cache.c | 48 |
2 files changed, 1 insertions, 49 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index f3e4033539..2e904e06b7 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -126,7 +126,7 @@ static int interpret_long_filename(int level,char *p,file_info *finfo) p += 2; if (p[1] == 0 && slen > 1) { /* NT has stuffed up again */ - unistr_to_ascii(finfo->short_name, p, slen/2); + unistr_to_dos(finfo->short_name, p, slen/2); } else { strncpy(finfo->short_name, p, 12); finfo->short_name[12] = 0; diff --git a/source3/libsmb/pwd_cache.c b/source3/libsmb/pwd_cache.c index 4f02c42efb..1c5f8b5176 100644 --- a/source3/libsmb/pwd_cache.c +++ b/source3/libsmb/pwd_cache.c @@ -41,46 +41,19 @@ void pwd_init(struct pwd_info *pwd) } /**************************************************************************** -de-obfuscates a password -****************************************************************************/ -static void pwd_deobfuscate(struct pwd_info *pwd) -{ -} - -/**************************************************************************** -obfuscates a password -****************************************************************************/ -static void pwd_obfuscate(struct pwd_info *pwd) -{ -} - -/**************************************************************************** -sets the obfuscation key info -****************************************************************************/ -void pwd_obfuscate_key(struct pwd_info *pwd, uint32 int_key, char *str_key) -{ -} - -/**************************************************************************** compares two passwords. hmm, not as trivial as expected. hmm. ****************************************************************************/ BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2) { - pwd_deobfuscate(pwd1); - pwd_deobfuscate(pwd2); if (pwd1->cleartext && pwd2->cleartext) { if (strequal(pwd1->password, pwd2->password)) { - pwd_obfuscate(pwd1); - pwd_obfuscate(pwd2); return True; } } if (pwd1->null_pwd && pwd2->null_pwd) { - pwd_obfuscate(pwd1); - pwd_obfuscate(pwd2); return True; } @@ -94,8 +67,6 @@ BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2) #endif if (memcmp(pwd1->smb_nt_pwd, pwd2->smb_nt_pwd, 16) == 0) { - pwd_obfuscate(pwd1); - pwd_obfuscate(pwd2); return True; } #ifdef DEBUG_PASSWORD @@ -105,13 +76,9 @@ BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2) #endif if (memcmp(pwd1->smb_lm_pwd, pwd2->smb_lm_pwd, 16) == 0) { - pwd_obfuscate(pwd1); - pwd_obfuscate(pwd2); return True; } } - pwd_obfuscate(pwd1); - pwd_obfuscate(pwd2); return False; } @@ -164,8 +131,6 @@ void pwd_set_cleartext(struct pwd_info *pwd, char *clr) pwd->cleartext = True; pwd->null_pwd = False; pwd->crypted = False; - - pwd_obfuscate(pwd); } /**************************************************************************** @@ -173,7 +138,6 @@ void pwd_set_cleartext(struct pwd_info *pwd, char *clr) ****************************************************************************/ void pwd_get_cleartext(struct pwd_info *pwd, char *clr) { - pwd_deobfuscate(pwd); if (pwd->cleartext) { fstrcpy(clr, pwd->password); @@ -183,7 +147,6 @@ void pwd_get_cleartext(struct pwd_info *pwd, char *clr) { clr[0] = 0; } - pwd_obfuscate(pwd); } /**************************************************************************** @@ -214,8 +177,6 @@ void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]) pwd->null_pwd = False; pwd->cleartext = False; pwd->crypted = False; - - pwd_obfuscate(pwd); } /**************************************************************************** @@ -223,7 +184,6 @@ void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]) ****************************************************************************/ void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]) { - pwd_deobfuscate(pwd); if (lm_pwd != NULL) { memcpy(lm_pwd, pwd->smb_lm_pwd, 16); @@ -232,7 +192,6 @@ void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]) { memcpy(nt_pwd, pwd->smb_nt_pwd, 16); } - pwd_obfuscate(pwd); } /**************************************************************************** @@ -251,8 +210,6 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr) pwd->null_pwd = False; pwd->cleartext = False; pwd->crypted = False; - - pwd_obfuscate(pwd); } /**************************************************************************** @@ -260,7 +217,6 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr) ****************************************************************************/ void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]) { - pwd_deobfuscate(pwd); #ifdef DEBUG_PASSWORD DEBUG(100,("client cryptkey: ")); @@ -286,8 +242,6 @@ void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]) #endif pwd->crypted = True; - - pwd_obfuscate(pwd); } /**************************************************************************** @@ -295,7 +249,6 @@ void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]) ****************************************************************************/ void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]) { - pwd_deobfuscate(pwd); if (lm_owf != NULL) { memcpy(lm_owf, pwd->smb_lm_owf, 24); @@ -304,5 +257,4 @@ void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]) { memcpy(nt_owf, pwd->smb_nt_owf, 24); } - pwd_obfuscate(pwd); } |