diff options
author | Jeremy Allison <jra@samba.org> | 1998-04-17 19:29:51 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-04-17 19:29:51 +0000 |
commit | 373d7c62577c13e1a85043844953a8d779858432 (patch) | |
tree | baefa96a0cdba07e3d71ce6c3ecf26396347d886 /source3/libsmb | |
parent | a406ad5039bcdefb67b2093a42275882e71078c9 (diff) | |
download | samba-373d7c62577c13e1a85043844953a8d779858432.tar.gz samba-373d7c62577c13e1a85043844953a8d779858432.tar.bz2 samba-373d7c62577c13e1a85043844953a8d779858432.zip |
Changing of machine passwords now works !!!!!!
smbdes.c: Added cred_hash3.
smbpasswd.c: Fixes for adding a machine account (needs more work).
lib/rpc/server/srv_netlog.c: Turn on the machine password changing
code by default (calls cred_hash3).
Jeremy.
(This used to be commit 50aa513b969c6e41911aeee8207b065f93af0beb)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/smbdes.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/libsmb/smbdes.c b/source3/libsmb/smbdes.c index e5d8f4a1e0..cf46e53ff5 100644 --- a/source3/libsmb/smbdes.c +++ b/source3/libsmb/smbdes.c @@ -347,6 +347,15 @@ void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key) smbhash(out, buf, key2, 1); } +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key) +{ + static unsigned char key2[8]; + + smbhash(out, in, key, 0); + key2[0] = key[7]; + smbhash(out + 8, in + 8, key2, 0); +} + void SamOEMhash( unsigned char *data, unsigned char *key, int val) { unsigned char s_box[256]; |