diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/password.c | 10 | ||||
-rw-r--r-- | source3/smbd/server.c | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index bbd9f8b849..fe3ac5c765 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -45,6 +45,12 @@ 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; @@ -59,7 +65,11 @@ void generate_next_challenge(char *challenge) /* mash it up with md4 */ mdfour(buf, (unsigned char *)challenge, 8); +#else + unsigned char buf[8]; + generate_random_buffer(buf,8,False); +#endif memcpy(saved_challenge, buf, 8); memcpy(challenge,buf,8); challenge_sent = True; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index c4db553659..4a3edeb871 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1837,9 +1837,11 @@ void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun, break; } +#if defined(O_SYNC) if (share_mode&(1<<14)) { flags2 |= O_SYNC; } +#endif /* O_SYNC */ if (flags != O_RDONLY && file_existed && (!CAN_WRITE(cnum) || IS_DOS_READONLY(dos_mode(cnum,fname,&sbuf)))) |