diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2019-08-25 18:52:53 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2019-08-25 18:52:53 +0200 |
commit | e0e7a74bde52a1aa02d1da758128722598fb6dd8 (patch) | |
tree | 3064dd064dcde0969467c6d2e068d8ccbbd648b1 /smbencrypt.c | |
parent | 5256f6122e9843b1e9988a742ed6c2a4923bc2bd (diff) | |
download | fetchmail-e0e7a74bde52a1aa02d1da758128722598fb6dd8.tar.gz fetchmail-e0e7a74bde52a1aa02d1da758128722598fb6dd8.tar.bz2 fetchmail-e0e7a74bde52a1aa02d1da758128722598fb6dd8.zip |
Align with legacy_6x.
* Normalize include order.
* Backport missed bug fixes.
* Remove dead code.
Diffstat (limited to 'smbencrypt.c')
-rw-r--r-- | smbencrypt.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/smbencrypt.c b/smbencrypt.c index ad14707f..21d7bff0 100644 --- a/smbencrypt.c +++ b/smbencrypt.c @@ -65,12 +65,6 @@ static size_t skip_multibyte_char(char c) return 0; } - -/******************************************************************* -safe string copy into a known length string. maxlength does not -include the terminating zero. -********************************************************************/ - static void strupper(char *s) { while (*s) @@ -201,43 +195,3 @@ void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24) dump_data(100, (char *)p24, 24); #endif } - -#if 0 - -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode) -{ - int new_pw_len = strlen(passwd) * (unicode ? 2 : 1); - - if (new_pw_len > 512) - { - DEBUG(0,("make_oem_passwd_hash: new password is too long.\n")); - return False; - } - - /* - * Now setup the data area. - * We need to generate a random fill - * for this area to make it harder to - * decrypt. JRA. - */ - generate_random_buffer((unsigned char *)data, 516, False); - if (unicode) - { - struni2( &data[512 - new_pw_len], passwd); - } - else - { - fstrcpy( &data[512 - new_pw_len], passwd); - } - SIVAL(data, 512, new_pw_len); - -#ifdef DEBUG_PASSWORD - DEBUG(100,("make_oem_passwd_hash\n")); - dump_data(100, data, 516); -#endif - SamOEMhash( (unsigned char *)data, (unsigned char *)old_pw_hash, True); - - return True; -} - -#endif |