patch-2.4.9 linux/net/sunrpc/auth_unix.c
Next file: linux/net/sunrpc/sunrpc_syms.c
Previous file: linux/net/sunrpc/auth_null.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Thu Aug 16 09:39:37 2001
- Orig file:
v2.4.8/linux/net/sunrpc/auth_unix.c
- Orig date:
Fri Feb 9 11:29:44 2001
diff -u --recursive --new-file v2.4.8/linux/net/sunrpc/auth_unix.c linux/net/sunrpc/auth_unix.c
@@ -33,6 +33,8 @@
# define RPCDBG_FACILITY RPCDBG_AUTH
#endif
+static struct rpc_credops unix_credops;
+
static struct rpc_auth *
unx_create(struct rpc_clnt *clnt)
{
@@ -71,7 +73,7 @@
if (!(cred = (struct unx_cred *) rpc_allocate(flags, sizeof(*cred))))
return NULL;
- cred->uc_count = 0;
+ atomic_set(&cred->uc_count, 0);
cred->uc_flags = RPCAUTH_CRED_UPTODATE;
if (flags & RPC_TASK_ROOTCREDS) {
cred->uc_uid = cred->uc_fsuid = 0;
@@ -91,6 +93,7 @@
if (i < NFS_NGROUPS)
cred->uc_gids[i] = NOGROUP;
}
+ cred->uc_base.cr_ops = &unix_credops;
return (struct rpc_cred *) cred;
}
@@ -106,7 +109,7 @@
if (!(cred = (struct unx_cred *) rpc_malloc(task, sizeof(*cred))))
return NULL;
- cred->uc_count = 1;
+ atomic_set(&cred->uc_count, 1);
cred->uc_flags = RPCAUTH_CRED_DEAD|RPCAUTH_CRED_UPTODATE;
cred->uc_uid = uid;
cred->uc_gid = gid;
@@ -236,7 +239,11 @@
#endif
unx_create,
unx_destroy,
- unx_create_cred,
+ unx_create_cred
+};
+
+static
+struct rpc_credops unix_credops = {
unx_destroy_cred,
unx_match,
unx_marshal,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)