Return proper error code when map file opening did not succeeded
RHBZ#1004110
This commit is contained in:
parent
d389cb01f9
commit
10cbfc5895
23
ypserv-tcopenfail.patch
Normal file
23
ypserv-tcopenfail.patch
Normal file
@ -0,0 +1,23 @@
|
||||
When tcbdbopen fails to open a database file wrong pointer is returned
|
||||
instead of NULL pointer.
|
||||
|
||||
Patch by Edgar Hoch
|
||||
|
||||
RHBZ#1004110
|
||||
|
||||
--- ypserv-2.31/lib/yp_db.c.orig 2013-04-10 16:42:21.000000000 +0200
|
||||
+++ ypserv-2.31/lib/yp_db.c 2013-09-04 02:38:04.515428554 +0200
|
||||
@@ -181,6 +181,12 @@
|
||||
}
|
||||
else if (debug_flag)
|
||||
log_msg ("\t\t->Returning OK!");
|
||||
+ if ( !isok )
|
||||
+ {
|
||||
+ /* DB not successful opened. Close database object and set return value to NULL. */
|
||||
+ tcbdbdel (dbp);
|
||||
+ dbp = NULL;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ Summary: The NIS (Network Information Service) server
|
||||
Url: http://www.linux-nis.org/nis/ypserv/index.html
|
||||
Name: ypserv
|
||||
Version: 2.31
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2
|
||||
@ -31,6 +31,7 @@ Patch7: ypserv-2.24-aliases.patch
|
||||
Patch8: ypserv-2.27-confpost.patch
|
||||
Patch9: ypserv-2.29-relro.patch
|
||||
Patch10: ypserv-2.31-netgrprecur.patch
|
||||
Patch11: ypserv-tcopenfail.patch
|
||||
|
||||
BuildRequires: tokyocabinet-devel
|
||||
BuildRequires: systemd
|
||||
@ -66,6 +67,7 @@ machines.
|
||||
%patch8 -p1 -b .confpost
|
||||
%patch9 -p1 -b .relro
|
||||
%patch10 -p1 -b .netgrprecur
|
||||
%patch11 -p1 -b .tcopenfail
|
||||
|
||||
autoreconf
|
||||
|
||||
@ -222,6 +224,10 @@ fi
|
||||
%{_includedir}/*/*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 4 2013 Honza Horak <hhorak@redhat.com> - 2.31-5
|
||||
- Return proper error code when map file opening did not succeeded
|
||||
RHBZ#1004110
|
||||
|
||||
* Mon Jul 29 2013 Honza Horak <hhorak@redhat.com> - 2.31-4
|
||||
- Remove systemd-units and systemd-sysv requirements
|
||||
- Clean-up SysV init conversion code
|
||||
|
Loading…
Reference in New Issue
Block a user