From 18740e62c08705f7aed12f1ec74c5c41361d8c3c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 14 Dec 2018 08:13:38 +0100 Subject: [PATCH] opkg_download: print error when fork() fails Instead of silently failing and claiming that the signature verification failed, print out the error status when the initial fork() call fails. Ref: https://bugs.openwrt.org/index.php?do=details&task_id=1999 Signed-off-by: Jo-Philipp Wich --- libopkg/opkg_download.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c index 51d43b3..f9e7e98 100644 --- a/libopkg/opkg_download.c +++ b/libopkg/opkg_download.c @@ -306,8 +306,10 @@ int opkg_verify_file(char *text_file, char *sig_file) return 0; pid = fork(); - if (pid < 0) + if (pid < 0) { + opkg_perror(ERROR, "Failed to fork opkg-key process"); return -1; + } if (!pid) { execl("/usr/sbin/opkg-key", "opkg-key", "verify", sig_file, -- 2.25.1