Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 1999 15:30:23 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        freebsd-hackers@freebsd.org
Subject:   Procfs' pointers to files.
Message-ID:   <199910291530.aa28972@salmon.maths.tcd.ie>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <199910291530.aa28972>