Lines Matching full:gm

33 gss_mech_free(struct gss_api_mech *gm)  in gss_mech_free()  argument
38 for (i = 0; i < gm->gm_pf_num; i++) { in gss_mech_free()
39 pf = &gm->gm_pfs[i]; in gss_mech_free()
62 gss_mech_svc_setup(struct gss_api_mech *gm) in gss_mech_svc_setup() argument
68 for (i = 0; i < gm->gm_pf_num; i++) { in gss_mech_svc_setup()
69 pf = &gm->gm_pfs[i]; in gss_mech_svc_setup()
84 gss_mech_free(gm); in gss_mech_svc_setup()
90 * @gm: GSS mechanism handle
94 int gss_mech_register(struct gss_api_mech *gm) in gss_mech_register() argument
98 status = gss_mech_svc_setup(gm); in gss_mech_register()
102 list_add_rcu(&gm->gm_list, &registered_mechs); in gss_mech_register()
104 dprintk("RPC: registered gss mechanism %s\n", gm->gm_name); in gss_mech_register()
111 * @gm: GSS mechanism handle
114 void gss_mech_unregister(struct gss_api_mech *gm) in gss_mech_unregister() argument
117 list_del_rcu(&gm->gm_list); in gss_mech_unregister()
119 dprintk("RPC: unregistered gss mechanism %s\n", gm->gm_name); in gss_mech_unregister()
120 gss_mech_free(gm); in gss_mech_unregister()
124 struct gss_api_mech *gss_mech_get(struct gss_api_mech *gm) in gss_mech_get() argument
126 __module_get(gm->gm_owner); in gss_mech_get()
127 return gm; in gss_mech_get()
134 struct gss_api_mech *pos, *gm = NULL; in _gss_mech_get_by_name() local
140 gm = pos; in _gss_mech_get_by_name()
145 return gm; in _gss_mech_get_by_name()
151 struct gss_api_mech *gm = NULL; in gss_mech_get_by_name() local
153 gm = _gss_mech_get_by_name(name); in gss_mech_get_by_name()
154 if (!gm) { in gss_mech_get_by_name()
156 gm = _gss_mech_get_by_name(name); in gss_mech_get_by_name()
158 return gm; in gss_mech_get_by_name()
163 struct gss_api_mech *pos, *gm = NULL; in gss_mech_get_by_OID() local
175 gm = pos; in gss_mech_get_by_OID()
181 if (!gm) in gss_mech_get_by_OID()
183 return gm; in gss_mech_get_by_OID()
187 mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor) in mech_supports_pseudoflavor() argument
191 for (i = 0; i < gm->gm_pf_num; i++) { in mech_supports_pseudoflavor()
192 if (gm->gm_pfs[i].pseudoflavor == pseudoflavor) in mech_supports_pseudoflavor()
200 struct gss_api_mech *gm = NULL, *pos; in _gss_mech_get_by_pseudoflavor() local
207 gm = pos; in _gss_mech_get_by_pseudoflavor()
211 return gm; in _gss_mech_get_by_pseudoflavor()
217 struct gss_api_mech *gm; in gss_mech_get_by_pseudoflavor() local
219 gm = _gss_mech_get_by_pseudoflavor(pseudoflavor); in gss_mech_get_by_pseudoflavor()
221 if (!gm) { in gss_mech_get_by_pseudoflavor()
223 gm = _gss_mech_get_by_pseudoflavor(pseudoflavor); in gss_mech_get_by_pseudoflavor()
225 return gm; in gss_mech_get_by_pseudoflavor()
230 * @gm: GSS mechanism handle
236 rpc_authflavor_t gss_svc_to_pseudoflavor(struct gss_api_mech *gm, u32 qop, in gss_svc_to_pseudoflavor() argument
241 for (i = 0; i < gm->gm_pf_num; i++) { in gss_svc_to_pseudoflavor()
242 if (gm->gm_pfs[i].qop == qop && in gss_svc_to_pseudoflavor()
243 gm->gm_pfs[i].service == service) { in gss_svc_to_pseudoflavor()
244 return gm->gm_pfs[i].pseudoflavor; in gss_svc_to_pseudoflavor()
260 struct gss_api_mech *gm; in gss_mech_info2flavor() local
262 gm = gss_mech_get_by_OID(&info->oid); in gss_mech_info2flavor()
263 if (gm == NULL) in gss_mech_info2flavor()
266 pseudoflavor = gss_svc_to_pseudoflavor(gm, info->qop, info->service); in gss_mech_info2flavor()
268 gss_mech_put(gm); in gss_mech_info2flavor()
283 struct gss_api_mech *gm; in gss_mech_flavor2info() local
286 gm = gss_mech_get_by_pseudoflavor(pseudoflavor); in gss_mech_flavor2info()
287 if (gm == NULL) in gss_mech_flavor2info()
290 for (i = 0; i < gm->gm_pf_num; i++) { in gss_mech_flavor2info()
291 if (gm->gm_pfs[i].pseudoflavor == pseudoflavor) { in gss_mech_flavor2info()
292 memcpy(info->oid.data, gm->gm_oid.data, gm->gm_oid.len); in gss_mech_flavor2info()
293 info->oid.len = gm->gm_oid.len; in gss_mech_flavor2info()
294 info->qop = gm->gm_pfs[i].qop; in gss_mech_flavor2info()
295 info->service = gm->gm_pfs[i].service; in gss_mech_flavor2info()
296 gss_mech_put(gm); in gss_mech_flavor2info()
301 gss_mech_put(gm); in gss_mech_flavor2info()
306 gss_pseudoflavor_to_service(struct gss_api_mech *gm, u32 pseudoflavor) in gss_pseudoflavor_to_service() argument
310 for (i = 0; i < gm->gm_pf_num; i++) { in gss_pseudoflavor_to_service()
311 if (gm->gm_pfs[i].pseudoflavor == pseudoflavor) in gss_pseudoflavor_to_service()
312 return gm->gm_pfs[i].service; in gss_pseudoflavor_to_service()
319 gss_pseudoflavor_to_datatouch(struct gss_api_mech *gm, u32 pseudoflavor) in gss_pseudoflavor_to_datatouch() argument
323 for (i = 0; i < gm->gm_pf_num; i++) { in gss_pseudoflavor_to_datatouch()
324 if (gm->gm_pfs[i].pseudoflavor == pseudoflavor) in gss_pseudoflavor_to_datatouch()
325 return gm->gm_pfs[i].datatouch; in gss_pseudoflavor_to_datatouch()
331 gss_service_to_auth_domain_name(struct gss_api_mech *gm, u32 service) in gss_service_to_auth_domain_name() argument
335 for (i = 0; i < gm->gm_pf_num; i++) { in gss_service_to_auth_domain_name()
336 if (gm->gm_pfs[i].service == service) in gss_service_to_auth_domain_name()
337 return gm->gm_pfs[i].auth_domain_name; in gss_service_to_auth_domain_name()
343 gss_mech_put(struct gss_api_mech * gm) in gss_mech_put() argument
345 if (gm) in gss_mech_put()
346 module_put(gm->gm_owner); in gss_mech_put()