AUTH_DES RPC auth. flavor and some problems

GOMBAS Gabor (gombasg@inf.elte.hu)
Fri, 22 Oct 1999 18:13:27 +0200 (MET DST)


Hello,

I'm developing a kernel module which implements the AUTH_DES RPC
authentication flavor. My current work can be found at
http://valerie.inf.elte.hu/~gombasg/sec_rpc.

I'm using kernel 2.2.13 with Trond Myklebust's NFS3 patches (version 0.14.6).

I have a few problems:

1. NFS3 mounts with AUTH_DES authentication work fine. There looks like to
be some caching errors with NFS2 however: suppose user A has properly
keylogged in, and user B is not. If I issue an NFS readdir operation
(such like 'ls /mnt', where /mnt is the mount point of the NFS filesystem)
as user A, and sortly after exactly the same operation as user B, the
operation eventually succeeds. Turning on debugging shows that in the
second case, the DES credential for user B is created (i.e. the crcreate()
function of struct rpc_authops is called), but it is never sent to the NFS
server for validation. If I try a different NFS operation as user B, I
get a 'Permission denied' message as expected.

2. On an SMP kernel, the credential creation function (member crcreate() of
struct rpc_authops) gets called with current->(uid|euid|suid|fsuid) all
equal to 0, which makes it impossible to identify the user for whom the
credential is to be created for. It does not happen on a non-SMP kernel
(both kernels are compiled from the same source tree but are running on
different machines).

I'm not an experienced kernel hacker so it's quite possible that I overlooked
or misunderstood something in the second case and that's why I'm experiencing
this behaviour. I would also appreciate if someone with better knowledge of
the kernel internals would look into my code and tell me what am I doing
wrong.

Gabor

PS. I'm not on the main list, please CC: the answers to me directly

PS2. Are there any plans to add AUTH_DES support to knfsd?

---
Gabor Gombas                                       Eotvos Lorand University
E-mail: gombasg@inf.elte.hu                        Hungary

- 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/