From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 03:46:32 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF35F16A4CE for ; Thu, 30 Oct 2003 03:46:32 -0800 (PST) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1134843FCB for ; Thu, 30 Oct 2003 03:46:30 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfim6.dialup.mindspring.com ([165.247.202.198] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1AFBFp-0006Jg-00; Thu, 30 Oct 2003 03:46:17 -0800 Message-ID: <3FA0F9D4.1AA51E73@mindspring.com> Date: Thu, 30 Oct 2003 03:45:24 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Christopher Vance References: <3F9CF3F6.8307.ABC1250@localhost> <20031030003153.GC16553@aurema.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4d693b2ddcc2cca1b0dfcb9ca420d12e9a7ce0e8f8d31aa3f350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Dan Langille Subject: Re: non-root process and PID files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2003 11:46:32 -0000 Christopher Vance wrote: > You can already mark a fd 'close on exec'. > > May I suggest a different feature: the ability to mark an open file > (not just its fd) 'remove on close', with permission checked at mark > time rather than close time (this status forgotten if not permitted > when set) and the unlink actually done at close time only if the file > has exactly one link and one open file instance at that time. If all you have is an fd, you can not get from an fd to a path without an exhaustive search of the disk, in most FS's. Also, leaving the path peresent permits someone to hard-link it to some other file, to make it stay around. Since /var has a /var/tmp, this would be a real danger, I think. -- Terry