freifunk-gluon / l3roamd

BSD 2-Clause "Simplified" License
12 stars 6 forks source link

introduce the usage of getrandom #25

Closed christf closed 6 years ago

christf commented 6 years ago

that will address #24

christf commented 6 years ago

@t-8ch what do you think?

t-8ch commented 6 years ago

Looks good! I would prefer to have the wrapper code in a different source file though. The while() loop could also be put in its own function.

neocturne commented 6 years ago

The getrandom function should also use a different name, as it may conflict with a libc-provided implementation like this.

t-8ch commented 6 years ago

We should also detect if the kernel does not implement the getrandom syscall at all and error out in this case. (Most probably: syscall(SYS_getrandom, ...) returns -1 and sets errno to ENOSYS)

christf commented 6 years ago

Die Hinweise sind umgesetzt. Was meint ihr?