* but implementation 100% OpenLDAP. So don't blame Phil. */
/* worse case is this is a MD5 hash of a counter, if
* MD5 is a strong cryptographic hash, this should
- * be fairly resisant to attack
+ * be fairly resistant to attack
*/
- static int initialized = 0;
+ static int counter = 0;
int n;
struct {
+ int counter;
pid_t pid;
#ifdef HAVE_GETTIMEOFDAY
unsigned long junk;
} rdata;
- if( !initialized ) {
- initialized++;
-
- rdata.pid = getpid();
- }
+ rdata.pid = getpid();
for( n = 0; n < nbytes; n += 16 ) {
struct lutil_MD5Context ctx;
(void) time( &rdata.time );
#endif
+ rdata.counter = ++counter;
rdata.pid++;
rdata.junk++;