Lines Matching refs:auth
63 #include <rpc/auth.h>
101 #define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private)
124 * Returns an auth handle with the given stuff in it.
133 AUTH *auth;
181 * Allocate and set up auth handle
184 auth = mem_alloc(sizeof(*auth));
186 auth->ah_ops = &authunix_ops;
187 auth->ah_private = (caddr_t)au;
188 auth->ah_verf = au->au_shcred = _null_auth;
193 au->au_auth = auth;
211 * set auth handle to reflect new cred.
213 auth->ah_cred = au->au_origcred;
214 marshal_new_auth(auth);
224 AUTH_DESTROY(auth);
235 return (auth);
244 authunix_nextverf(AUTH *auth)
250 authunix_marshal(AUTH *auth, uint32_t xid, XDR *xdrs, struct mbuf *args)
254 au = AUTH_PRIVATE(auth);
264 authunix_validate(AUTH *auth, uint32_t xid, struct opaque_auth *verf,
274 au = AUTH_PRIVATE(auth);
284 auth->ah_cred = au->au_shcred;
289 auth->ah_cred = au->au_origcred;
291 marshal_new_auth(auth);
298 authunix_refresh(AUTH *auth, void *dummy)
300 struct audata *au = AUTH_PRIVATE(auth);
307 if (auth->ah_cred.oa_base == au->au_origcred.oa_base) {
329 auth->ah_cred = au->au_origcred;
330 marshal_new_auth(auth);
337 authunix_destroy(AUTH *auth)
341 au = AUTH_PRIVATE(auth);
351 mem_free(auth->ah_private, sizeof(struct audata));
353 if (auth->ah_verf.oa_base != NULL)
354 mem_free(auth->ah_verf.oa_base, auth->ah_verf.oa_length);
356 mem_free(auth, sizeof(*auth));
360 * Marshals (pre-serializes) an auth struct.
364 marshal_new_auth(AUTH *auth)
370 au = AUTH_PRIVATE(auth);
372 if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
373 (! xdr_opaque_auth(xdrs, &(auth->ah_verf))))