[lkml]   [2001]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectquestion: permission checking for network filesystem

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,

Thanks in advance.


- Jan Hudec `Bulb' <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:53    [W:0.071 / U:1.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site