Re: [PATCH] add file position info to proc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >>>> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux