Lines Matching full:auth
55 #include <gssrpc/auth.h>
61 static void authunix_nextverf(AUTH *);
62 static bool_t authunix_marshal(AUTH *, XDR *);
63 static bool_t authunix_validate(AUTH *, struct opaque_auth *);
64 static bool_t authunix_refresh(AUTH *, struct rpc_msg *);
65 static void authunix_destroy(AUTH *);
66 static bool_t authunix_wrap(AUTH *, XDR *, xdrproc_t, caddr_t);
88 #define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private) argument
90 static void marshal_new_auth(AUTH *);
95 * Returns an auth handle with the given stuff in it.
97 AUTH *
109 AUTH *auth; in authunix_create() local
113 * Allocate and set up auth handle in authunix_create()
115 auth = (AUTH *)mem_alloc(sizeof(*auth)); in authunix_create()
117 if (auth == NULL) { in authunix_create()
129 auth->ah_ops = &auth_unix_ops; in authunix_create()
130 auth->ah_private = (caddr_t)au; in authunix_create()
131 auth->ah_verf = au->au_shcred = gssrpc__null_auth; in authunix_create()
164 * set auth handle to reflect new cred. in authunix_create()
166 auth->ah_cred = au->au_origcred; in authunix_create()
167 marshal_new_auth(auth); in authunix_create()
168 return (auth); in authunix_create()
172 * Returns an auth handle with parameters determined by doing lots of
175 AUTH *
203 authunix_nextverf(AUTH *auth) in authunix_nextverf() argument
209 authunix_marshal(AUTH *auth, XDR *xdrs) in authunix_marshal() argument
211 struct audata *au = AUTH_PRIVATE(auth); in authunix_marshal()
217 authunix_validate(AUTH *auth, struct opaque_auth *verf) in authunix_validate() argument
223 au = AUTH_PRIVATE(auth); in authunix_validate()
232 auth->ah_cred = au->au_shcred; in authunix_validate()
237 auth->ah_cred = au->au_origcred; in authunix_validate()
239 marshal_new_auth(auth); in authunix_validate()
245 authunix_refresh(AUTH *auth, struct rpc_msg *msg) in authunix_refresh() argument
247 struct audata *au = AUTH_PRIVATE(auth); in authunix_refresh()
253 if (auth->ah_cred.oa_base == au->au_origcred.oa_base) { in authunix_refresh()
276 auth->ah_cred = au->au_origcred; in authunix_refresh()
277 marshal_new_auth(auth); in authunix_refresh()
287 authunix_destroy(AUTH *auth) in authunix_destroy() argument
289 struct audata *au = AUTH_PRIVATE(auth); in authunix_destroy()
296 mem_free(auth->ah_private, sizeof(struct audata)); in authunix_destroy()
298 if (auth->ah_verf.oa_base != NULL) in authunix_destroy()
299 mem_free(auth->ah_verf.oa_base, auth->ah_verf.oa_length); in authunix_destroy()
301 mem_free((caddr_t)auth, sizeof(*auth)); in authunix_destroy()
305 * Marshals (pre-serializes) an auth struct.
309 marshal_new_auth(AUTH *auth) in marshal_new_auth() argument
313 struct audata *au = AUTH_PRIVATE(auth); in marshal_new_auth()
316 if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) || in marshal_new_auth()
317 (! xdr_opaque_auth(xdrs, &(auth->ah_verf)))) { in marshal_new_auth()
326 authunix_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere) in authunix_wrap() argument