From 6d749d3c3ba793a62a416087cfee6c5246bca4f95f64c48258185de98c76df95 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 7 Dec 2007 19:20:19 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/unzip?expand=0&rev=5 --- unzip-open_missing_mode.patch | 13 +++++++++++++ unzip.changes | 5 +++++ unzip.spec | 6 +++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 unzip-open_missing_mode.patch diff --git a/unzip-open_missing_mode.patch b/unzip-open_missing_mode.patch new file mode 100644 index 0000000..104426f --- /dev/null +++ b/unzip-open_missing_mode.patch @@ -0,0 +1,13 @@ +--- fileio.c ++++ fileio.c +@@ -425,7 +425,9 @@ + 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, ++ /* 0644 in portable POSIX notation: */ ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + if ((G.outfile = fdopen(fd, FOPW)) == (FILE *)NULL) { + Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); diff --git a/unzip.changes b/unzip.changes index ff90165..3bf3f53 100644 --- a/unzip.changes +++ b/unzip.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 7 12:52:06 CET 2007 - pth@suse.de + +- Pass file mode when calling open with O_CREAT. + ------------------------------------------------------------------- Mon Dec 3 13:24:27 CET 2007 - pth@suse.de diff --git a/unzip.spec b/unzip.spec index 8320a8a..ab2032c 100644 --- a/unzip.spec +++ b/unzip.spec @@ -17,7 +17,7 @@ Provides: crunzip Obsoletes: crunzip AutoReqProv: on Version: 5.52 -Release: 86 +Release: 87 Summary: A program to unpack compressed files Source: unzip552.tar.bz2 Url: http://www.info-zip.org/ @@ -28,6 +28,7 @@ Patch4: unzip-5.52-filename_too_long.patch Patch5: unzip-no_file_name_translation.patch Patch6: unzip-near-4GB.patch Patch7: unzip-CVE-2005-2475.patch +Patch8: unzip-open_missing_mode.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -52,6 +53,7 @@ Authors: %patch5 %patch6 %patch7 +%patch8 %build export RPM_OPT_FLAGS="%optflags -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fstack-protector" @@ -83,6 +85,8 @@ done %{_bindir}/zipgrep %changelog +* Fri Dec 07 2007 - pth@suse.de +- Pass file mode when calling open with O_CREAT. * Mon Dec 03 2007 - pth@suse.de - Add patch to extend the maximum file/archive size to 2^32-8193 (4294959103) bytes.