zip/zip23-umask.patch
cvsdist 0810376848 auto-import changelog data from zip-2.3-20.src.rpm
Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Mon Dec 22 2003 Lon Hohberger <lhh@redhat.com> 2.3-19
- Make temp file have umask 0066 mode (#112516)
2004-09-09 15:18:52 +00:00

24 lines
856 B
Diff

diff -ur zip-2.3/zip.c zip-2.3-lhh/zip.c
--- zip-2.3/zip.c 1999-11-16 15:08:10.000000000 -0500
+++ zip-2.3-lhh/zip.c 2003-12-22 09:32:56.000000000 -0500
@@ -849,6 +849,7 @@
/* Add, update, freshen, or delete zip entries in a zip file. See the
command help in help() above. */
{
+ mode_t old_umask; /* umask prior to temp file creation */
int a; /* attributes of zip file */
ulg c; /* start of central directory */
int d; /* true if just adding to a zip file */
@@ -1830,9 +1831,11 @@
if ((tempzip = tempname(zipfile)) == NULL) {
ZIPERR(ZE_MEM, "allocating temp filename");
}
+ old_umask = umask(0066);
if ((tempzf = y = fopen(tempzip, FOPW_TMP)) == NULL) {
ZIPERR(ZE_TEMP, tempzip);
}
+ umask(old_umask);
}
#if (!defined(VMS) && !defined(CMS_MVS))