From 2a5fe3cb904eb160a154392b9173d522ae6eb47f Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Thu, 18 Jan 1996 20:52:03 +0000 Subject: [PATCH] Fix loop so that a ftp/host@REALM is not required, but host/host@REALM will also work. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7334 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftpd/ChangeLog | 4 ++++ src/appl/gssftp/ftpd/ftpd.c | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index 16813efc0..971c87146 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,7 @@ +Thu Jan 18 14:55:42 1996 Sam Hartman + + * ftpd.c : Only return an unable to acquire credentials error if all possible services fail. + Sun Jan 14 02:58:42 1996 Mark Eichin * ftpd.c (auth_data): call gss_release_cred on the server_creds we diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index 2a1bff3f4..a5d014a4b 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -1938,7 +1938,12 @@ char *data; maj_stat = gss_acquire_cred(&min_stat, server_name, 0, GSS_C_NULL_OID_SET, GSS_C_ACCEPT, &server_creds, NULL, NULL); - if (maj_stat != GSS_S_COMPLETE) { + (void) gss_release_name(&min_stat, &server_name); + if (maj_stat != GSS_S_COMPLETE) + continue; + } + if (maj_stat != GSS_S_COMPLETE) + { reply_gss_error(501, maj_stat, min_stat, "acquiring credentials"); syslog(LOG_ERR, "gssapi error acquiring credentials"); @@ -1947,9 +1952,7 @@ char *data; if (server_creds == GSS_C_NO_CREDENTIAL) { syslog(LOG_ERR, "acquire return GSS_C_NO_CREDENTIAL"); } - (void) gss_release_name(&min_stat, &server_name); - break; - } + gcontext = GSS_C_NO_CONTEXT; -- 2.26.2