bindresvport.c: fix a potential resource leakage (bz 2135405)

Signed-off-by: Steve Dickson <steved@redhat.com>
Resolves: bz2135405
This commit is contained in:
Steve Dickson 2022-10-28 14:53:19 -04:00
parent 49fa22945e
commit b7eff374c6
2 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,51 @@
commit a013336ecdc476d7357398d9cd24b114070bb767
Author: Rosen Penev <rosenp@gmail.com>
Date: Tue Oct 25 12:34:56 2022 -0400
Add missing extern
Fixes compilation warning.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/svc_auth.c b/src/svc_auth.c
index ce8bbd8..789d6af 100644
--- a/src/svc_auth.c
+++ b/src/svc_auth.c
@@ -66,6 +66,9 @@ static struct authsvc *Auths = NULL;
extern SVCAUTH svc_auth_none;
+#ifdef AUTHDES_SUPPORT
+extern enum auth_stat _svcauth_des(struct svc_req *rqst, struct rpc_msg *msg);
+#endif
/*
* The call rpc message, msg has been obtained from the wire. The msg contains
* the raw form of credentials and verifiers. authenticate returns AUTH_OK
commit 55526c52a449907e4d34b829b96141afab530b23
Author: Zhi Li <yieli@redhat.com>
Date: Mon Oct 24 13:46:54 2022 -0400
bindresvport.c: fix a potential resource leakage
Close the FILE *fp of load_blacklist() in another
return path to avoid potential resource leakage.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2135405
Signed-off-by: Zhi Li <yieli@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/bindresvport.c b/src/bindresvport.c
index 5c0ddcf..efeb1cc 100644
--- a/src/bindresvport.c
+++ b/src/bindresvport.c
@@ -130,6 +130,7 @@ load_blacklist (void)
if (list == NULL)
{
free (buf);
+ fclose (fp);
return;
}
}

View File

@ -2,7 +2,7 @@
Name: libtirpc
Version: 1.3.3
Release: 0%{?dist}
Release: 1%{?dist}
Summary: Transport Independent RPC Library
License: SISSL and BSD
URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary
@ -13,6 +13,11 @@ BuildRequires: krb5-devel
BuildRequires: gcc
BuildRequires: make
#
# RHEL9.2
#
Patch001: libtirpc-1.3.3-blacklist-close.patch
%description
This package contains SunLib's implementation of transport-independent
RPC (TI-RPC) documentation. This library forms a piece of the base of
@ -112,6 +117,9 @@ mv %{buildroot}%{_mandir}/man3 %{buildroot}%{_mandir}/man3t
%{_mandir}/*/*
%changelog
* Fri Oct 28 2022 Steve Dickson <steved@redhat.com> - 1.3.3-1
- bindresvport.c: fix a potential resource leakage (bz 2135405)
* Mon Aug 15 2022 Steve Dickson <steved@redhat.com> - 1.3.3
- Rebased to libtirpc-1.3.3 (bz 2118157)