lkml.org 
[lkml]   [1999]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.3.30 linuxNFS import is broken (Screwed up NFS/RPC credentials)


On Tue, 21 Dec 1999, Trond Myklebust wrote:

> Let me explain: The problem is that NFS relies on the user sending the
> RPC authentication each and every time we access data on the
> server. In order not to get a permissions error suddenly if the user
> changes euid while s/he is reading/writing to the open file, we
> therefore want to use the same RPC authentication info throughout the
> file's lifetime. Ideally that means taking the RPC auth info that was
> valid when opening the file (since this is more or less in line with a
> POSIX filesystem's behaviour with permission checking at file open
> only) and caching it somewhere.
>
> The most practical way of implementing this policy is therefore to
> hide the RPC auth in the file descriptor structure (I use the private
> data field), and pass that info via the file pointer to
> readpage/writepage/whatever else needs it.

Urgh. Extremely ugly, IMO.

> This fix has not yet been merged in to the stock kernel, ('cos Linus
> wanted the patch cleaned up before accepting it) so I can't really
> blame other people for having messed up. Nevertheless in order to
> avoid the clumsines of some unwieldy extra (void* opaque)-like
> arguments to the readpage/writepage functions, I'd really appreciate
> if we could revert to passing the filp instead of the dentry to
> readpage/writepage.

Oh, please. We can turn the first argument into opaque thing - normal
filesystems shouldn't (and will not) give a toss for it anyway (yes,
patches are also pending, more or less for the same reason).

However, the idea of holding that in file is _very_ messy - just as
holding fhandle in dentry.

Trond, could you look at the (preliminary, but looks like it works) patch
on ftp.math.psu.edu/pub/viro/as-patch-26b.gz? It should give an idea of
what I'm trying to do. IMO fhandle of regular file should be available in
struct address_space (you'll need a new field in the union there). Ditto
for the creds needed to access the thing. I can agree with
->commit_write() having an opaque parameter, though - we'll need it when
we will go for soft-updates anyway. But using struct file for that?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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