From 693ffb8466ada58ecc59fde754ba79fc6f51528d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 May 2000 02:23:41 +0000 Subject: Added sys_fork() and sys_getpid() functions to stop the overhead of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a) --- source3/smbd/password.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/smbd/password.c') diff --git a/source3/smbd/password.c b/source3/smbd/password.c index f92d31718c..a8b9050030 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -53,8 +53,8 @@ void generate_next_challenge(char *challenge) /* get a sort-of random number */ GetTimeOfDay(&tval); - v1 = (counter++) + getpid() + tval.tv_sec; - v2 = (counter++) * getpid() + tval.tv_usec; + v1 = (counter++) + sys_getpid() + tval.tv_sec; + v2 = (counter++) * sys_getpid() + tval.tv_usec; SIVAL(challenge,0,v1); SIVAL(challenge,4,v2); -- cgit