From owner-freebsd-hackers Fri Oct 29 7:30:36 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 5C78514FAD for ; Fri, 29 Oct 1999 07:30:26 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 29 Oct 1999 15:30:23 +0100 (BST) To: freebsd-hackers@freebsd.org Subject: Procfs' pointers to files. X-Request-Do: Date: Fri, 29 Oct 1999 15:30:23 +0100 From: David Malone Message-ID: <199910291530.aa28972@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm sure this has been discussed before, but I couldn't find anything doing a quick search of the lists. I've thought about trying to add a /proc/nnn/fd to allow access to a running processes file discriptors from other processes. The fdescfs only supports access to a processes own file discriptors. One complication is who to give to allow to open the file discriptors. A safe answer would seem to be only allow root to access them, as you don't want to allow unprivilegde programs to be able to steal file discriptors (say from other programs which have inhereted a file dircriptor from some privilaged program). However, procfs currently allows people to do this with an executables file. You can make hard links to and run /proc/nnn/file as it is essentially another hard link to the executable file. This could be a problem if you have suid executables protected by nonexecutable directories, as people can steal copies of the file while it is running. Is this a real problem, or is it a "well don't protect suid executables that way" problem? The permissions used in Linux's /proc seem to be more conservative and seem to prevent this. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message