From 3fc605a2aa38899c12180ca311f1eeb61a6d867e Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 14 Feb 2007 00:33:13 -0800 Subject: [PATCH] knfsd: allow the server to provide a gid list when using AUTH_UNIX authentication AUTH_UNIX authentication (the standard with NFS) has a limit of 16 groups ids. This causes problems for people in more than 16 groups. So allow the server to map a uid into a list of group ids based on local knowledge rather depending on the (possibly truncated) list from the client. If there is no process on the server responding to upcalls, the gidlist in the request will still be used. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- net/sunrpc/sunrpc_syms.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/sunrpc/sunrpc_syms.c') diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index d85fddeb6388..d3865265fc18 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c @@ -137,7 +137,7 @@ EXPORT_SYMBOL(nlm_debug); extern int register_rpc_pipefs(void); extern void unregister_rpc_pipefs(void); -extern struct cache_detail ip_map_cache; +extern struct cache_detail ip_map_cache, unix_gid_cache; extern int init_socket_xprt(void); extern void cleanup_socket_xprt(void); @@ -157,6 +157,7 @@ init_sunrpc(void) rpc_proc_init(); #endif cache_register(&ip_map_cache); + cache_register(&unix_gid_cache); init_socket_xprt(); out: return err; @@ -170,6 +171,8 @@ cleanup_sunrpc(void) rpc_destroy_mempool(); if (cache_unregister(&ip_map_cache)) printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n"); + if (cache_unregister(&unix_gid_cache)) + printk(KERN_ERR "sunrpc: failed to unregister unix_gid cache\n"); #ifdef RPC_DEBUG rpc_unregister_sysctl(); #endif -- cgit