Searched refs:gss_auth (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/net/sunrpc/auth_gss/
H A Dauth_gss.c89 struct gss_auth { struct
111 static void gss_put_auth(struct gss_auth *gss_auth);
294 struct gss_auth *auth;
489 gss_alloc_msg(struct gss_auth *gss_auth, gss_alloc_msg() argument
499 vers = get_pipe_version(gss_auth->net); gss_alloc_msg()
503 gss_msg->pipe = gss_auth->gss_pipe[vers]->pipe; gss_alloc_msg()
509 gss_msg->auth = gss_auth; gss_alloc_msg()
515 err = gss_encode_v1_msg(gss_msg, service_name, gss_auth->target_name); gss_alloc_msg()
519 kref_get(&gss_auth->kref); gss_alloc_msg()
522 put_pipe_version(gss_auth->net); gss_alloc_msg()
530 gss_setup_upcall(struct gss_auth *gss_auth, struct rpc_cred *cred) gss_setup_upcall() argument
537 gss_new = gss_alloc_msg(gss_auth, uid, gss_cred->gc_principal); gss_setup_upcall()
561 struct gss_auth *gss_auth = container_of(cred->cr_auth, gss_refresh_upcall() local
562 struct gss_auth, rpc_auth); gss_refresh_upcall()
571 gss_msg = gss_setup_upcall(gss_auth, cred); gss_refresh_upcall()
608 gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred) gss_create_upcall() argument
610 struct net *net = gss_auth->net; gss_create_upcall()
627 gss_msg = gss_setup_upcall(gss_auth, cred); gss_create_upcall()
980 static struct gss_auth * gss_create_new()
984 struct gss_auth *gss_auth; gss_create_new() local
993 if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL))) gss_create_new()
995 INIT_HLIST_NODE(&gss_auth->hash); gss_create_new()
996 gss_auth->target_name = NULL; gss_create_new()
998 gss_auth->target_name = kstrdup(args->target_name, GFP_KERNEL); gss_create_new()
999 if (gss_auth->target_name == NULL) gss_create_new()
1002 gss_auth->client = clnt; gss_create_new()
1003 gss_auth->net = get_net(rpc_net_ns(clnt)); gss_create_new()
1005 gss_auth->mech = gss_mech_get_by_pseudoflavor(flavor); gss_create_new()
1006 if (!gss_auth->mech) { gss_create_new()
1010 gss_auth->service = gss_pseudoflavor_to_service(gss_auth->mech, flavor); gss_create_new()
1011 if (gss_auth->service == 0) gss_create_new()
1013 if (!gssd_running(gss_auth->net)) gss_create_new()
1015 auth = &gss_auth->rpc_auth; gss_create_new()
1021 kref_init(&gss_auth->kref); gss_create_new()
1037 gss_auth->gss_pipe[1] = gss_pipe; gss_create_new()
1039 gss_pipe = gss_pipe_get(clnt, gss_auth->mech->gm_name, gss_create_new()
1045 gss_auth->gss_pipe[0] = gss_pipe; gss_create_new()
1047 return gss_auth; gss_create_new()
1049 gss_pipe_free(gss_auth->gss_pipe[1]); gss_create_new()
1053 gss_mech_put(gss_auth->mech); gss_create_new()
1055 put_net(gss_auth->net); gss_create_new()
1057 kfree(gss_auth->target_name); gss_create_new()
1058 kfree(gss_auth); gss_create_new()
1065 gss_free(struct gss_auth *gss_auth) gss_free() argument
1067 gss_pipe_free(gss_auth->gss_pipe[0]); gss_free()
1068 gss_pipe_free(gss_auth->gss_pipe[1]); gss_free()
1069 gss_mech_put(gss_auth->mech); gss_free()
1070 put_net(gss_auth->net); gss_free()
1071 kfree(gss_auth->target_name); gss_free()
1073 kfree(gss_auth); gss_free()
1080 struct gss_auth *gss_auth = container_of(kref, struct gss_auth, kref); gss_free_callback() local
1082 gss_free(gss_auth); gss_free_callback()
1086 gss_put_auth(struct gss_auth *gss_auth) gss_put_auth() argument
1088 kref_put(&gss_auth->kref, gss_free_callback); gss_put_auth()
1094 struct gss_auth *gss_auth = container_of(auth, gss_destroy() local
1095 struct gss_auth, rpc_auth); gss_destroy()
1100 if (hash_hashed(&gss_auth->hash)) { gss_destroy()
1102 hash_del(&gss_auth->hash); gss_destroy()
1106 gss_pipe_free(gss_auth->gss_pipe[0]); gss_destroy()
1107 gss_auth->gss_pipe[0] = NULL; gss_destroy()
1108 gss_pipe_free(gss_auth->gss_pipe[1]); gss_destroy()
1109 gss_auth->gss_pipe[1] = NULL; gss_destroy()
1112 gss_put_auth(gss_auth); gss_destroy()
1124 static struct gss_auth * gss_auth_find_or_add_hashed()
1127 struct gss_auth *new) gss_auth_find_or_add_hashed()
1129 struct gss_auth *gss_auth; gss_auth_find_or_add_hashed() local
1134 gss_auth, hash_for_each_possible()
1137 if (gss_auth->client != clnt) hash_for_each_possible()
1139 if (gss_auth->rpc_auth.au_flavor != args->pseudoflavor) hash_for_each_possible()
1141 if (gss_auth->target_name != args->target_name) { hash_for_each_possible()
1142 if (gss_auth->target_name == NULL) hash_for_each_possible()
1146 if (strcmp(gss_auth->target_name, args->target_name)) hash_for_each_possible()
1149 if (!atomic_inc_not_zero(&gss_auth->rpc_auth.au_count)) hash_for_each_possible()
1155 gss_auth = new;
1158 return gss_auth;
1161 static struct gss_auth * gss_create_hashed()
1164 struct gss_auth *gss_auth; gss_create_hashed() local
1165 struct gss_auth *new; gss_create_hashed()
1167 gss_auth = gss_auth_find_or_add_hashed(args, clnt, NULL); gss_create_hashed()
1168 if (gss_auth != NULL) gss_create_hashed()
1173 gss_auth = gss_auth_find_or_add_hashed(args, clnt, new); gss_create_hashed()
1174 if (gss_auth != new) gss_create_hashed()
1177 return gss_auth; gss_create_hashed()
1183 struct gss_auth *gss_auth; gss_create() local
1194 gss_auth = gss_create_hashed(args, clnt); gss_create()
1195 if (IS_ERR(gss_auth)) gss_create()
1196 return ERR_CAST(gss_auth); gss_create()
1197 return &gss_auth->rpc_auth; gss_create()
1210 struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth); gss_destroying_context() local
1224 task = rpc_call_null(gss_auth->client, cred, RPC_TASK_ASYNC|RPC_TASK_SOFT); gss_destroying_context()
1277 struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth); gss_destroy_nullcred() local
1284 gss_put_auth(gss_auth); gss_destroy_nullcred()
1308 struct gss_auth *gss_auth = container_of(auth, struct gss_auth, rpc_auth); gss_create_cred() local
1325 cred->gc_service = gss_auth->service; gss_create_cred()
1329 kref_get(&gss_auth->kref); gss_create_cred()
1340 struct gss_auth *gss_auth = container_of(auth, struct gss_auth, rpc_auth); gss_cred_init() local
1345 err = gss_create_upcall(gss_auth, gss_cred); gss_cred_init()

Completed in 45 milliseconds