From b5dcb6260a2d49862ff5222d65c59a4ebf034d86 Mon Sep 17 00:00:00 2001 From: zhangpan Date: Fri, 9 Jun 2023 06:21:12 +0000 Subject: [PATCH] fix build error --- cups.spec | 6 +++- fix-httpAddrGetList-test-case-fail.patch | 44 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 fix-httpAddrGetList-test-case-fail.patch diff --git a/cups.spec b/cups.spec index ed6abd8..f0595b5 100644 --- a/cups.spec +++ b/cups.spec @@ -1,7 +1,7 @@ Name: cups Epoch: 1 Version: 2.2.13 -Release: 14 +Release: 15 Summary: CUPS is the standards-based, open source printing system for linux operating systems. License: GPLv2+ and LGPLv2+ with exceptions and AML Url: http://www.cups.org/ @@ -39,6 +39,7 @@ Patch6002: backport-CVE-2022-26691.patch #Partial backport of 82e3ee0e3230287b76a76fb8f16b92ca6e50b444 Patch6003: CVE-2019-8842.patch Patch6004: backport-CVE-2023-32324.patch +Patch6005: fix-httpAddrGetList-test-case-fail.patch Provides: cupsddk cupsddk-drivers cups-filesystem cups-client cups-ipptool cups-lpd Provides: lpd lpr /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat @@ -333,6 +334,9 @@ rm -f %{_exec_prefix}/lib/cups/backend/smb %doc %{_datadir}/%{name}/www/apple-touch-icon.png %changelog +* Fri Jun 9 2023 zhangpan - 1:2.2.13-15 +- fix build error + * Sat Jun 3 2023 zhouwenpei - 1:2.2.13-14 - fix CVE-2023-32324 diff --git a/fix-httpAddrGetList-test-case-fail.patch b/fix-httpAddrGetList-test-case-fail.patch new file mode 100644 index 0000000..320fc3b --- /dev/null +++ b/fix-httpAddrGetList-test-case-fail.patch @@ -0,0 +1,44 @@ +From 079c00aac0db4d95383cf73be73e641ff26ebfc6 Mon Sep 17 00:00:00 2001 +From: zhangpan +Date: Fri, 9 Jun 2023 11:04:18 +0800 +Subject: [PATCH] fix httpAddrGetList test case fail + +--- + cups/testhttp.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/cups/testhttp.c b/cups/testhttp.c +index 313e4bb..f446d65 100644 +--- a/cups/testhttp.c ++++ b/cups/testhttp.c +@@ -14,7 +14,7 @@ + */ + + #include "cups-private.h" +- ++#include + + /* + * Types and structures... +@@ -231,7 +231,8 @@ main(int argc, /* I - Number of command-line arguments */ + char scheme[HTTP_MAX_URI], /* Scheme from URI */ + hostname[HTTP_MAX_URI], /* Hostname from URI */ + username[HTTP_MAX_URI], /* Username:password from URI */ +- resource[HTTP_MAX_URI]; /* Resource from URI */ ++ resource[HTTP_MAX_URI], /* Resource from URI */ ++ localhostname[HTTP_MAX_URI]; /* gethostname */ + int port; /* Port number from URI */ + http_uri_status_t uri_status; /* Status of URI separation */ + http_addrlist_t *addrlist, /* Address list */ +@@ -391,7 +392,7 @@ main(int argc, /* I - Number of command-line arguments */ + + printf("httpAddrGetList(%s): ", hostname); + +- addrlist = httpAddrGetList(hostname, AF_UNSPEC, NULL); ++ addrlist = httpAddrGetList(gethostname(localhostname, sizeof(localhostname)), AF_UNSPEC, NULL); + if (addrlist) + { + for (i = 0, addr = addrlist; addr; i ++, addr = addr->next) +-- +2.33.0 + -- Gitee