From owner-freebsd-ports Fri May 9 20:10:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA13534 for ports-outgoing; Fri, 9 May 1997 20:10:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA13524; Fri, 9 May 1997 20:10:01 -0700 (PDT) Resent-Date: Fri, 9 May 1997 20:10:01 -0700 (PDT) Resent-Message-Id: <199705100310.UAA13524@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-ports Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, gjm11@dpmms.cam.ac.uk Received: from mauve.csi.cam.ac.uk (exim@mauve.csi.cam.ac.uk [131.111.8.38]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id UAA13402 for ; Fri, 9 May 1997 20:05:17 -0700 (PDT) Received: from g.pet.cam.ac.uk [131.111.209.233] by mauve.csi.cam.ac.uk with smtp (Exim 1.62 #1) id 0wQ2TC-0004Zb-00; Sat, 10 May 1997 04:05:14 +0100 Received: from gjm11 by g.pet.cam.ac.uk with local (Exim 1.59 #1) id 0wQ2TB-0001rj-00; Sat, 10 May 1997 04:05:13 +0100 Message-Id: Date: Sat, 10 May 1997 04:05:13 +0100 From: gjm11@dpmms.cam.ac.uk Reply-To: gjm11@dpmms.cam.ac.uk To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/3572: virtualpaper-1.4 port attempts to call mknod() Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 3572 >Category: ports >Synopsis: virtualpaper-1.4 port attempts to call mknod() >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 9 20:10:00 PDT 1997 >Last-Modified: >Originator: Gareth McCaughan >Organization: all too little >Release: FreeBSD 2.2-RELEASE i386 >Environment: Bog-standard FreeBSD 2.2 system >Description: The virtualpaper-1.4 port contains the following, in buildlectern/src/POSIX/OSUtilsPosix.m3 : IF Unix.mknod(M3toC.TtoS(p), Mode, 0) < 0 THEN OSErrorPosix.Raise(); END; Unfortunately, only root is supposed to call mknod(), so this is not a good idea. Calling mkfifo() instead (this is in a procedure called CreateFifo) seems to work. >How-To-Repeat: Install virtualpaper-1.4 and type "BuildLectern foo.ps zog.lect". >Fix: Declare an <*EXTERNAL*> procedure called mkfifo with the right type, and call that instead. The following lines of code do this, but I know just enough Modula-3 to be certain that they don't belong in the place where, in search of a quick fix, I put them. :-) in an interface file somewhere, insert: FROM Ctypes IMPORT char_star, int; FROM Utypes IMPORT mode_t; <*EXTERNAL*> PROCEDURE mkfifo(p: char_star; m: mode_t): int; in OSUtilsPosix.m3: replace the definition of CreateFifo with: PROCEDURE CreateFifo(p: TEXT) RAISES {OSError.E} = CONST Mode = Unix.MROWNER + Unix.MWOWNER; BEGIN <* ASSERT pFifo=NIL *> IF mkfifo(M3toC.TtoS(p), Mode) < 0 THEN OSErrorPosix.Raise(); END; pFifo := p; END CreateFifo; >Audit-Trail: >Unformatted: