Skip to content

Commit

Permalink
switch random generators
Browse files Browse the repository at this point in the history
  • Loading branch information
RH-steve-grubb committed Mar 29, 2021
1 parent 27e9d40 commit d3dae09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/auditd.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,9 @@ int send_audit_event(int type, const char *str)

e->reply.type = type;
if (seq_num == 0) {
srand(time(NULL));
seq_num = rand()%10000;
// seq_num does not have to cryptographically secure
srandom(time(NULL));
seq_num = random()%10000;
} else
seq_num++;
// Write event into netlink area like normal events
Expand Down

0 comments on commit d3dae09

Please sign in to comment.