From owner-freebsd-standards@FreeBSD.ORG Fri Sep 23 08:02:51 2005 Return-Path: X-Original-To: freebsd-standards@FreeBSD.org Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96CDA16A41F; Fri, 23 Sep 2005 08:02:51 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AB3643D45; Fri, 23 Sep 2005 08:02:51 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 5081B46B4D; Fri, 23 Sep 2005 04:02:50 -0400 (EDT) Date: Fri, 23 Sep 2005 09:02:50 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Craig Rodrigues In-Reply-To: <200509230436.j8N4aj1C018943@freefall.freebsd.org> Message-ID: <20050923085442.J34322@fledge.watson.org> References: <200509230436.j8N4aj1C018943@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-standards@FreeBSD.org Subject: Re: standards/86484: [PATCH] mkfifo(1) uses wrong permissions X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2005 08:02:51 -0000 On Fri, 23 Sep 2005, Craig Rodrigues wrote: > Synopsis: [PATCH] mkfifo(1) uses wrong permissions > > Responsible-Changed-From-To: freebsd-standards->rwatson > Responsible-Changed-By: rodrigc > Responsible-Changed-When: Fri Sep 23 04:35:12 GMT 2005 > Responsible-Changed-Why: > Robert has been working a lot with FIFO's lately.... > > http://www.freebsd.org/cgi/query-pr.cgi?pr=86484 Our man page documents mkfifo(1) as interacting with umasks in two ways: (1) if -m is not used, then the requested mode is 0666 as influenced by the umask, and (2) if -m is used, the umask is ignored. In my basic testing here, it appeared to operate correctly on FreeBSD 7.x-CURRENT: peppercorn:/tmp/tmp> umask 22 peppercorn:/tmp/tmp> foreach mode (0600 0660 0666 0400 0440 0444 0200 0220 0222) foreach? mkfifo -m $mode $mode foreach? end peppercorn:/tmp/tmp> mkfifo nomode peppercorn:/tmp/tmp> ls -l total 12 drwxr-xr-x 2 robert wheel 512 Sep 23 08:59 ./ drwxrwxrwt 16 root wheel 10240 Sep 23 08:49 ../ p-w------- 1 robert wheel 0 Sep 23 08:59 0200| p-w--w---- 1 robert wheel 0 Sep 23 08:59 0220| p-w--w--w- 1 robert wheel 0 Sep 23 08:59 0222| pr-------- 1 robert wheel 0 Sep 23 08:59 0400| pr--r----- 1 robert wheel 0 Sep 23 08:59 0440| pr--r--r-- 1 robert wheel 0 Sep 23 08:59 0444| prw------- 1 robert wheel 0 Sep 23 08:59 0600| prw-rw---- 1 robert wheel 0 Sep 23 08:59 0660| prw-rw-rw- 1 robert wheel 0 Sep 23 08:59 0666| prw-r--r-- 1 robert wheel 0 Sep 23 08:59 nomode| So on face value, the behavior of the application matches the specification in mkfifo(1). The real question is whether mkfifo(1) matches some other important specification, like POSIX. Since I don't have POSIX.2 on hand, I can't comment on that. Robert N M Watson