Import 2.3.7pre7
[davej-history.git] / include / linux / nfsd / auth.h
blobec2c9d7bfb26672d23cef9520ee39364d37a56d6
1 /*
2 * include/linux/nfsd/auth.h
4 * nfsd-specific authentication stuff.
5 * uid/gid mapping not yet implemented.
7 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
8 */
10 #ifndef LINUX_NFSD_AUTH_H
11 #define LINUX_NFSD_AUTH_H
13 #ifdef __KERNEL__
15 #define nfsd_luid(rq, uid) ((u32)(uid))
16 #define nfsd_lgid(rq, gid) ((u32)(gid))
17 #define nfsd_ruid(rq, uid) ((u32)(uid))
18 #define nfsd_rgid(rq, gid) ((u32)(gid))
21 * Set the current process's fsuid/fsgid etc to those of the NFS
22 * client user
24 void nfsd_setuser(struct svc_rqst *, struct svc_export *);
26 #if 0
28 * These must match the actual size of uid_t and gid_t
30 #define UGID_BITS (8 * sizeof(uid_t))
31 #define UGID_SHIFT 8
32 #define UGID_MASK ((1 << UGID_SHIFT) - 1)
33 #define UGID_NRENTRIES ((1 << (UGID_BITS - UGID_SHIFT)) + 1)
34 #define UGID_NONE ((unsigned short)-1)
36 typedef struct svc_uidmap {
37 uid_t * um_ruid[UGID_NRENTRIES];
38 uid_t * um_luid[UGID_NRENTRIES];
39 gid_t * um_rgid[UGID_NRENTRIES];
40 gid_t * um_lgid[UGID_NRENTRIES];
41 } svc_uidmap;
42 #endif
44 #endif /* __KERNEL__ */
45 #endif /* LINUX_NFSD_AUTH_H */