From 8b0c3df2d3cd79abf46914b2f8913667dab45f15 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Mon, 22 May 1995 19:43:34 +0000 Subject: [PATCH] Fix problem when gss_accept_sec_context() fails where error message was lost git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5845 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gss-sample/ChangeLog | 6 ++++++ src/appl/gss-sample/gss-server.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/appl/gss-sample/ChangeLog b/src/appl/gss-sample/ChangeLog index 606ace93c..1c35656be 100644 --- a/src/appl/gss-sample/ChangeLog +++ b/src/appl/gss-sample/ChangeLog @@ -1,3 +1,9 @@ + +Mon May 22 15:41:33 EDT 1995 Paul Park (pjpark@mit.edu) + * gss-server.c : (server_establish_context) Don't call gss_release_ + buffer right after gss_accept_sec_context because + in the event that we choke, we lose the minor status + Fri Apr 28 15:30:00 1995 Theodore Y. Ts'o * Makefile.in (gss-client): Use $(LD) instead of $(CC) so that we can diff --git a/src/appl/gss-sample/gss-server.c b/src/appl/gss-sample/gss-server.c index ed273ab01..55f185252 100644 --- a/src/appl/gss-sample/gss-server.c +++ b/src/appl/gss-sample/gss-server.c @@ -361,12 +361,13 @@ int server_establish_context(s, server_creds, context, client_name) NULL, /* ignore time_rec */ NULL); /* ignore del_cred_handle */ - (void) gss_release_buffer(&min_stat, &recv_tok); - if (maj_stat!=GSS_S_COMPLETE && maj_stat!=GSS_S_CONTINUE_NEEDED) { display_status("accepting context", maj_stat, min_stat); + (void) gss_release_buffer(&min_stat, &recv_tok); return -1; } + (void) gss_release_buffer(&min_stat, &recv_tok); + if (send_tok.length != 0) { if (send_token(s, &send_tok) < 0) { -- 2.26.2