From 33b3c7acffca0f36e802a0e1737e6cc7d69474ec Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Jan 15 2009 14:36:41 +0000 Subject: - #473487 - unchecked return values --- diff --git a/tftp-0.49-chk_retcodes.patch b/tftp-0.49-chk_retcodes.patch new file mode 100644 index 0000000..6d63571 --- /dev/null +++ b/tftp-0.49-chk_retcodes.patch @@ -0,0 +1,15 @@ +diff -up tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes tftp-hpa-0.49/tftpd/tftpd.c +--- tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes 2009-01-15 15:28:50.000000000 +0100 ++++ tftp-hpa-0.49/tftpd/tftpd.c 2009-01-15 15:31:36.000000000 +0100 +@@ -932,7 +932,10 @@ int main(int argc, char **argv) + exit(EX_OSERR); + } + #ifdef __CYGWIN__ +- chdir("/"); /* Cygwin chroot() bug workaround */ ++ if (chdir("/") < 0) { /* Cygwin chroot() bug workaround */ ++ syslog(LOG_ERR, "chroot: %m"); ++ exit(EX_OSERR); ++ } + #endif + } + #ifdef HAVE_SETREGID diff --git a/tftp.spec b/tftp.spec index e8127b5..d840573 100644 --- a/tftp.spec +++ b/tftp.spec @@ -1,7 +1,7 @@ Summary: The client for the Trivial File Transfer Protocol (TFTP) Name: tftp Version: 0.49 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: Applications/Internet Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2 @@ -10,6 +10,7 @@ URL: http://www.kernel.org/pub/software/network/tftp/ Patch0: tftp-0.40-remap.patch Patch2: tftp-hpa-0.39-tzfix.patch Patch3: tftp-0.42-tftpboot.patch +Patch4: tftp-0.49-chk_retcodes.patch BuildRequires: tcp_wrappers-devel readline-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -41,6 +42,7 @@ enabled unless it is expressly needed. The TFTP server is run from %patch0 -p1 -b .zero %patch2 -p1 -b .tzfix %patch3 -p1 -b .tftpboot +%patch4 -p1 -b .chk_retcodes %build @@ -86,6 +88,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/* %changelog +* Thu Jan 15 2009 Jiri Skala - 0.49-2 +- #473487 - unchecked return values + * Tue Nov 25 2008 Tom "spot" Callaway - 0.49-1 - update to 0.49