Skip to content

Commit

Permalink
more debug in krb5_auth_init
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <[email protected]>
  • Loading branch information
sahlberg committed Feb 3, 2025
1 parent 59ca994 commit 3d35233
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/krb5-wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ krb5_auth_init(struct rpc_context *rpc,
auth_data = calloc(1, sizeof(struct private_auth_data));
if (auth_data == NULL) {
rpc_set_error(rpc, "Failed to allocate private_auth_data");
printf("%s\n", rpc_get_error(rpc));
return NULL;
}
auth_data->context = GSS_C_NO_CONTEXT;
Expand All @@ -171,6 +172,7 @@ krb5_auth_init(struct rpc_context *rpc,
if (asprintf(&auth_data->g_server, "nfs@%s", server) < 0) {
krb5_free_auth_data(auth_data);
rpc_set_error(rpc, "Failed to allocate server string");
printf("%s\n", rpc_get_error(rpc));
return NULL;
}

Expand All @@ -183,6 +185,7 @@ krb5_auth_init(struct rpc_context *rpc,
if (maj != GSS_S_COMPLETE) {
krb5_free_auth_data(auth_data);
krb5_set_gss_error(rpc, "gss_import_name", maj, min);
printf("%s\n", rpc_get_error(rpc));
return NULL;
}

Expand All @@ -196,6 +199,7 @@ krb5_auth_init(struct rpc_context *rpc,
if (maj != GSS_S_COMPLETE) {
krb5_free_auth_data(auth_data);
krb5_set_gss_error(rpc, "gss_import_name", maj, min);
printf("%s\n", rpc_get_error(rpc));
return NULL;
}

Expand Down Expand Up @@ -223,6 +227,7 @@ krb5_auth_init(struct rpc_context *rpc,
if (maj != GSS_S_COMPLETE) {
krb5_free_auth_data(auth_data);
krb5_set_gss_error(rpc, "gss_acquire_cred", maj, min);
printf("%s\n", rpc_get_error(rpc));
return NULL;
}

Expand All @@ -244,6 +249,7 @@ krb5_auth_init(struct rpc_context *rpc,
if (GSS_ERROR(maj)) {
krb5_free_auth_data(auth_data);
krb5_set_gss_error(rpc, "gss_set_neg_mechs", maj, min);
printf("%s\n", rpc_get_error(rpc));
return NULL;
}
}
Expand Down

0 comments on commit 3d35233

Please sign in to comment.