public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* question: permission checking for network filesystem
@ 2001-05-20 15:29 Jan Hudec
  2001-05-20 22:49 ` Mikulas Patocka
       [not found] ` <200105220602.f4M62N364271@saturn.cs.uml.edu>
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Hudec @ 2001-05-20 15:29 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm trying to impelemnt a lightweight network filesystem and ran into
trouble implementing lookup, permissions and open.

The protocol requires me to specify open mode in it's open command. The
open mode has 4 bits: read, write, append and execute. But I can't tell
execution from read in file_operations->open. I could send the open command
from the inode_operations->permission, but this does not solve the problem,
as I can't find weather to count the new file descriptor as reader or
executer (I have to know that when closing the file).

The server always checks permission on the actual request, so I can't open
the file for reading, when it should be open for execution.

Could anyone see a solution other than adding a flags to open mode (say
O_EXEC and O_EXEC_LIB), that would be added to the dentry_open in open_exec
and sys_uselib? I don't like the idea of pathing vfs for this.

If it has to be patched, what kind of patch has a chance to get into 2.4
series kernel?

There is another thing with lookup. The protocol allows looking up and
opening a file in one command. Unfortunately there are some file-type
checks between i_ops->lookup and f_ops->open that force me to wait on the
lookup to finish before I can open. I think these checks could be done by
simply having the f_ops->open set correctly (thinks like not opening
directory for write). But I do not expect these to change before 2.5,
right?

Thanks in advance.

Bulb

--------------------------------------------------------------------------------
                  				- Jan Hudec `Bulb' <bulb@ucw.cz>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-05-24 12:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-20 15:29 question: permission checking for network filesystem Jan Hudec
2001-05-20 22:49 ` Mikulas Patocka
2001-05-21  3:04   ` David Wagner
2001-05-21 13:32   ` Jan Hudec
2001-05-21 22:26     ` Mikulas Patocka
2001-05-22  8:10       ` Jan Hudec
     [not found] ` <200105220602.f4M62N364271@saturn.cs.uml.edu>
2001-05-24 12:52   ` Jan Hudec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox