selinux/policycoreutils/newrole
Christian Göttsche 3089f1f2fd newrole: use DJB2a string hash function
The hash table implementation uses `& (h->size - 1)` to truncate
generated hashes to the number of buckets.  This operation is equal to
`% h->size` if and only if the size is a power of two (which seems to be
always the case).  One property of the binary and with a power of two
(and probably a small one <=2048) is all higher bits are discarded.
Thus a hash function is needed with a good avalanche effect, which the
current one is not.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2023-11-21 08:55:43 -05:00
..
hashtab.c checkpolicy,libselinux,libsepol,policycoreutils,semodule-utils: update my email 2023-08-04 13:57:01 -04:00
hashtab.h checkpolicy,libselinux,libsepol,policycoreutils,semodule-utils: update my email 2023-08-04 13:57:01 -04:00
Makefile Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
newrole-lspp.pamd initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
newrole.1 libselinux,policycoreutils,python,semodule-utils: de-brand SELinux 2023-08-04 13:56:44 -04:00
newrole.c newrole: use DJB2a string hash function 2023-11-21 08:55:43 -05:00
newrole.pamd Correct misc typos 2022-04-12 13:09:52 -04:00