diff options
author | Jeremy Allison <jra@samba.org> | 2001-08-01 17:32:45 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-08-01 17:32:45 +0000 |
commit | 61bb3093e32e9e1e58cec079ea101b5b11c5fee0 (patch) | |
tree | a66bd0003c1458333d7523ca640369faa10e86c2 /source3/smbd | |
parent | c4a9fafc5640f158f142bba4facc8d1c0d2416fe (diff) | |
download | samba-61bb3093e32e9e1e58cec079ea101b5b11c5fee0.tar.gz samba-61bb3093e32e9e1e58cec079ea101b5b11c5fee0.tar.bz2 samba-61bb3093e32e9e1e58cec079ea101b5b11c5fee0.zip |
Pidfile check can be read-only. Removed old ifdef in password.c
Jeremy.
(This used to be commit d82efc61ef16533c5652a5d4a9863f8317cb4ea2)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/password.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index bc05d5f500..743d6ebffe 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -42,31 +42,10 @@ Get the next challenge value - no repeats. ********************************************************************/ void generate_next_challenge(char *challenge) { -#if 0 - /* - * Leave this ifdef'd out while we test - * the new crypto random number generator. - * JRA. - */ - unsigned char buf[16]; - static int counter = 0; - struct timeval tval; - int v1,v2; - - /* get a sort-of random number */ - GetTimeOfDay(&tval); - v1 = (counter++) + sys_getpid() + tval.tv_sec; - v2 = (counter++) * sys_getpid() + tval.tv_usec; - SIVAL(challenge,0,v1); - SIVAL(challenge,4,v2); - - /* mash it up with md4 */ - mdfour(buf, (unsigned char *)challenge, 8); -#else - unsigned char buf[8]; + unsigned char buf[8]; + + generate_random_buffer(buf,8,False); - generate_random_buffer(buf,8,False); -#endif memcpy(saved_challenge, buf, 8); memcpy(challenge,buf,8); challenge_sent = True; |