> >>>> I think this information would be a little easier to access if there
> >>>> would be a single file per pid or thread containing something like:
> >>>> 
> >>>> handle   flags   pos     path
> >>>> 0        0100002 1234    /dev/pts/1
> >>>> 1        0100004 5678    /tmp/output
> >>>> etc.
> >>> 
> >>> That would not be a good idea, as not all users have the same permissions
> >>> for viewing this information.
> 
> Since /proc/$$/fd is S_IRWXU, only the user owning the process (plus
> usually root) can view it. So making the single file you propose S_IRWXU
> too should solve any security issue, should not it?
> 
> >I think the problem is not with permissions, but with scaling to large
> >numbers of file descriptors.
> 
> Would not that be dealt accordingly with seq_file?

Yes, most likely it wouldn't be so bad either. But it _would_ be:

 a) more complex, this implementation reuses most of the  the /proc/fd code
 b) less efficient for querying a single fd

So I prefer the current solution, but not very strongly.

Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to