Dirk Mueller
06dba6d951
- 005-missing-includes.patch: add missing includes to make headers compatible to sunrpc. - Update to version 1.0.2 - 002-old-automake.patch: not needed anymore - 005-libtirpc-1.0.2-rc1.patch: dropped - 006-Remove-old-meanwhile-wrong-comment-about-FD_SETSIZE-.patch: removed, merged upstream - 007-Change-rtime-function-to-use-poll-instead-of-select.patch: removed, merged upstream - 008-Add-parameters-to-local-prototypes-to-fix-compiler-w.patch: removed, merged upstream - 009-makefd_xprt-checks-that-the-filedesriptor-is-lower-t.patch: removed, merged upstream - 010-The-goto-again-statement-was-an-left-over-from-the-p.patch: removed, merged upstream - 012-libtirpc-needs-rpcsvc-nis.h-for-compiling-but-does-n.patch: removed, merged upstream - 013-If-we-don-t-compile-in-YP-support-don-t-include-YP-h.patch: removed, merged upstream - 014-Add-des_crypt.c-and-des_impl.c-to-become-independent.patch: removed, merged upstream - 015-Fix-includes-to-compile-without-deprecated-glibc-fun.patch: removed, merged upstream - patch6_7.diff: obsolete - Replace explicit_bzero.patch with 004-replace-bzero-with-memset.patch from git - Rename libtirpc-new-path-rpcbindsock.patch to 001-new-rpcbindsock-path.patch - 003-rpc-types.patch: Add some typedefs to rpc/types.h to allow applications be compiled with -std=iso9899:1990 OBS-URL: https://build.opensuse.org/request/show/541890 OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=63
63 lines
2.1 KiB
Diff
63 lines
2.1 KiB
Diff
From 5356b63005e9d8169e0399cb76f26fbd29a78dee Mon Sep 17 00:00:00 2001
|
|
From: Joshua Kinard <kumba@gentoo.org>
|
|
Date: Wed, 23 Aug 2017 14:31:36 -0400
|
|
Subject: [PATCH 1/2] Replace bzero() calls with equivalent memset() calls
|
|
|
|
As annotated in the bzero(3) man page, bzero() was marked as LEGACY in
|
|
POSIX.1-2001 and removed in POSIX.1-2008, and should be replaced with
|
|
memset() calls to write zeros to a memory region. The attached patch
|
|
replaces two bzero() calls and one __bzero() call in libtirpc with
|
|
equivalent memset() calls. The latter replacement fixes a compile error
|
|
under uclibc-ng, which lacks a definition for __bzero()
|
|
|
|
Signed-off-by: Joshua Kinard <kumba@gentoo.org>
|
|
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
---
|
|
src/auth_time.c | 2 +-
|
|
src/des_impl.c | 2 +-
|
|
src/svc_auth_des.c | 2 +-
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/auth_time.c b/src/auth_time.c
|
|
index 7f83ab4..69400bc 100644
|
|
--- a/src/auth_time.c
|
|
+++ b/src/auth_time.c
|
|
@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
|
|
sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
|
|
useua = &ipuaddr[0];
|
|
|
|
- bzero((char *)&sin, sizeof(sin));
|
|
+ memset(&sin, 0, sizeof(sin));
|
|
if (uaddr_to_sockaddr(useua, &sin)) {
|
|
msg("unable to translate uaddr to sockaddr.");
|
|
if (needfree)
|
|
diff --git a/src/des_impl.c b/src/des_impl.c
|
|
index 9dbccaf..15bec2a 100644
|
|
--- a/src/des_impl.c
|
|
+++ b/src/des_impl.c
|
|
@@ -588,7 +588,7 @@ _des_crypt (char *buf, unsigned len, struct desparams *desp)
|
|
}
|
|
tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
|
|
tbuf[0] = tbuf[1] = 0;
|
|
- __bzero (schedule, sizeof (schedule));
|
|
+ memset (schedule, 0, sizeof (schedule));
|
|
|
|
return (1);
|
|
}
|
|
diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c
|
|
index 2e90146..19a7c60 100644
|
|
--- a/src/svc_auth_des.c
|
|
+++ b/src/svc_auth_des.c
|
|
@@ -356,7 +356,7 @@ cache_init()
|
|
|
|
authdes_cache = (struct cache_entry *)
|
|
mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ);
|
|
- bzero((char *)authdes_cache,
|
|
+ memset(authdes_cache, 0,
|
|
sizeof(struct cache_entry) * AUTHDES_CACHESZ);
|
|
|
|
authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ);
|
|
--
|
|
2.12.3
|
|
|