Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfsd: Remove nfsd_luid, nfsd_lgid, nfsd_ruid and nfsd_rgid

These trivial macros that don't currently do anything are the last
vestiages of an old attempt at uid mapping that was removed from the
kernel in September of 2002. Remove them to make it clear what the
code is currently doing.

Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

+4 -10
-6
fs/nfsd/auth.h
··· 1 1 /* 2 2 * nfsd-specific authentication stuff. 3 - * uid/gid mapping not yet implemented. 4 3 * 5 4 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> 6 5 */ 7 6 8 7 #ifndef LINUX_NFSD_AUTH_H 9 8 #define LINUX_NFSD_AUTH_H 10 - 11 - #define nfsd_luid(rq, uid) ((u32)(uid)) 12 - #define nfsd_lgid(rq, gid) ((u32)(gid)) 13 - #define nfsd_ruid(rq, uid) ((u32)(uid)) 14 - #define nfsd_rgid(rq, gid) ((u32)(gid)) 15 9 16 10 /* 17 11 * Set the current process's fsuid/fsgid etc to those of the NFS
+2 -2
fs/nfsd/nfs3xdr.c
··· 167 167 *p++ = htonl(nfs3_ftypes[(stat->mode & S_IFMT) >> 12]); 168 168 *p++ = htonl((u32) stat->mode); 169 169 *p++ = htonl((u32) stat->nlink); 170 - *p++ = htonl((u32) nfsd_ruid(rqstp, stat->uid)); 171 - *p++ = htonl((u32) nfsd_rgid(rqstp, stat->gid)); 170 + *p++ = htonl((u32) stat->uid); 171 + *p++ = htonl((u32) stat->gid); 172 172 if (S_ISLNK(stat->mode) && stat->size > NFS3_MAXPATHLEN) { 173 173 p = xdr_encode_hyper(p, (u64) NFS3_MAXPATHLEN); 174 174 } else {
+2 -2
fs/nfsd/nfsxdr.c
··· 151 151 *p++ = htonl(nfs_ftypes[type >> 12]); 152 152 *p++ = htonl((u32) stat->mode); 153 153 *p++ = htonl((u32) stat->nlink); 154 - *p++ = htonl((u32) nfsd_ruid(rqstp, stat->uid)); 155 - *p++ = htonl((u32) nfsd_rgid(rqstp, stat->gid)); 154 + *p++ = htonl((u32) stat->uid); 155 + *p++ = htonl((u32) stat->gid); 156 156 157 157 if (S_ISLNK(type) && stat->size > NFS_MAXPATHLEN) { 158 158 *p++ = htonl(NFS_MAXPATHLEN);