Lines Matching refs:auth
81 #include <rpc/auth.h>
117 #define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private)
124 * Returns an auth handle with the given stuff in it.
138 register AUTH *auth;
142 * Allocate and set up auth handle
144 auth = (AUTH *)mem_alloc(sizeof(*auth));
146 if (auth == NULL) {
158 auth->ah_ops = &auth_unix_ops;
159 auth->ah_private = (caddr_t)au;
160 auth->ah_verf = au->au_shcred = _null_auth;
193 * set auth handle to reflect new cred.
195 auth->ah_cred = au->au_origcred;
196 marshal_new_auth(auth);
197 return (auth);
217 * Returns an auth handle with parameters determined by doing lots of
247 authunix_nextverf(auth)
248 AUTH *auth;
254 authunix_marshal(auth, xdrs)
255 AUTH *auth;
258 register struct audata *au = AUTH_PRIVATE(auth);
264 authunix_validate(auth, verf)
265 register AUTH *auth;
272 au = AUTH_PRIVATE(auth);
281 auth->ah_cred = au->au_shcred;
286 auth->ah_cred = au->au_origcred;
288 marshal_new_auth(auth);
294 authunix_refresh(auth)
295 register AUTH *auth;
297 register struct audata *au = AUTH_PRIVATE(auth);
303 if (auth->ah_cred.oa_base == au->au_origcred.oa_base) {
326 auth->ah_cred = au->au_origcred;
327 marshal_new_auth(auth);
337 authunix_destroy(auth)
338 register AUTH *auth;
340 register struct audata *au = AUTH_PRIVATE(auth);
347 mem_free(auth->ah_private, sizeof(struct audata));
349 if (auth->ah_verf.oa_base != NULL)
350 mem_free(auth->ah_verf.oa_base, auth->ah_verf.oa_length);
352 mem_free((caddr_t)auth, sizeof(*auth));
356 * Marshals (pre-serializes) an auth struct.
360 marshal_new_auth(auth)
361 register AUTH *auth;
365 register struct audata *au = AUTH_PRIVATE(auth);
368 if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
369 (! xdr_opaque_auth(xdrs, &(auth->ah_verf)))) {