Lines Matching defs:kerror
93 k5_log(krb5_context context, krb5_error_code kerror, const char *fmt, ...)
95 const char *msg = krb5_get_error_message(context, kerror);
129 krb5_error_code kerror;
134 kerror = krb5_sname_to_principal(c, 0, 0, KRB5_NT_SRV_HST, &princ);
135 if (kerror) {
136 krb5_warn(kcontext, kerror, "constructing local service name");
143 kerror = krb5_kt_read_service_key(c, NULL, princ, 0, 0, &kb);
147 have_keys = kerror ? 0 : 1;
155 kerror = krb5_mk_req(c, &auth_context, 0, "host", phost,
162 if (kerror == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN) {
177 else if (kerror) {
178 krb5_warn(kcontext, kerror,
180 k5_log(kcontext, kerror, "Kerberos V5 TGT bad");
185 kerror = krb5_rd_req(c, &auth_context, &packet,
187 if (kerror) {
191 switch (kerror) {
207 krb5_warn(kcontext, kerror, "Unable to verify host ticket");
208 k5_log(kcontext, kerror, "can't verify v5 ticket (%s)",
236 krb5_error_code kerror;
244 kerror = krb5_cc_default(kcontext, &ccache);
245 if (kerror) {
246 krb5_warn(kcontext, kerror, "while getting default ccache");
250 kerror = krb5_parse_name(kcontext, username, &me);
251 if (kerror) {
252 krb5_warn(kcontext, kerror, "when parsing name %s", username);
259 kerror = krb5_build_principal_ext(kcontext, &mcreds.server,
265 if (kerror) {
266 krb5_warn(kcontext, kerror, "while building server name");
270 kerror = krb5_cc_retrieve_cred(kcontext, ccache, 0,
272 if (kerror) {
273 krb5_warn(kcontext, kerror,
293 krb5_error_code kerror;
299 kerror = krb5_cc_default(kcontext, &ccache);
300 if (kerror) {
301 krb5_warn(kcontext, kerror, "while getting default ccache");
305 kerror = krb5_cc_initialize(kcontext, ccache, me);
306 if (kerror) {
307 krb5_warn(kcontext, kerror,
312 kerror = krb5_cc_store_cred(kcontext, ccache, &forw_creds);
313 if (kerror) {
314 krb5_warn(kcontext, kerror,
321 return (kerror != 0);
333 krb5_error_code kerror;
380 if ((kerror = krb5_cc_resolve(kcontext, tkt_location, &ccache)) != 0) {
381 k5_log(kcontext, kerror, "while getting default ccache");
385 if ((kerror = krb5_parse_name(kcontext, principal, &me)) != 0) {
386 k5_log(kcontext, kerror, "when parsing name %s", principal);
390 if ((kerror = krb5_unparse_name(kcontext, me, &client_name)) != 0) {
391 k5_log(kcontext, kerror, "when unparsing name %s", principal);
395 kerror = krb5_cc_initialize(kcontext, ccache, me);
396 if (kerror != 0) {
397 k5_log(kcontext, kerror, "when initializing cache %s",
405 if ((kerror = krb5_get_init_creds_opt_alloc(kcontext, &opt)) != 0) {
406 k5_log(kcontext, kerror, "while getting options");
412 kerror = krb5_get_init_creds_password(kcontext, &my_creds, me, password,
416 if (kerror == 0)
417 kerror = krb5_cc_store_cred(kcontext, ccache, &my_creds);
422 if (kerror) {
423 if (kerror == KRB5KRB_AP_ERR_BAD_INTEGRITY)
426 krb5_warn(kcontext, kerror,
446 krb5_error_code kerror;
452 kerror = krb5_cc_resolve(kcontext, krb5tkfile_env, &ccache);
453 if (kerror == 0)