From fad71b4c2d1d235b0025a7ae4850da9251b3c393 Mon Sep 17 00:00:00 2001 From: Ivana Varekova Date: Tue, 4 Sep 2007 08:59:53 +0000 Subject: [PATCH] fix open call --- unzip-5.52-open.patch | 19 +++++++++++++++++++ unzip.spec | 7 ++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 unzip-5.52-open.patch diff --git a/unzip-5.52-open.patch b/unzip-5.52-open.patch new file mode 100644 index 0000000..ca44fba --- /dev/null +++ b/unzip-5.52-open.patch @@ -0,0 +1,19 @@ +--- unzip-5.52/fileio.c.pom 2007-08-30 11:36:05.000000000 +0200 ++++ unzip-5.52/fileio.c 2007-09-04 10:37:41.000000000 +0200 +@@ -53,7 +53,6 @@ + + ---------------------------------------------------------------------------*/ + +- + #define __FILEIO_C /* identifies this source module */ + #define UNZIP_INTERNAL + #include "unzip.h" +@@ -425,7 +424,7 @@ int open_outfile(__G) /* return + Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", + FnFilter1(G.filename))); + +- fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT); ++ fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT, 0600); + if ((G.outfile = fdopen(fd, FOPW)) == (FILE *)NULL) { + Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); diff --git a/unzip.spec b/unzip.spec index 3230b9c..b52ec0b 100644 --- a/unzip.spec +++ b/unzip.spec @@ -1,7 +1,7 @@ Summary: A utility for unpacking zip files Name: unzip Version: 5.52 -Release: 4%{?dist} +Release: 5%{?dist} License: BSD Group: Applications/Archiving Source: ftp://ftp.info-zip.org/pub/infozip/src/unzip552.tar.gz @@ -13,6 +13,7 @@ Patch7: unzip-5.52-near-4GB.patch Patch8: unzip-5.52-near-4GB2.patch Patch9: unzip-5.52-long-filename.patch Patch10: unzip-5.52-makefile.patch +Patch11: unzip-5.52-open.patch URL: http://www.info-zip.org/pub/infozip/UnZip.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -37,6 +38,7 @@ a zip archive. %patch8 -p1 -b .4GB2 %patch9 -p1 -b .lfn %patch10 -p1 -b .make +%patch11 -p1 -b .open ln -s unix/Makefile Makefile %build @@ -57,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/* %changelog +* Tue Sep 4 2007 Ivana Varekova - 5.52-5 +- fix open call + * Wed Feb 7 2007 Ivana Varekova - 5.52-4 - incorporate the next peckage review comment