diff options
author | Thomas Haller <thaller@redhat.com> | 2017-10-13 16:12:35 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-10-18 13:05:00 +0200 |
commit | 3434261811b6edde77689983ac4c4e70cd2ca39a (patch) | |
tree | dbed62d0331f640721493ab4ff5528487553fdfe /Makefile.am | |
parent | 0e9e35e30913ccd01857bb104880976b63404049 (diff) | |
download | NetworkManager-3434261811b6edde77689983ac4c4e70cd2ca39a.tar.gz |
core,clients: use our own string hashing function nm_str_hash()
Replace the usage of g_str_hash() with our own nm_str_hash().
GLib's g_str_hash() uses djb2 hashing function, just like we
do at the moment. The only difference is, that we use a diffrent
seed value.
Note, that we initialize the hash seed with random data (by calling
getrandom() or reading /dev/urandom). That is a change compared to
before.
This change of the hashing function and accessing the random pool
might be undesired for libnm/libnm-core. Hence, the change is not
done there as it possibly changes behavior for public API. Maybe
we should do that later though.
At this point, there isn't much of a change. This patch becomes
interesting, if we decide to use a different hashing algorithm.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index 12aff3d666..ee8e4f079a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3192,6 +3192,15 @@ clients_cppflags = \ check_ltlibraries += clients/common/libnmc-base.la clients_common_libnmc_base_la_SOURCES = \ + shared/nm-utils/nm-enum-utils.c \ + shared/nm-utils/nm-enum-utils.h \ + shared/nm-utils/nm-hash-utils.c \ + shared/nm-utils/nm-hash-utils.h \ + shared/nm-utils/nm-random-utils.c \ + shared/nm-utils/nm-random-utils.h \ + shared/nm-utils/nm-shared-utils.c \ + shared/nm-utils/nm-shared-utils.h \ + \ clients/common/nm-secret-agent-simple.c \ clients/common/nm-secret-agent-simple.h \ clients/common/nm-vpn-helpers.c \ @@ -3240,11 +3249,6 @@ EXTRA_LTLIBRARIES += clients/common/libnmc.la endif clients_common_libnmc_la_SOURCES = \ - shared/nm-utils/nm-enum-utils.c \ - shared/nm-utils/nm-enum-utils.h \ - shared/nm-utils/nm-shared-utils.c \ - shared/nm-utils/nm-shared-utils.h \ - \ shared/nm-meta-setting.c \ shared/nm-meta-setting.h \ \ @@ -3426,8 +3430,6 @@ clients_tui_newt_libnmt_newt_a_CPPFLAGS = \ bin_PROGRAMS += clients/tui/nmtui clients_tui_nmtui_SOURCES = \ - shared/nm-utils/nm-shared-utils.c \ - shared/nm-utils/nm-shared-utils.h \ clients/tui/nmtui.c \ clients/tui/nmtui.h \ clients/tui/nmtui-connect.c \ |