Date: Wed, 2 Apr 2003 15:21:56 +0400 (MSD) From: Alex Semenyaka <alexs@snark.ratmir.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/50540: Port print/muttprint ver 0.64 works incorrectly in multiuser environment Message-ID: <200304021121.h32BLuRd086234@snark.ratmir.ru> Resent-Message-ID: <200304021130.h32BUCMB044070@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304021121.h32BLuRd086234>