From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 1 22:30:17 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD92216A420 for ; Wed, 1 Mar 2006 22:30:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 214E243D55 for ; Wed, 1 Mar 2006 22:30:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k21MUDvm092601 for ; Wed, 1 Mar 2006 22:30:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k21MUDaN092600; Wed, 1 Mar 2006 22:30:13 GMT (envelope-from gnats) Date: Wed, 1 Mar 2006 22:30:13 GMT Message-Id: <200603012230.k21MUDaN092600@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Paul Schmehl Cc: Subject: Re: ports/93967: converters/mpack, correct hardcoded path problem in source code X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2006 22:30:17 -0000 The following reply was made to PR ports/93967; it has been noted by GNATS. From: Paul Schmehl To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/93967: converters/mpack, correct hardcoded path problem in source code Date: Wed, 01 Mar 2006 16:21:18 -0600 Please make the following changes. This will correct all the incorrect TMPDIR statements *and* fix a problem with the "sendmail" function of mpack. Delete the Makefile patch that I sent earlier. Delete the following files from ${FILESDIR}. They are no longer needed: patch-ab, patch-unixpk_c and patch-unixunpk_c Apply the patches that I sent originally except for the following two: patch-unixpk.c and patch-unixos.c. Replace both of those patches with the news ones included in this email. Add the following patch: patch-unixunpk.man Retain the following patch that I said was fixed by the Makefile patch that I sent: patch-unixpk.man Here's the two, new, patchfiles that replace the ones that I sent previously. --- unixos.c.orig Wed Mar 1 13:51:03 2006 +++ unixos.c Wed Mar 1 13:51:35 2006 @@ -90,7 +90,7 @@ strcpy(buf, getenv("TMPDIR")); } else { - strcpy(buf, "/usr/tmp"); + strcpy(buf, "/tmp"); } strcat(buf, "/m-prts-"); p = getenv("USER"); @@ -136,11 +136,7 @@ int fd; FILE *ret; -#ifdef O_EXCL - fd=open(fname, O_RDWR|O_CREAT|O_EXCL, 0644); -#else fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0644); -#endif if (fd == -1) return NULL; --- unixpk.c.orig Wed Mar 1 09:28:13 2006 +++ unixpk.c Wed Mar 1 09:31:09 2006 @@ -164,10 +164,10 @@ strcpy(fnamebuf, getenv("TMPDIR")); } else { - strcpy(fnamebuf, "/usr/tmp"); + strcpy(fnamebuf, "/tmp"); } strcat(fnamebuf, "/mpackXXXXXX"); - mktemp(fnamebuf); + close(mkstemp(fnamebuf)); outfname = strsave(fnamebuf); } Paul Schmehl (pauls@utdallas.edu) Adjunct Information Security Officer University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu/ir/security/