summaryrefslogtreecommitdiff
path: root/auth-krb5.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-krb5.c')
-rw-r--r--auth-krb5.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/auth-krb5.c b/auth-krb5.c
index 5f554a66b..bc37675a2 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$OpenBSD: auth-krb5.c,v 1.15 2003/11/21 11:57:02 djm Exp $"); 31RCSID("$OpenBSD: auth-krb5.c,v 1.16 2005/11/21 09:42:10 dtucker Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "ssh1.h" 34#include "ssh1.h"
@@ -69,9 +69,6 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
69 krb5_ccache ccache = NULL; 69 krb5_ccache ccache = NULL;
70 int len; 70 int len;
71 71
72 if (!authctxt->valid)
73 return (0);
74
75 temporarily_use_uid(authctxt->pw); 72 temporarily_use_uid(authctxt->pw);
76 73
77 problem = krb5_init(authctxt); 74 problem = krb5_init(authctxt);
@@ -193,7 +190,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
193 else 190 else
194 return (0); 191 return (0);
195 } 192 }
196 return (1); 193 return (authctxt->valid ? 1 : 0);
197} 194}
198 195
199void 196void
@@ -229,7 +226,7 @@ ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) {
229 226
230 ret = snprintf(ccname, sizeof(ccname), 227 ret = snprintf(ccname, sizeof(ccname),
231 cctemplate, geteuid()); 228 cctemplate, geteuid());
232 if (ret == -1 || ret >= (int) sizeof(ccname)) 229 if (ret < 0 || (size_t)ret >= sizeof(ccname))
233 return ENOMEM; 230 return ENOMEM;
234 231
235#ifndef USE_CCAPI 232#ifndef USE_CCAPI