Lines Matching refs:auth
63 #include <rpc/auth.h>
87 #define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private)
91 * Returns an auth handle with the given stuff in it.
105 AUTH *auth;
109 * Allocate and set up auth handle
112 auth = mem_alloc(sizeof(*auth));
114 if (auth == NULL) {
126 auth->ah_ops = authunix_ops();
127 auth->ah_private = (caddr_t)au;
128 auth->ah_verf = au->au_shcred = _null_auth;
162 * set auth handle to reflect new cred.
164 auth->ah_cred = au->au_origcred;
165 marshal_new_auth(auth);
166 return (auth);
169 if (auth)
170 mem_free(auth, sizeof(*auth));
181 * Returns an auth handle with parameters determined by doing lots of
187 AUTH *auth;
210 auth = authunix_create(machname, uid, gid, ngids, gids);
212 return (auth);
221 authunix_nextverf(auth)
222 AUTH *auth;
228 authunix_marshal(auth, xdrs)
229 AUTH *auth;
234 assert(auth != NULL);
237 au = AUTH_PRIVATE(auth);
242 authunix_validate(auth, verf)
243 AUTH *auth;
249 assert(auth != NULL);
253 au = AUTH_PRIVATE(auth);
263 auth->ah_cred = au->au_shcred;
268 auth->ah_cred = au->au_origcred;
270 marshal_new_auth(auth);
276 authunix_refresh(AUTH *auth, void *dummy)
278 struct audata *au = AUTH_PRIVATE(auth);
284 assert(auth != NULL);
286 if (auth->ah_cred.oa_base == au->au_origcred.oa_base) {
309 auth->ah_cred = au->au_origcred;
310 marshal_new_auth(auth);
320 authunix_destroy(auth)
321 AUTH *auth;
325 assert(auth != NULL);
327 au = AUTH_PRIVATE(auth);
333 mem_free(auth->ah_private, sizeof(struct audata));
335 if (auth->ah_verf.oa_base != NULL)
336 mem_free(auth->ah_verf.oa_base, auth->ah_verf.oa_length);
338 mem_free(auth, sizeof(*auth));
342 * Marshals (pre-serializes) an auth struct.
346 marshal_new_auth(auth)
347 AUTH *auth;
353 assert(auth != NULL);
355 au = AUTH_PRIVATE(auth);
357 if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
358 (! xdr_opaque_auth(xdrs, &(auth->ah_verf))))