diff --git a/glibc.spec b/glibc.spec index f91b8e973a31a6dd4d4cead6dcef5974f278ea56..98c055776c3c7f75b42d966cac4a91154969b479 100644 --- a/glibc.spec +++ b/glibc.spec @@ -70,7 +70,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 129 +Release: 130 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -327,6 +327,7 @@ Patch9044: add-Wl-z-noseparate-code-for-so.patch Patch9045: display-declaration-fstat-function-make-fstat-call-t.patch Patch9046: fix-Segmentation-fault-in-nss-module.patch Patch9047: fix_nss_database_check_reload_and_get_memleak.patch +Patch9048: inet-fix-warn-unused-result.patch Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) @@ -1492,6 +1493,9 @@ fi %endif %changelog +* Wed Aug 9 2023 liubo - 2.34-130 +- inet fix warn unused result + * Mon Aug 7 2023 zhanghao - 2.34-129 - fix Segmentation fault in nss module - fix nss database check reload and get memleak diff --git a/inet-fix-warn-unused-result.patch b/inet-fix-warn-unused-result.patch new file mode 100644 index 0000000000000000000000000000000000000000..488759830993f50a77b829f65e61c2e87a0169ec --- /dev/null +++ b/inet-fix-warn-unused-result.patch @@ -0,0 +1,41 @@ +From 1629adf2a6eefe5ddddc2445e2d056ca80edfe8b Mon Sep 17 00:00:00 2001 +From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= +Date: Tue, 18 Apr 2023 09:01:00 -0400 +Subject: [PATCH] inet/rcmd.c: fix warn unused result + +Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in +glibc. + +Reviewed-by: Siddhesh Poyarekar +--- + inet/rcmd.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/inet/rcmd.c b/inet/rcmd.c +index ad8a894907..c1cd9daeb5 100644 +--- a/inet/rcmd.c ++++ b/inet/rcmd.c +@@ -561,7 +561,9 @@ ruserok2_sa (struct sockaddr *ra, size_t ralen, int superuser, + reading an NFS mounted file system, can't read files that + are protected read/write owner only. */ + uid = __geteuid (); +- seteuid (pwd->pw_uid); ++ if (seteuid (pwd->pw_uid) < 0) ++ return -1; ++ + hostf = iruserfopen (pbuf, pwd->pw_uid); + + if (hostf != NULL) +@@ -570,7 +572,8 @@ ruserok2_sa (struct sockaddr *ra, size_t ralen, int superuser, + fclose (hostf); + } + +- seteuid (uid); ++ if (seteuid (uid) < 0) ++ return -1; + return isbad; + } + return -1; +-- +2.39.3 +