diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-04 21:41:36 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-04 21:41:36 +0000 |
commit | fe8383382d5b8221093a5340705c4e5b3731a249 (patch) | |
tree | 90a273d77990efc6ff60503fe1756e9397de3d6d /source3/smbd | |
parent | cae821d45926157a250e9fa047e0c8aa8c0c2c54 (diff) | |
download | samba-fe8383382d5b8221093a5340705c4e5b3731a249.tar.gz samba-fe8383382d5b8221093a5340705c4e5b3731a249.tar.bz2 samba-fe8383382d5b8221093a5340705c4e5b3731a249.zip |
samuserset <username> -p password. YESSSSS :)
you have to use "ntlmv1" at the moment (i.e set client ntlmv2 = no).
(This used to be commit f52504c553becc64b89d546a57b1bd9cf1bc5b5c)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/chgpasswd.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index fa208acdc8..a21b598238 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -606,73 +606,6 @@ BOOL pass_oem_change(char *user, } /*********************************************************** - decode a password buffer -************************************************************/ -BOOL decode_pw_buffer(const char buffer[516], char *new_passwd, - int new_passwd_size, BOOL nt_pass_set) -{ - /* - * The length of the new password is in the last 4 bytes of - * the data buffer. - */ - - uint32 new_pw_len = IVAL(buffer, 512); - if (new_pw_len < 0 || new_pw_len > new_passwd_size - 1) - { - DEBUG(0,("check_oem_password: incorrect password length (%d).\n", new_pw_len)); - return False; - } - - if (nt_pass_set) - { - /* - * nt passwords are in unicode - */ - int uni_pw_len = new_pw_len; - new_pw_len /= 2; - unibuf_to_ascii(new_passwd, &buffer[512-uni_pw_len], new_pw_len); - } - else - { - memcpy(new_passwd, &buffer[512-new_pw_len], new_pw_len); - new_passwd[new_pw_len] = '\0'; - } - - return True; -} - -/*********************************************************** - encode a password buffer -************************************************************/ -BOOL encode_pw_buffer(char buffer[516], const char *new_passwd, - int new_pw_len, BOOL nt_pass_set) -{ - if (nt_pass_set) - { - /* - * nt passwords are in unicode. last char overwrites NULL - * in ascii_to_unibuf, so use SIVAL *afterwards*. - */ - int uni_pw_len = new_pw_len; - new_pw_len /= 2; - ascii_to_unibuf(&buffer[512-uni_pw_len], new_passwd, new_pw_len); - } - else - { - memcpy(&buffer[512-new_pw_len], new_passwd, new_pw_len); - } - - /* - * The length of the new password is in the last 4 bytes of - * the data buffer. - */ - - SIVAL(buffer, 512, new_passwd_size); - - return True; -} - -/*********************************************************** Code to check the OEM hashed password. this function ignores the 516 byte nt OEM hashed password |