From seth@aberrant.myip.org  Sun Jan 23 11:33:47 2000
Return-Path: <seth@aberrant.myip.org>
Received: from aberrant.myip.org (adsl-aberrant.ny.inch.com [216.223.213.3])
	by hub.freebsd.org (Postfix) with ESMTP id 5065F14BCC
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Jan 2000 11:33:46 -0800 (PST)
	(envelope-from seth@aberrant.myip.org)
Received: (from seth@localhost)
	by aberrant.myip.org (8.9.3/8.9.3) id OAA03617;
	Sun, 23 Jan 2000 14:33:45 -0500 (EST)
	(envelope-from seth)
Message-Id: <200001231933.OAA03617@aberrant.myip.org>
Date: Sun, 23 Jan 2000 14:33:45 -0500 (EST)
From: Seth <seth@aberrant.myip.org>
Reply-To: seth@aberrant.myip.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: Enhancement: allow .fakeid to be a named pipe
X-Send-Pr-Version: 3.2

>Number:         16316
>Category:       bin
>Synopsis:       Enhancement: allow .fakeid to be a named pipe
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 23 11:40:01 PST 2000
>Closed-Date:    Sat Sep 17 19:53:50 GMT 2005
>Last-Modified:  Sat Sep 17 19:53:50 GMT 2005
>Originator:     Seth
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
>Environment:

3.4-STABLE as of 1/19/2000.

>Description:

	builtins.c checks to see whether .fakeid is a regular file and
won't touch it if it's not.  It would be great to use a named pipe here
so that random words could be inserted via the following (demo) script:


#!/bin/sh

fakeid=/home/user/.fakeid

rm -f $fakeid
mkfifo $fakeid
while [ 1 ]; do
  /usr/games/random 50000 < /usr/share/dict/words | head -1 > $fakeid
done

>How-To-Repeat:

  Try making .fakeid a named pipe... doesn't work.

>Fix:
	
  is the S_ISREG test absolutely necessary?  Can we add a check for pipes
  and allow them?  Would this introduce security risks?


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Wed Jan 23 01:48:23 PST 2002 
Responsible-Changed-Why:  
Inetd is my problem. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=16316 
State-Changed-From-To: open->closed 
State-Changed-By: rwatson 
State-Changed-When: Sat Sep 17 19:51:48 GMT 2005 
State-Changed-Why:  

The S_ISREG check was actually specifically added to avoid allowing fifos 
to be hooked up to the back end of .fakeid.  Specifically, so that if the 
user program at the other end of the fifo wedged or exited, it would not 
block the inetd session.  In theory you could use O_NOBLOCK and 
non-blocking I/O, but this also comes with its risks. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=16316 
>Unformatted:
