diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/namequery.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 0826bc5218..bde24b4b90 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -145,15 +145,11 @@ char *saf_fetch( const char *domain ) static int generate_trn_id(void) { - static int trn_id; + uint16 id; - if (trn_id == 0) { - sys_srandom(sys_getpid()); - } - - trn_id = sys_random(); + generate_random_buffer((uint8 *)&id, sizeof(id)); - return trn_id % (unsigned)0x7FFF; + return id % (unsigned)0x7FFF; } /**************************************************************************** |