Lines Matching refs:context
55 krb5_context context;
71 rv = krb5_init_context(&context);
73 const char *msg = krb5_get_error_message(context, rv);
75 krb5_free_error_message(context, msg);
78 rv = get_su_principal(context, user, ruser, &su_principal_name, &su_principal);
82 rv = krb5_kuserok(context, su_principal, user);
83 pamret = rv ? auth_krb5(pamh, context, su_principal_name, su_principal) : PAM_AUTH_ERR;
85 krb5_free_principal(context, su_principal);
86 krb5_free_context(context);
100 * context -- An initialized krb5_context.
112 auth_krb5(pam_handle_t *pamh, krb5_context context, const char *su_principal_name,
136 rv = krb5_get_init_creds_opt_alloc(context, &gic_opt);
138 const char *msg = krb5_get_error_message(context, rv);
140 krb5_free_error_message(context, msg);
143 rv = krb5_get_init_creds_password(context, &creds, su_principal,
145 krb5_get_init_creds_opt_free(context, gic_opt);
147 const char *msg = krb5_get_error_message(context, rv);
149 krb5_free_error_message(context, msg);
153 rv = krb5_verify_init_creds(context, &creds, NULL, NULL, NULL,
155 krb5_free_cred_contents(context, &creds);
157 const char *msg = krb5_get_error_message(context, rv);
159 krb5_free_error_message(context, msg);
166 * context -- An initialized krb5_context.
181 get_su_principal(krb5_context context, const char *target_user, const char *current_user,
208 rv = krb5_cc_resolve(context, ccname, &ccache);
211 rv = krb5_cc_get_principal(context, ccache, &default_principal);
212 krb5_cc_close(context, ccache);
220 rv = krb5_make_principal(context, &default_principal, NULL, current_user, NULL);
230 rv = krb5_unparse_name(context, default_principal, &principal_name);
231 krb5_free_principal(context, default_principal);
233 const char *msg = krb5_get_error_message(context, rv);
235 krb5_free_error_message(context, msg);
255 rv = krb5_parse_name(context, *su_principal_name, &default_principal);
257 const char *msg = krb5_get_error_message(context, rv);
259 krb5_free_error_message(context, msg);