head 1.9; access; symbols pkgsrc-2026Q1:1.9.0.114 pkgsrc-2026Q1-base:1.9 pkgsrc-2025Q4:1.9.0.112 pkgsrc-2025Q4-base:1.9 pkgsrc-2025Q3:1.9.0.110 pkgsrc-2025Q3-base:1.9 pkgsrc-2025Q2:1.9.0.108 pkgsrc-2025Q2-base:1.9 pkgsrc-2025Q1:1.9.0.106 pkgsrc-2025Q1-base:1.9 pkgsrc-2024Q4:1.9.0.104 pkgsrc-2024Q4-base:1.9 pkgsrc-2024Q3:1.9.0.102 pkgsrc-2024Q3-base:1.9 pkgsrc-2024Q2:1.9.0.100 pkgsrc-2024Q2-base:1.9 pkgsrc-2024Q1:1.9.0.98 pkgsrc-2024Q1-base:1.9 pkgsrc-2023Q4:1.9.0.96 pkgsrc-2023Q4-base:1.9 pkgsrc-2023Q3:1.9.0.94 pkgsrc-2023Q3-base:1.9 pkgsrc-2023Q2:1.9.0.92 pkgsrc-2023Q2-base:1.9 pkgsrc-2023Q1:1.9.0.90 pkgsrc-2023Q1-base:1.9 pkgsrc-2022Q4:1.9.0.88 pkgsrc-2022Q4-base:1.9 pkgsrc-2022Q3:1.9.0.86 pkgsrc-2022Q3-base:1.9 pkgsrc-2022Q2:1.9.0.84 pkgsrc-2022Q2-base:1.9 pkgsrc-2022Q1:1.9.0.82 pkgsrc-2022Q1-base:1.9 pkgsrc-2021Q4:1.9.0.80 pkgsrc-2021Q4-base:1.9 pkgsrc-2021Q3:1.9.0.78 pkgsrc-2021Q3-base:1.9 pkgsrc-2021Q2:1.9.0.76 pkgsrc-2021Q2-base:1.9 pkgsrc-2021Q1:1.9.0.74 pkgsrc-2021Q1-base:1.9 pkgsrc-2020Q4:1.9.0.72 pkgsrc-2020Q4-base:1.9 pkgsrc-2020Q3:1.9.0.70 pkgsrc-2020Q3-base:1.9 pkgsrc-2020Q2:1.9.0.66 pkgsrc-2020Q2-base:1.9 pkgsrc-2020Q1:1.9.0.46 pkgsrc-2020Q1-base:1.9 pkgsrc-2019Q4:1.9.0.68 pkgsrc-2019Q4-base:1.9 pkgsrc-2019Q3:1.9.0.64 pkgsrc-2019Q3-base:1.9 pkgsrc-2019Q2:1.9.0.62 pkgsrc-2019Q2-base:1.9 pkgsrc-2019Q1:1.9.0.60 pkgsrc-2019Q1-base:1.9 pkgsrc-2018Q4:1.9.0.58 pkgsrc-2018Q4-base:1.9 pkgsrc-2018Q3:1.9.0.56 pkgsrc-2018Q3-base:1.9 pkgsrc-2018Q2:1.9.0.54 pkgsrc-2018Q2-base:1.9 pkgsrc-2018Q1:1.9.0.52 pkgsrc-2018Q1-base:1.9 pkgsrc-2017Q4:1.9.0.50 pkgsrc-2017Q4-base:1.9 pkgsrc-2017Q3:1.9.0.48 pkgsrc-2017Q3-base:1.9 pkgsrc-2017Q2:1.9.0.44 pkgsrc-2017Q2-base:1.9 pkgsrc-2017Q1:1.9.0.42 pkgsrc-2017Q1-base:1.9 pkgsrc-2016Q4:1.9.0.40 pkgsrc-2016Q4-base:1.9 pkgsrc-2016Q3:1.9.0.38 pkgsrc-2016Q3-base:1.9 pkgsrc-2016Q2:1.9.0.36 pkgsrc-2016Q2-base:1.9 pkgsrc-2016Q1:1.9.0.34 pkgsrc-2016Q1-base:1.9 pkgsrc-2015Q4:1.9.0.32 pkgsrc-2015Q4-base:1.9 pkgsrc-2015Q3:1.9.0.30 pkgsrc-2015Q3-base:1.9 pkgsrc-2015Q2:1.9.0.28 pkgsrc-2015Q2-base:1.9 pkgsrc-2015Q1:1.9.0.26 pkgsrc-2015Q1-base:1.9 pkgsrc-2014Q4:1.9.0.24 pkgsrc-2014Q4-base:1.9 pkgsrc-2014Q3:1.9.0.22 pkgsrc-2014Q3-base:1.9 pkgsrc-2014Q2:1.9.0.20 pkgsrc-2014Q2-base:1.9 pkgsrc-2014Q1:1.9.0.18 pkgsrc-2014Q1-base:1.9 pkgsrc-2013Q4:1.9.0.16 pkgsrc-2013Q4-base:1.9 pkgsrc-2013Q3:1.9.0.14 pkgsrc-2013Q3-base:1.9 pkgsrc-2013Q2:1.9.0.12 pkgsrc-2013Q2-base:1.9 pkgsrc-2013Q1:1.9.0.10 pkgsrc-2013Q1-base:1.9 pkgsrc-2012Q4:1.9.0.8 pkgsrc-2012Q4-base:1.9 pkgsrc-2012Q3:1.9.0.6 pkgsrc-2012Q3-base:1.9 pkgsrc-2012Q2:1.9.0.4 pkgsrc-2012Q2-base:1.9 pkgsrc-2012Q1:1.9.0.2 pkgsrc-2012Q1-base:1.9 pkgsrc-2011Q4:1.8.0.16 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q3:1.8.0.14 pkgsrc-2011Q3-base:1.8 pkgsrc-2011Q2:1.8.0.12 pkgsrc-2011Q2-base:1.8 pkgsrc-2011Q1:1.8.0.10 pkgsrc-2011Q1-base:1.8 pkgsrc-2010Q4:1.8.0.8 pkgsrc-2010Q4-base:1.8 pkgsrc-2010Q3:1.8.0.6 pkgsrc-2010Q3-base:1.8 pkgsrc-2010Q2:1.8.0.4 pkgsrc-2010Q2-base:1.8 pkgsrc-2010Q1:1.8.0.2 pkgsrc-2010Q1-base:1.8 pkgsrc-2009Q4:1.7.0.8 pkgsrc-2009Q4-base:1.7 pkgsrc-2009Q3:1.7.0.6 pkgsrc-2009Q3-base:1.7 pkgsrc-2009Q2:1.7.0.4 pkgsrc-2009Q2-base:1.7 pkgsrc-2009Q1:1.7.0.2 pkgsrc-2009Q1-base:1.7 pkgsrc-2008Q4:1.6.0.30 pkgsrc-2008Q4-base:1.6 pkgsrc-2008Q3:1.6.0.28 pkgsrc-2008Q3-base:1.6 cube-native-xorg:1.6.0.26 cube-native-xorg-base:1.6 pkgsrc-2008Q2:1.6.0.24 pkgsrc-2008Q2-base:1.6 cwrapper:1.6.0.22 pkgsrc-2008Q1:1.6.0.20 pkgsrc-2008Q1-base:1.6 pkgsrc-2007Q4:1.6.0.18 pkgsrc-2007Q4-base:1.6 pkgsrc-2007Q3:1.6.0.16 pkgsrc-2007Q3-base:1.6 pkgsrc-2007Q2:1.6.0.14 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.12 pkgsrc-2007Q1-base:1.6 pkgsrc-2006Q4:1.6.0.10 pkgsrc-2006Q4-base:1.6 pkgsrc-2006Q3:1.6.0.8 pkgsrc-2006Q3-base:1.6 pkgsrc-2006Q2:1.6.0.6 pkgsrc-2006Q2-base:1.6 pkgsrc-2006Q1:1.6.0.4 pkgsrc-2006Q1-base:1.6 pkgsrc-2005Q4:1.6.0.2 pkgsrc-2005Q4-base:1.6 pkgsrc-2005Q3:1.5.0.18 pkgsrc-2005Q3-base:1.5 pkgsrc-2005Q2:1.5.0.16 pkgsrc-2005Q2-base:1.5 pkgsrc-2005Q1:1.5.0.14 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.5.0.12 pkgsrc-2004Q4-base:1.5 pkgsrc-2004Q3:1.5.0.10 pkgsrc-2004Q3-base:1.5 pkgsrc-2004Q2:1.5.0.8 pkgsrc-2004Q2-base:1.5 pkgsrc-2004Q1:1.5.0.6 pkgsrc-2004Q1-base:1.5 pkgsrc-2003Q4:1.5.0.4 pkgsrc-2003Q4-base:1.5 netbsd-1-6-1:1.5.0.2 netbsd-1-6-1-base:1.5 netbsd-1-6:1.4.0.8 netbsd-1-6-RELEASE-base:1.4 pkgviews:1.4.0.4 pkgviews-base:1.4 buildlink2:1.4.0.2 buildlink2-base:1.4 netbsd-1-5-PATCH003:1.4 netbsd-1-5-PATCH001:1.3 netbsd-1-5-RELEASE:1.3 netbsd-1-4-PATCH003:1.3 netbsd-1-4-PATCH002:1.3 comdex-fall-1999:1.3 netbsd-1-4-PATCH001:1.3 netbsd-1-4-RELEASE:1.3 netbsd-1-3-PATCH003:1.3 netbsd-1-3-PATCH002:1.2 FreeBSD-current-1998-02-22:1.1.1.1 FREEBSD:1.1.1; locks; strict; comment @# @; 1.9 date 2012.01.10.21.09.55; author tez; state Exp; branches; next 1.8; 1.8 date 2010.01.15.23.47.14; author dholland; state Exp; branches; next 1.7; 1.7 date 2009.02.15.20.12.18; author dholland; state Exp; branches; next 1.6; 1.6 date 2005.12.19.00.13.39; author joerg; state Exp; branches 1.6.30.1; next 1.5; 1.5 date 2002.12.05.16.45.21; author is; state Exp; branches; next 1.4; 1.4 date 2001.08.20.02.15.37; author jlam; state Exp; branches; next 1.3; 1.3 date 98.08.07.10.40.16; author agc; state Exp; branches; next 1.2; 1.2 date 98.02.26.00.11.07; author tron; state Exp; branches; next 1.1; 1.1 date 98.02.25.23.51.08; author tron; state Exp; branches 1.1.1.1; next ; 1.6.30.1 date 2009.02.15.22.23.50; author tron; state Exp; branches; next ; 1.1.1.1 date 98.02.25.23.51.08; author tron; state Exp; branches; next ; desc @@ 1.9 log @add patch for CVE-2011-4919 (bad permissions on created files) @ text @$NetBSD: patch-ab,v 1.7 2009/02/15 20:12:18 dholland 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 20:54:05.000000000 +0000 +++ unixos.c @@@@ -23,9 +23,11 @@@@ * SOFTWARE. */ #include +#include #include #include #include +#include #include #include #include @@@@ -38,10 +40,6 @@@@ #define MAXHOSTNAMELEN 64 #endif -extern int errno; -extern char *malloc(); -extern char *getenv(); - int overwrite_files = 0; int didchat; @@@@ -76,7 +74,7 @@@@ char *os_genid(void) } result = malloc(25+strlen(hostname)); - sprintf(result, "%d.%d@@%s", pid, curtime++, hostname); + sprintf(result, "%d.%lld@@%s", pid, (long long) curtime++, hostname); return result; } @@@@ -90,7 +88,11 @@@@ char *os_idtodir(char *id) strcpy(buf, getenv("TMPDIR")); } else { - strcpy(buf, "/usr/tmp"); +#if defined(P_tmpdir) + strcpy(buf, P_tmpdir); +#else + strcpy(buf, "/var/tmp"); +#endif } 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) @ 1.8 log @Add comments to two patches. These changes were sitting uncommitted in one of my trees; I don't remember why they didn't get committed when I updated the package a while back. @ text @d6 1 d10 2 a11 2 --- unixos.c.orig 2003-07-21 16:54:05.000000000 -0400 +++ unixos.c 2009-02-15 14:56:48.000000000 -0500 d57 12 @ 1.7 log @Update to 1.6. pkgsrc changes: - Destdir support. - Include fixes for implicit function declarations probably broken on LP64. - Fix for 64-bit time_t world in netbsd-current. - Fix some pkglint. - Suppress warning about mktemp() on NetBSD; usage checked. Upstream changes: 1.6 -- Jul 21 2003 Use automake and a little bit of autoconf convert K&R declarations/definitions to ANSI Fixed buffer overflow in getParam and getDispositionFilename (debian patch) Fixed possible crash in ParseContent (debian patch) fix typo in getDispositionFilename (from Steve Friedl) use system strcasecmp and getopt where possible. use O_EXCL where available when creating files. @ text @d1 7 a7 1 $NetBSD: patch-ab,v 1.6 2005/12/19 00:13:39 joerg Exp $ @ 1.6 log @Fix errno. Use stdlib.h in one place as well. @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 3 --- unixos.c.orig 1995-02-16 21:39:50.000000000 +0000 +++ unixos.c @@@@ -23,6 +23,7 @@@@ d13 5 a17 1 @@@@ -36,10 +37,6 @@@@ d28 10 a37 1 @@@@ -89,7 +86,11 @@@@ char *id; d41 1 d45 1 a45 1 strcpy(buf, "/usr/tmp"); @ 1.6.30.1 log @Pullup ticket #2671 - requested by dholland mpack: security update Revisions pulled up: - converters/mpack/Makefile 1.19 - converters/mpack/PLIST 1.2 - converters/mpack/distinfo 1.8 - converters/mpack/patches/patch-aa delete - converters/mpack/patches/patch-ab 1.7 - converters/mpack/patches/patch-ae 1.2 - converters/mpack/patches/patch-af 1.2 --- Module Name: pkgsrc Committed By: dholland Date: Sun Feb 15 20:12:18 UTC 2009 Modified Files: pkgsrc/converters/mpack: Makefile PLIST distinfo pkgsrc/converters/mpack/patches: patch-ab patch-ae patch-af Removed Files: pkgsrc/converters/mpack/patches: patch-aa Log Message: Update to 1.6. pkgsrc changes: - Destdir support. - Include fixes for implicit function declarations probably broken on LP64. - Fix for 64-bit time_t world in netbsd-current. - Fix some pkglint. - Suppress warning about mktemp() on NetBSD; usage checked. Upstream changes: 1.6 -- Jul 21 2003 Use automake and a little bit of autoconf convert K&R declarations/definitions to ANSI Fixed buffer overflow in getParam and getDispositionFilename (debian patch) Fixed possible crash in ParseContent (debian patch) fix typo in getDispositionFilename (from Steve Friedl) use system strcasecmp and getopt where possible. use O_EXCL where available when creating files. @ text @d3 3 a5 3 --- unixos.c.orig 2003-07-21 16:54:05.000000000 -0400 +++ unixos.c 2009-02-15 14:56:48.000000000 -0500 @@@@ -23,9 +23,11 @@@@ d13 1 a13 5 +#include #include #include #include @@@@ -38,10 +40,6 @@@@ d24 1 a24 10 @@@@ -76,7 +74,7 @@@@ char *os_genid(void) } result = malloc(25+strlen(hostname)); - sprintf(result, "%d.%d@@%s", pid, curtime++, hostname); + sprintf(result, "%d.%lld@@%s", pid, (long long) curtime++, hostname); return result; } @@@@ -90,7 +88,11 @@@@ char *os_idtodir(char *id) a27 1 - strcpy(buf, "/usr/tmp"); d31 1 a31 1 + strcpy(buf, "/var/tmp"); @ 1.5 log @Make this compile under Solaris, too. Reviewed by wiz@@netbsd.org @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 2001/08/20 02:15:37 jlam Exp $ d3 1 a3 1 --- unixos.c.orig Thu Feb 16 16:39:50 1995 d5 20 a24 1 @@@@ -89,7 +90,11 @@@@ @ 1.4 log @Use separate patches are separate files, and mark as USE_BUILDLINK_ONLY. @ text @d1 1 a1 1 $NetBSD$ a4 8 @@@@ -29,6 +29,7 @@@@ #include #include #include +#include #include "xmalloc.h" #include "common.h" d9 2 a10 2 +#if defined(__FreeBSD__) || defined(__NetBSD__) + strcpy(buf, _PATH_VARTMP); @ 1.3 log @Add NetBSD RCS Ids. @ text @d3 2 a4 2 --- unixos.c.orig Thu Feb 16 22:39:50 1995 +++ unixos.c Thu Feb 26 00:59:01 1998 a24 38 *** unixpk.man.bak Fri Feb 17 00:39:50 1995 --- unixpk.man Mon Nov 11 10:19:46 1996 *************** *** 136,142 **** .SH ENVIRONMENT .TP .B TMPDIR ! Directory to store temporary files. Default is /usr/tmp. .TP .B SPLITSIZE Default value of the -m switch. --- 136,142 ---- .SH ENVIRONMENT .TP .B TMPDIR ! Directory to store temporary files. Default is /var/tmp. .TP .B SPLITSIZE Default value of the -m switch. *** unixunpk.man.bak Fri Feb 17 00:39:50 1995 --- unixunpk.man Mon Nov 11 10:19:59 1996 *************** *** 107,113 **** .SH ENVIRONMENT .TP .B TMPDIR ! Directory to store temporary files. Default is /usr/tmp. .SH FILES .TP .B $TMPDIR/m-prts-$USER/ --- 107,113 ---- .SH ENVIRONMENT .TP .B TMPDIR ! Directory to store temporary files. Default is /var/tmp. .SH FILES .TP .B $TMPDIR/m-prts-$USER/ @ 1.2 log @Adapt this package for NetBSD. @ text @d1 2 @ 1.1 log @Initial revision @ text @d1 22 a22 16 *** unixos.c.bak Fri Feb 17 00:39:50 1995 --- unixos.c Mon Nov 11 10:19:28 1996 *************** *** 89,95 **** --- 89,99 ---- strcpy(buf, getenv("TMPDIR")); } else { + #ifdef __FreeBSD__ + strcpy(buf, "/var/tmp"); + #else strcpy(buf, "/usr/tmp"); + #endif } strcat(buf, "/m-prts-"); p = getenv("USER"); @ 1.1.1.1 log @Initial import of FreeBSD's "mpack" port. @ text @@