aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_unix.c
Commit message (Collapse)AuthorAgeFilesLines
* SUNRPC: Use GFP_NOFS when allocating credentialsTrond Myklebust2008-07-091-1/+1
| | | | | | | Since the credentials may be allocated during the call to rpc_new_task(), which again may be called by a memory allocator... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()Trond Myklebust2008-04-191-2/+0
| | | | | | | | | With the recent change to generic creds, we can no longer use cred->cr_ops->cr_name to distinguish between RPCSEC_GSS principals and AUTH_SYS/AUTH_NULL identities. Replace it with the rpc_authops->au_name instead... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Add an rpc_credop callback for binding a credential to an rpc_taskTrond Myklebust2008-03-141-0/+1
| | | | | | | We need the ability to treat 'generic' creds specially, since they want to bind instances of the auth cred instead of binding themselves. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Fix RPCAUTH_LOOKUP_ROOTCREDSTrond Myklebust2008-03-141-32/+24
| | | | | | | | The current RPCAUTH_LOOKUP_ROOTCREDS flag only works for AUTH_SYS authentication, and then only as a special case in the code. This patch removes the auth_sys special casing, and replaces it with generic code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Remove the tk_auth macro...Trond Myklebust2007-07-101-1/+1
| | | | | | | | We should almost always be deferencing the rpc_auth struct by means of the credential's cr_auth field instead of the rpc_clnt->cl_auth anyway. Fix up that historical mistake, and remove the macro that propagated it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Convert the credential garbage collector into a shrinker callbackTrond Myklebust2007-07-101-5/+1
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Give credential cache a local spinlockTrond Myklebust2007-07-101-0/+5
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Convert the credcache lookup code to use RCUTrond Myklebust2007-07-101-3/+15
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Enforce atomic updates of rpc_cred->cr_flagsTrond Myklebust2007-07-101-2/+2
| | | | | | Convert to the use of atomic bitops... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: replace casts in auth_unix.c with container_of()Trond Myklebust2007-07-101-4/+6
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Clean up rpc credential initialisationTrond Myklebust2007-07-101-8/+2
| | | | | | Add a helper rpc_cred_init() Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Mark auth and cred operation tables as constant.Trond Myklebust2007-07-101-3/+3
| | | | | | Also do the same for gss_api operation tables. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Fix a typo in unx_create()Trond Myklebust2007-07-101-1/+1
| | | | | | | We want to set the unix_cred_cache.nextgc on the first call to unx_create(), which should be when unix_auth.au_count === 1 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Fix a memory leak in the auth credcache codeTrond Myklebust2007-07-101-1/+1
| | | | | | | | | | | | | | The leak only affects the RPCSEC_GSS caches, since they are the only ones that are dynamically allocated... Rename the existing rpcauth_free_credcache() to rpcauth_clear_credcache() in order to better describe its role, then add a new function rpcauth_destroy_credcache() that actually frees the cache in addition to clearing it out. Also move the call to destroy the credcache in gss_destroy() to come before the rpc upcall pipe is unlinked. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Add a backpointer from the struct rpc_cred to the rpc_authTrond Myklebust2007-07-101-0/+1
| | | | | | | | Cleans up an issue whereby rpcsec_gss uses the rpc_clnt->cl_auth. If we want to be able to add several rpc_auths to a single rpc_clnt, then this abuse must go. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: fix print format for tk_pidChuck Lever2007-02-031-4/+5
| | | | | | | | | | The tk_pid field is an unsigned short. The proper print format specifier for that type is %5u, not %4d. Also clean up some miscellaneous print formatting nits. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [SUNRPC]: trivial endianness annotationsAlexey Dobriyan2006-09-281-5/+5
| | | | | | | | | | pure s/u32/__be32/ [AV: large part based on Alexey's patches] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* NFS: Display the chosen RPCSEC_GSS security flavour in /proc/mountsTrond Myklebust2006-06-091-0/+1
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Fix a lock recursion in the auth_gss downcallTrond Myklebust2006-02-011-3/+3
| | | | | | | | | | | | When we look up a new cred in the auth_gss downcall so that we can stuff the credcache, we do not want that lookup to queue up an upcall in order to initialise it. To do an upcall here not only redundant, but since we are already holding the inode->i_mutex, it will trigger a lock recursion. This patch allows rpcauth cache searches to indicate that they can cope with uninitialised credentials. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [NET]: Remove more unneeded typecasts on *malloc()Kris Katterjohn2006-01-111-1/+1
| | | | | | | | | This removes more unneeded casts on the return value for kmalloc(), sock_kmalloc(), and vmalloc(). Signed-off-by: Kris Katterjohn <kjak@users.sourceforge.net> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] RPC: Eliminate socket.h includes in RPC clientChuck Lever2005-09-231-2/+0
| | | | | | | | | | | | | Clean-up: get rid of unnecessary socket.h and in.h includes in the generic parts of the RPC client. Test-plan: Compile kernel with CONFIG_NFS enabled. Version: Thu, 11 Aug 2005 16:06:23 -0400 Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* Linux-2.6.12-rc2Linus Torvalds2005-04-161-0/+242
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!