diff options
author | tez <tez@pkgsrc.org> | 2012-01-10 21:09:55 +0000 |
---|---|---|
committer | tez <tez@pkgsrc.org> | 2012-01-10 21:09:55 +0000 |
commit | 5be1f7fc220512c24e6e8c47061ae62df7664212 (patch) | |
tree | 81094532564833d9521c96fb8f3bc6bf7b78a7f9 /converters/mpack/patches/patch-ab | |
parent | 46624e3f267542cceeb32f03de841c7d66d6f0af (diff) | |
download | pkgsrc-5be1f7fc220512c24e6e8c47061ae62df7664212.tar.gz |
add patch for CVE-2011-4919 (bad permissions on created files)
Diffstat (limited to 'converters/mpack/patches/patch-ab')
-rw-r--r-- | converters/mpack/patches/patch-ab | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/converters/mpack/patches/patch-ab b/converters/mpack/patches/patch-ab index fb4d9036918..470570a15d9 100644 --- a/converters/mpack/patches/patch-ab +++ b/converters/mpack/patches/patch-ab @@ -1,13 +1,14 @@ -$NetBSD: patch-ab,v 1.8 2010/01/15 23:47:14 dholland Exp $ +$NetBSD: patch-ab,v 1.9 2012/01/10 21:09:55 tez Exp $ - Include fixes for modern Unix. - Don't try to use /usr/tmp. - Time handling fixes for NetBSD with 64-bit time_t. +- Fix for CVE-2011-4919 (bad permissions on created files) Upstream: as far as I know not actively maintained upstream. ---- unixos.c.orig 2003-07-21 16:54:05.000000000 -0400 -+++ unixos.c 2009-02-15 14:56:48.000000000 -0500 +--- unixos.c.orig 2003-07-21 20:54:05.000000000 +0000 ++++ unixos.c @@ -23,9 +23,11 @@ * SOFTWARE. */ @@ -53,3 +54,15 @@ Upstream: as far as I know not actively maintained upstream. } strcat(buf, "/m-prts-"); p = getenv("USER"); +@@ -137,9 +139,9 @@ FILE *os_createnewfile(char *fname) + FILE *ret; + + #ifdef O_EXCL +- fd=open(fname, O_RDWR|O_CREAT|O_EXCL, 0644); ++ fd=open(fname, O_RDWR|O_CREAT|O_EXCL, 0600); + #else +- fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0644); ++ fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0600); + #endif + + if (fd == -1) |