100 unx_free_cred(unx_cred);
101}
102
103static void
104unx_destroy_cred(struct rpc_cred *cred)
105{
106 call_rcu(&cred->cr_rcu, unx_free_cred_callback);
107}
108
109
110
111
112
113
114static int
115unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags)
116{
117 struct unx_cred *cred = container_of(rcred, struct unx_cred, uc_base);
118 unsigned int groups = 0;
119 unsigned int i;
120
121
122 if (cred->uc_uid != acred->uid || cred->uc_gid != acred->gid)
123 return 0;
124
125 if (acred->group_info != NULL)
126 groups = acred->group_info->ngroups;
127 if (groups > NFS_NGROUPS)
128 groups = NFS_NGROUPS;
129 for (i = 0; i < groups ; i++)
130 if (cred->uc_gids[i] != GROUP_AT(acred->group_info, i))
131 return 0;
132 return 1;
133}
134
135
136
137
138
139static __be32 *
140unx_marshal(struct rpc_task *task, __be32 *p)