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))