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>
10 #ifndef LINUX_NFSD_AUTH_H
11 #define LINUX_NFSD_AUTH_H
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
24 void nfsd_setuser(struct svc_rqst
*, struct svc_export
*);
28 * These must match the actual size of uid_t and gid_t
30 #define UGID_BITS (8 * sizeof(uid_t))
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
];
44 #endif /* __KERNEL__ */
45 #endif /* LINUX_NFSD_AUTH_H */