From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Apr 2 03:30:13 2003 Return-Path: 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 E8ECE37B401 for ; Wed, 2 Apr 2003 03:30:13 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E654943FCB for ; Wed, 2 Apr 2003 03:30:12 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h32BUCUp044071 for ; Wed, 2 Apr 2003 03:30:12 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h32BUCMB044070; Wed, 2 Apr 2003 03:30:12 -0800 (PST) Resent-Date: Wed, 2 Apr 2003 03:30:12 -0800 (PST) Resent-Message-Id: <200304021130.h32BUCMB044070@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Semenyaka Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96FA037B401 for ; Wed, 2 Apr 2003 03:22:03 -0800 (PST) Received: from snark.ratmir.ru (snark.ratmir.ru [213.24.248.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC4FA43FB1 for ; Wed, 2 Apr 2003 03:22:01 -0800 (PST) (envelope-from root@snark.ratmir.ru) Received: from snark.ratmir.ru (smmsp@localhost [127.0.0.1]) by snark.ratmir.ru (8.12.9/8.12.9) with ESMTP id h32BLwDR086235 for ; Wed, 2 Apr 2003 15:21:58 +0400 (MSD) (envelope-from root@snark.ratmir.ru) Received: (from root@localhost) by snark.ratmir.ru (8.12.9/8.12.9/Submit) id h32BLuRd086234; Wed, 2 Apr 2003 15:21:56 +0400 (MSD) Message-Id: <200304021121.h32BLuRd086234@snark.ratmir.ru> Date: Wed, 2 Apr 2003 15:21:56 +0400 (MSD) From: Alex Semenyaka To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/50540: Port print/muttprint ver 0.64 works incorrectly in multiuser environment X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Alex Semenyaka List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2003 11:30:14 -0000 >Number: 50540 >Category: ports >Synopsis: Port print/muttprint ver 0.64 works incorrectly in multiuser environment >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 02 03:30:12 PST 2003 >Closed-Date: >Last-Modified: >Originator: Alex Semenyaka >Release: FreeBSD 4.8-RC i386 >Organization: Ratmir >Environment: System: FreeBSD snark.ratmir.ru 4.8-RC FreeBSD 4.8-RC #7: Sun Mar 30 07:23:48 MSD 2003 root@snark.ratmir.ru:/usr/obj/usr/src/sys/SNARK i386 >Description: Muttprint creates a temporary file with the fixed hard-coded name ``/tmp/muttprint-geometry-ver''. This name as can see does not depends on the environment muttprint was run (i.e. user id, configuration options and so on). The main problems that the file is the same for all users. If the port is used by a user with umask 077, for example, than this will be the only user (except with root) who will be able to use this port. >How-To-Repeat: 1) install muttprint 2) log in as the user A 3) set up umask 077 4) print anything with muttprint 5) log in as the user B 6) try to print anything with muttprint >Fix: Just form the name of the temporary file on the base of user ID. Since muttprint is the Perl script the fix is extremely simple: --- /usr/local/bin/muttprint Wed Apr 2 15:09:38 2003 +++ muttprint Wed Apr 2 15:06:22 2003 @@ -1534,3 +1534,3 @@ sub GetGeometryVersion { - my $tempfile = "/tmp/muttprint-geometry-ver.$<"; + my $tempfile = "/tmp/muttprint-geometry-ver"; my $geometryVersion; >Release-Note: >Audit-Trail: >Unformatted: