summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2020-04-29 14:36:44 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-07 13:03:30 +0100
commit5bb40837b5b9fb34b6229cf1f903c2f3ddfa614e (patch)
tree3a381f78a3cb02b5d9a4f32b2bde4457bceb4f0b
parent323560d6ae04a2e428e8f036b24732d5b13e77df (diff)
downloadpoky-5bb40837b5b9fb34b6229cf1f903c2f3ddfa614e.tar.gz
iputils: Initialize libgcrypt
Initialize libgcrypt on first use otherwise there comes below warning when check the status of the ninfod.service. # systemctl status ninfod.service * ninfod.service - Respond to IPv6 Node Information Queries Loaded: loaded (/lib/systemd/system/ninfod.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2020-04-29 05:18:21 UTC; 36s ago Docs: man:ninfod(8) Main PID: 347 (ninfod) Tasks: 1 (limit: 9382) Memory: 1.2M CGroup: /system.slice/ninfod.service `-347 /sbin/ninfod -d Apr 29 05:18:21 intel-x86-64 systemd[1]: Started Respond to IPv6 Node Information Queries. Apr 29 05:18:24 intel-x86-64 ninfod[347]: Libgcrypt warning: missing initialization - please fix the application Reference: https://salsa.debian.org/apt-team/apt/-/commit/4f489a8c7954cbbc9613e6b671c8efe87b9ced8c (From OE-Core rev: 8648c6497d1904b988059cbd72d1592caa8708d0) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/iputils/iputils/0001-iputils-Initialize-libgcrypt.patch55
-rw-r--r--meta/recipes-extended/iputils/iputils_s20190709.bb1
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-extended/iputils/iputils/0001-iputils-Initialize-libgcrypt.patch b/meta/recipes-extended/iputils/iputils/0001-iputils-Initialize-libgcrypt.patch
new file mode 100644
index 0000000000..b56804cebe
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/0001-iputils-Initialize-libgcrypt.patch
@@ -0,0 +1,55 @@
1From 8576e0c218634e6f7ed1b6ff02fa164fb0c75f86 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Wed, 29 Apr 2020 03:50:32 +0000
4Subject: [PATCH] iputils_md5dig.h: Initialize libgcrypt
5
6Initialize libgcrypt on first use otherwise
7there comes below warning when check the status
8of the ninfod.service.
9 # systemctl status ninfod.service
10 * ninfod.service - Respond to IPv6 Node Information Queries
11 Loaded: loaded (/lib/systemd/system/ninfod.service; enabled; vendor preset: enabled)
12 Active: active (running) since Wed 2020-04-29 05:18:21 UTC; 36s ago
13 Docs: man:ninfod(8)
14 Main PID: 347 (ninfod)
15 Tasks: 1 (limit: 9382)
16 Memory: 1.2M
17 CGroup: /system.slice/ninfod.service
18 `-347 /sbin/ninfod -d
19
20 Apr 29 05:18:21 intel-x86-64 systemd[1]: Started Respond to IPv6 Node Information Queries.
21 Apr 29 05:18:24 intel-x86-64 ninfod[347]: Libgcrypt warning: missing initialization - please fix the application
22
23Upstream-Status: Inappropriate [the upstream avoids linking to crypto libraries in
24 commit 214ed83 common: copy md5 implementation to iputils project]
25
26Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
27---
28 iputils_md5dig.h | 9 +++++++++
29 1 file changed, 9 insertions(+)
30
31diff --git a/iputils_md5dig.h b/iputils_md5dig.h
32index bfa7f02..3cc3fbf 100644
33--- a/iputils_md5dig.h
34+++ b/iputils_md5dig.h
35@@ -24,8 +24,17 @@ typedef struct {
36 gcry_md_hd_t dig;
37 } iputils_md5dig_ctx;
38
39+void maybeInit()
40+{
41+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P))
42+ {
43+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
44+ }
45+}
46+
47 static void iputils_md5dig_init(iputils_md5dig_ctx *ctx)
48 {
49+ maybeInit();
50 if (gcry_md_open(&ctx->dig, GCRY_MD_MD5, 0) != GPG_ERR_NO_ERROR)
51 abort();
52 return;
53--
542.24.1
55
diff --git a/meta/recipes-extended/iputils/iputils_s20190709.bb b/meta/recipes-extended/iputils/iputils_s20190709.bb
index 2aed6b56ca..545f3d5e87 100644
--- a/meta/recipes-extended/iputils/iputils_s20190709.bb
+++ b/meta/recipes-extended/iputils/iputils_s20190709.bb
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/iputils/iputils \
14 file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \ 14 file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \
15 file://0001-ninfod-fix-systemd-Documentation-url-error.patch \ 15 file://0001-ninfod-fix-systemd-Documentation-url-error.patch \
16 file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \ 16 file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \
17 file://0001-iputils-Initialize-libgcrypt.patch \
17 " 18 "
18SRCREV = "13e00847176aa23683d68fce1d17ffb523510946" 19SRCREV = "13e00847176aa23683d68fce1d17ffb523510946"
19 20