Lines Matching refs:au
96 struct audata *au; in authunix_create() local
101 au = NULL; in authunix_create()
109 au = mem_alloc(sizeof(*au)); in authunix_create()
111 if (au == NULL) { in authunix_create()
117 auth->ah_private = (caddr_t)au; in authunix_create()
118 auth->ah_verf = au->au_shcred = _null_auth; in authunix_create()
119 au->au_shfaults = 0; in authunix_create()
120 au->au_origcred.oa_base = NULL; in authunix_create()
139 au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs); in authunix_create()
140 au->au_origcred.oa_flavor = AUTH_UNIX; in authunix_create()
142 au->au_origcred.oa_base = mem_alloc((u_int) len); in authunix_create()
144 if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) { in authunix_create()
149 memmove(au->au_origcred.oa_base, mymem, (size_t)len); in authunix_create()
154 auth->ah_cred = au->au_origcred; in authunix_create()
161 if (au) { in authunix_create()
162 if (au->au_origcred.oa_base) in authunix_create()
163 mem_free(au->au_origcred.oa_base, (u_int)len); in authunix_create()
164 mem_free(au, sizeof(*au)); in authunix_create()
219 struct audata *au; in authunix_marshal() local
224 au = AUTH_PRIVATE(auth); in authunix_marshal()
225 return (XDR_PUTBYTES(xdrs, au->au_marshed, au->au_mpos)); in authunix_marshal()
231 struct audata *au; in authunix_validate() local
238 au = AUTH_PRIVATE(auth); in authunix_validate()
242 if (au->au_shcred.oa_base != NULL) { in authunix_validate()
243 mem_free(au->au_shcred.oa_base, in authunix_validate()
244 au->au_shcred.oa_length); in authunix_validate()
245 au->au_shcred.oa_base = NULL; in authunix_validate()
247 if (xdr_opaque_auth(&xdrs, &au->au_shcred)) { in authunix_validate()
248 auth->ah_cred = au->au_shcred; in authunix_validate()
251 (void)xdr_opaque_auth(&xdrs, &au->au_shcred); in authunix_validate()
252 au->au_shcred.oa_base = NULL; in authunix_validate()
253 auth->ah_cred = au->au_origcred; in authunix_validate()
263 struct audata *au = AUTH_PRIVATE(auth); in authunix_refresh() local
271 if (auth->ah_cred.oa_base == au->au_origcred.oa_base) { in authunix_refresh()
275 au->au_shfaults ++; in authunix_refresh()
280 xdrmem_create(&xdrs, au->au_origcred.oa_base, in authunix_refresh()
281 au->au_origcred.oa_length, XDR_DECODE); in authunix_refresh()
294 auth->ah_cred = au->au_origcred; in authunix_refresh()
307 struct audata *au; in authunix_destroy() local
311 au = AUTH_PRIVATE(auth); in authunix_destroy()
312 mem_free(au->au_origcred.oa_base, au->au_origcred.oa_length); in authunix_destroy()
314 if (au->au_shcred.oa_base != NULL) in authunix_destroy()
315 mem_free(au->au_shcred.oa_base, au->au_shcred.oa_length); in authunix_destroy()
334 struct audata *au; in marshal_new_auth() local
338 au = AUTH_PRIVATE(auth); in marshal_new_auth()
339 xdrmem_create(xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); in marshal_new_auth()
344 au->au_mpos = XDR_GETPOS(xdrs); in marshal_new_auth()